Files
launcher/.gitea/workflows/launcher.yml
T
SpriteandClaude Sonnet 5.5 a8ce535f37
Launcher / test (pull_request) Failing after 5m41s
Launcher / apk (pull_request) Skipped
CI: build the APK in the cluster's android-sdk image
apk job uses git.site.latha.org/cluster-services/android-sdk:latest; gitea-apk.sh
uses the image's JDK/SDK when present and falls back to installing them
(documented, for use with node:22-bookworm until the image is built).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-23 01:15:50 +00:00

62 lines
2.1 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
# JDK 17 + Android SDK (platforms;android-35, build-tools 35.0.0, NDK) prebuilt by
# charts/android-sdk in nandi/cluster, so no per-run SDK download. Fallback until that image
# is built and pullable: use `node:22-bookworm` here; ci/gitea-apk.sh then installs the JDK
# and downloads the SDK pieces itself.
container:
image: git.site.latha.org/cluster-services/android-sdk:latest
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