android/: HomeActivity (derived from the legacy MainActivity, same package dev.ultra.launcher and class name as the Qt build so the default-home choice carries over), Updater reduced to httpGet + PackageInstaller, RecentsService, manifest and resources, the committed debug keystore. android/build.sh builds the APK with aapt2, javac, d8, zipalign and apksigner (no Gradle). tests/android-sim.cjs drives the page against a stub of window.Android. .sweet.config.yml / .sweet.yml with moon.mod as the annotated version file. CI: test job (moon test on js and wasm-gc, browser tests) and an apk job that publishes a Gitea release. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
58 lines
1.8 KiB
YAML
58 lines
1.8 KiB
YAML
name: Launcher
|
|
|
|
# The MoonBit launcher at the repo root: tests (moon test, a browser e2e of the page), then
|
|
# on every push to main an APK (android/build.sh) published as a Gitea release, which the
|
|
# installed app updates itself from. The previous implementations live in legacy/ and have
|
|
# their own manual workflow (legacy.yml).
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
# Node comes from the image, not actions/setup-node: its download stalls on this
|
|
# runner and holds the cluster's only runner slot (see identicons-web's workflow).
|
|
container:
|
|
image: node:22-bookworm
|
|
timeout-minutes: 20
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install MoonBit
|
|
run: |
|
|
curl -fsSL https://cli.moonbitlang.com/install/unix.sh | bash
|
|
echo "$HOME/.moon/bin" >> "$GITHUB_PATH"
|
|
|
|
- name: Check and test
|
|
run: |
|
|
moon update
|
|
moon check --target js
|
|
moon test --target js
|
|
moon test --target wasm-gc
|
|
|
|
- name: Build the page and run the browser test
|
|
run: |
|
|
scripts/build-web.sh --demo
|
|
mkdir -p /tmp/e2e && cd /tmp/e2e && npm init -y >/dev/null
|
|
npm i --no-audit --no-fund playwright@1.65.1
|
|
npx playwright install --with-deps chromium
|
|
cd "$GITHUB_WORKSPACE"
|
|
PLAYWRIGHT=/tmp/e2e/node_modules/playwright node tests/e2e.cjs
|
|
|
|
apk:
|
|
needs: test
|
|
if: github.event_name != 'pull_request'
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: node:22-bookworm
|
|
timeout-minutes: 40
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Build and release the APK
|
|
env:
|
|
GITEA_TOKEN: ${{ github.token }}
|
|
run: bash ci/gitea-apk.sh
|