Add the Android shell, APK build, bridge test, sweet config and CI

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>
This commit is contained in:
SpriteandClaude Sonnet 5.5 committed 2026-11-23 01:08:35 +00:00
1 parent 637129aa4e
commit dccbfd7d86
24 files changed
+1571 -30

No files matched your search

+44 -13
View File
@@ -1,26 +1,57 @@
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:
apk:
test:
runs-on: ubuntu-latest
timeout-minutes: 60
container: eclipse-temurin:17-jdk-noble
# 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:
- name: Checkout
env:
GITHUB_TOKEN: ${{ github.token }}
- uses: actions/checkout@v4
- name: Install MoonBit
run: |
apt-get update -qq
apt-get install -y -qq --no-install-recommends git ca-certificates >/dev/null
git init -q
git -c http.extraHeader="Authorization: Basic $(printf 'x-access-token:%s' "$GITHUB_TOKEN" | base64 -w0)" \
fetch -q --depth 1 "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git" "${GITHUB_SHA}"
git checkout -q --detach FETCH_HEAD
- name: Test, build and release the Qt APK
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