Use flake for PR build workflows #59
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 App PR Build | |
| permissions: | |
| contents: read | |
| on: | |
| pull_request: | |
| branches: [ master ] | |
| jobs: | |
| build-android: | |
| runs-on: ubuntu-latest-8-cores | |
| steps: | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # was v4 | |
| with: | |
| persist-credentials: false | |
| - name: Install Nix | |
| uses: DeterminateSystems/nix-installer-action@ef8a148080ab6020fd15196c2084a2eea5ff2d25 # was v22 | |
| - name: Cache Bun dependencies | |
| uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # was v4 | |
| with: | |
| path: | | |
| ~/.bun/install/cache | |
| key: ${{ runner.os }}-bun-${{ hashFiles('frontend/bun.lock') }} | |
| - name: Cache Gradle | |
| uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # was v4 | |
| with: | |
| path: | | |
| ~/.gradle/caches | |
| ~/.gradle/wrapper | |
| key: ${{ runner.os }}-gradle-${{ hashFiles('frontend/src-tauri/gen/android/**/*.gradle*', 'frontend/src-tauri/gen/android/gradle/wrapper/gradle-wrapper.properties') }} | |
| restore-keys: | | |
| ${{ runner.os }}-gradle- | |
| - name: Cache sccache | |
| uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # was v4 | |
| with: | |
| path: ~/.cache/sccache | |
| key: ${{ runner.os }}-sccache-android-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-sccache-android- | |
| ${{ runner.os }}-sccache- | |
| - name: Build Tauri Android App (debug) | |
| run: nix develop .#android -c ./scripts/ci/android-pr.sh | |
| - name: Show sccache stats | |
| if: always() | |
| run: nix develop .#android -c sccache --show-stats | |
| - name: Upload Android PR APK | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # was v4 | |
| with: | |
| name: maple-android-debug-apk | |
| path: | | |
| frontend/src-tauri/gen/android/app/build/outputs/apk/universal/debug/app-universal-debug.apk | |
| frontend/src-tauri/target/reproducibility/android-pr-*.sha256 | |
| retention-days: 5 |