git.iko.soy/opencode-android
on 8205c19 help sign in
56 lines 1.4 kB history raw
1name: Build & Check
3on:
4 push:
5 branches: [master]
6 pull_request:
8# Cancel an in-progress run when a newer commit is pushed to the same ref, so CI minutes
9# aren't spent finishing a build that's already superseded.
10concurrency:
11 group: ${{ github.workflow }}-${{ github.ref }}
12 cancel-in-progress: true
14jobs:
15 # The Crux core is plain Rust — build and unit-test it natively (the Android
16 # shell mirrors this logic; see README).
17 core:
18 name: Crux core
19 runs-on: ubuntu-latest
20 steps:
21 - uses: actions/checkout@v4
22 - name: Test the Crux core
23 working-directory: shared
24 run: cargo test
26 build:
27 name: Android app
28 runs-on: ubuntu-latest
30 steps:
31 - uses: actions/checkout@v4
33 - uses: actions/setup-java@v4
34 with:
35 distribution: temurin
36 java-version: 17
38 - uses: android-actions/setup-android@v3
40 - uses: gradle/actions/setup-gradle@v4
42 - name: Run unit tests
43 run: ./gradlew testDebugUnitTest --no-daemon
45 - name: Lint
46 run: ./gradlew lintDebug --no-daemon
48 - name: Build debug APK
49 run: ./gradlew assembleDebug --no-daemon
51 - name: Upload debug APK
52 uses: actions/upload-artifact@v4
53 with:
54 name: opencode-debug.apk
55 path: app/build/outputs/apk/debug/*.apk
56 if-no-files-found: error