Add scrolling on-screen menu rails #178
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: Android CI | |
| on: | |
| push: | |
| branches: [ "master" ] | |
| pull_request: | |
| branches: [ "master" ] | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| name: Android build, lint, and APK review | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 35 | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - uses: actions/setup-java@03ad4de0992f5dab5e18fcb136590ce7c4a0ac95 # v5.6.0 | |
| with: | |
| distribution: temurin | |
| java-version: '21' | |
| cache: maven | |
| - uses: android-actions/setup-android@9fc6c4e9069bf8d3d10b2204b1fb8f6ef7065407 # v3.2.1 | |
| - name: Install Android 36 SDK packages | |
| run: sdkmanager --install "platforms;android-36" "build-tools;36.0.0" | |
| - name: Install same-checkout portable artifacts | |
| run: mvn -B -pl controller,ui-portable -am install -DskipTests -Dmaven.repo.local="$GITHUB_WORKSPACE/build/android-m2" | |
| - name: Test, lint, and assemble debug and R8 release APKs | |
| run: >- | |
| ./android/gradlew -p android --no-daemon | |
| -PcoffeeGbMavenRepository="$GITHUB_WORKSPACE/build/android-m2" | |
| :app:check :app:lintDebug :app:assembleDebug :app:assembleRelease | |
| :app:verifyDebugApkContents | |
| - name: Upload unsigned Android APKs and review reports | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: android-unsigned-apks-and-reports | |
| path: | | |
| android/app/build/outputs/apk/debug/app-debug.apk | |
| android/app/build/outputs/apk/release/app-release-unsigned.apk | |
| android/app/build/reports/android-dependencies.txt | |
| android/app/build/reports/android-license-inventory.txt | |
| android/app/build/reports/android-apk-contents.txt | |
| if-no-files-found: error | |
| instrumentation: | |
| name: Android instrumentation (API ${{ matrix.api-level }}) | |
| needs: build | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 35 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - api-level: 26 | |
| arch: x86 | |
| emulator-options: -no-window -noaudio -gpu swiftshader_indirect -no-snapshot -no-boot-anim -prop qemu.hw.mainkeys=0 | |
| - api-level: 36 | |
| arch: x86_64 | |
| emulator-options: -no-window -noaudio -gpu swiftshader_indirect -no-snapshot -no-boot-anim | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - uses: actions/setup-java@03ad4de0992f5dab5e18fcb136590ce7c4a0ac95 # v5.6.0 | |
| with: | |
| distribution: temurin | |
| java-version: '21' | |
| cache: maven | |
| - uses: android-actions/setup-android@9fc6c4e9069bf8d3d10b2204b1fb8f6ef7065407 # v3.2.1 | |
| - name: Install Android 36 SDK packages | |
| run: sdkmanager --install "platforms;android-36" "build-tools;36.0.0" | |
| - name: Install same-checkout portable artifacts | |
| run: mvn -B -pl controller,ui-portable -am install -DskipTests -Dmaven.repo.local="$GITHUB_WORKSPACE/build/android-m2" | |
| - name: Enable KVM for Android emulators | |
| run: | | |
| echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules | |
| sudo udevadm control --reload-rules | |
| sudo udevadm trigger --name-match=kvm | |
| - name: Run lifecycle smoke on an Android emulator | |
| uses: reactivecircus/android-emulator-runner@4c44018e59b437e86cdfc41da381398f93ed8808 # v2.35.0 | |
| with: | |
| api-level: ${{ matrix.api-level }} | |
| arch: ${{ matrix.arch }} | |
| emulator-options: ${{ matrix.emulator-options }} | |
| script: >- | |
| set +e; ./android/gradlew -p android --no-daemon -PcoffeeGbMavenRepository="$GITHUB_WORKSPACE/build/android-m2" :app:connectedDebugAndroidTest; test_status=$?; if [ "$test_status" -ne 0 ]; then test_failure=$(grep -R -h -m 1 '<failure ' android/app/build/outputs/androidTest-results/connected 2>/dev/null | cut -c1-3500 || true); if [ -n "$test_failure" ]; then printf '%s\n' "$test_failure" | sed 's/%/%25/g; s/\r/%0D/g; s/\n/%0A/g' | sed '1s/^/::error title=Android instrumentation failure::/'; else echo '::error title=Android instrumentation failure::connectedDebugAndroidTest failed but no XML failure report was found'; fi; adb logcat -d -v threadtime; fi; exit "$test_status" |