Repository navigation
Document development artifacts and preserve the soak recorder #9
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: ci | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| include: | |
| - python: "3.11" | |
| modern: "false" | |
| artifact: universal | |
| - python: "3.13" | |
| modern: "true" | |
| artifact: modern | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: 17 | |
| # Chaquopy builds against the exact minor on PATH. | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python }} | |
| # Runners already ship an SDK; just point at it and accept | |
| # licenses. (android-actions/setup-android is broken against | |
| # current cmdline-tools — it wants the obsolete `tools` package.) | |
| # AGP downloads platform/build-tools 35 itself on first build. | |
| - name: Android SDK | |
| run: | | |
| echo "ANDROID_HOME=/usr/local/lib/android/sdk" >> $GITHUB_ENV | |
| echo "ANDROID_SDK_ROOT=/usr/local/lib/android/sdk" >> $GITHUB_ENV | |
| yes | /usr/local/lib/android/sdk/cmdline-tools/latest/bin/sdkmanager --licenses >/dev/null 2>&1 || true | |
| - uses: gradle/actions/setup-gradle@v3 | |
| - name: Compile and lint Android runtime | |
| run: ./gradlew -PmodernRuntime=${{ matrix.modern }} :app:assembleDebug :app:assembleDebugAndroidTest :app:assembleRelease :app:lintDebug --no-daemon | |
| - name: Verify modern native alignment | |
| if: matrix.modern == 'true' | |
| run: python scripts/check_apk.py app/build/outputs/apk/debug/app-debug.apk --require-16k | |
| - name: Package development APK and checksum | |
| run: | | |
| mkdir -p dist | |
| cp app/build/outputs/apk/debug/app-debug.apk dist/muse-gadget-${{ matrix.artifact }}-debug.apk | |
| cd dist | |
| sha256sum *.apk > SHA256SUMS | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: muse-gadget-${{ matrix.artifact }}-debug | |
| path: dist/ | |
| retention-days: 14 | |
| if-no-files-found: error | |
| - name: Check documentation links | |
| run: python scripts/check_docs.py | |
| - name: Python overlay tests | |
| if: matrix.modern == 'false' | |
| run: | | |
| python3.11 -m pip install -q pytest==8.3.4 cryptography==42.0.8 websockets==17.2 paho-mqtt==2.1.0 | |
| PYTHONPATH=app/src/main/python:vendor/muse-gadget-sdk/linux/src \ | |
| python3.11 -m pytest app/src/main/python/androidtv/tests/ vendor/muse-gadget-sdk/linux/tests/ -q |