Rewrite the launcher in MoonBit (old code moves to legacy/) (#1)
This commit was merged in pull request #1.
This commit is contained in:
1 parent
7d2bf5996f
commit
2fa7bd745b
150 files changed
+8319
-462
No files matched your search
@@ -0,0 +1,104 @@
|
||||
name: Legacy launcher
|
||||
|
||||
# The previous implementations (ultra WebView, Qt) now live in legacy/. The launcher is built
|
||||
# from the repo root (MoonBit, see .gitea/workflows/launcher.yml), so this only runs by hand.
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
defaults:
|
||||
run:
|
||||
working-directory: legacy
|
||||
|
||||
jobs:
|
||||
web:
|
||||
# Playwright's Chromium has no build for ubuntu-latest (26.04) yet.
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 20
|
||||
concurrency:
|
||||
group: web-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
# No pixi.lock is committed yet (the cloud dev sandbox can't reach prefix.dev to make one).
|
||||
- uses: prefix-dev/setup-pixi@v0.9.3
|
||||
with:
|
||||
cache: false
|
||||
locked: false
|
||||
manifest-path: legacy/pixi.toml
|
||||
# Playwright's browser download hangs while unpacking under pixi's Node 26, so fetch
|
||||
# Chromium with the runner's own Node; the test itself still runs in the pixi env.
|
||||
- uses: actions/setup-node@v5
|
||||
with:
|
||||
node-version: 22
|
||||
- name: Fetch Playwright
|
||||
run: |
|
||||
npm install --no-save --no-package-lock playwright@1.56.1
|
||||
./node_modules/.bin/playwright install --with-deps chromium
|
||||
- name: Build the wasm and run the browser test
|
||||
run: pixi run test
|
||||
- name: Check the committed web/app.wasm is up to date
|
||||
run: git diff --exit-code --stat web/
|
||||
|
||||
apk:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-java@v5
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: 17
|
||||
- uses: gradle/actions/setup-gradle@v5
|
||||
- name: Build the APK
|
||||
working-directory: legacy/android
|
||||
# The run number only grows, so each build's versionCode is newer than the last
|
||||
# (it restarts if this workflow is renamed; bump past the old numbers then).
|
||||
run: ./gradlew --no-daemon assembleDebug -PversionCode=${{ github.run_number }}
|
||||
- uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: ultra-launcher-apk
|
||||
path: legacy/android/app/build/outputs/apk/debug/app-debug.apk
|
||||
# Keep a "launcher-latest" prerelease with the newest APK, so a phone can download it directly.
|
||||
- name: Publish the launcher-latest release
|
||||
if: github.event_name != 'pull_request'
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
cp android/app/build/outputs/apk/debug/app-debug.apk ultra-launcher.apk
|
||||
# The launcher's updater reads this to tell whether the APK is newer than it.
|
||||
echo '{"versionCode": ${{ github.run_number }}, "commit": "'"$GITHUB_SHA"'"}' > version.json
|
||||
# Swap the files in place, the APK first, so the release never disappears
|
||||
# under a phone checking for updates.
|
||||
if gh release view launcher-latest >/dev/null 2>&1; then
|
||||
gh release upload launcher-latest ultra-launcher.apk --clobber
|
||||
gh release upload launcher-latest version.json --clobber
|
||||
git push -f "https://x-access-token:$GH_TOKEN@github.com/$GITHUB_REPOSITORY" "$GITHUB_SHA:refs/tags/launcher-latest"
|
||||
exit 0
|
||||
fi
|
||||
gh release create launcher-latest ultra-launcher.apk version.json --prerelease --target "$GITHUB_SHA" \
|
||||
--title "ultra launcher (latest build)" \
|
||||
--notes "Debug-signed APK of android/ built from $GITHUB_SHA. Install it, press Home, and pick ultra Home."
|
||||
|
||||
# The Qt Quick rewrite in qt/: the grid logic and an end-to-end test of the QML UI on
|
||||
# desktop Qt (offscreen), then an APK. Its package is dev.ultra.launcher with the same key, so it installs over the WebView build
|
||||
# ; it updates itself from the launcher-qt-latest prerelease.
|
||||
qt-test:
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: jurplel/install-qt-action@v4
|
||||
with:
|
||||
version: "6.8.3"
|
||||
cache: true
|
||||
- name: Grid layout test
|
||||
run: node qt/tests/layout.test.mjs
|
||||
- name: Build and run the end-to-end test
|
||||
run: |
|
||||
sudo apt-get install -y ninja-build
|
||||
cmake -S qt -B build -G Ninja -DCMAKE_BUILD_TYPE=Release
|
||||
cmake --build build
|
||||
QT_QPA_PLATFORM=offscreen build/ultrahome_e2e
|
||||
Reference in new issue
Block a user