commit a55daa95e29688d6ddf7a443e034c6b625a3833c parent 69eba72544ff9837ce829ba1add30a7a84406530 Author: Erik Agsjö <erik.agsjo@gmail.com> Date: Sun, 12 Dec 2021 23:15:41 +0100 More stuff needed Diffstat:
| M | .github/workflows/android.yml | | | 42 | ++++++++++++++++++++++++++++++++++++++++-- |
1 file changed, 40 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml @@ -10,6 +10,10 @@ jobs: build: name: Test runs-on: macos-latest + strategy: + matrix: + api-level: [29] + steps: - name: Set up Go 1.17 @@ -18,12 +22,46 @@ jobs: go-version: 1.17 id: go + - uses: actions/setup-java@v2 + with: + java-version: '11' + - name: Check out code uses: actions/checkout@v2 + - name: Gradle cache + uses: actions/cache@v2 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}-${{ hashFiles('**/buildSrc/**/*.kt') }} + + - name: AVD cache + uses: actions/cache@v2 + id: avd-cache + with: + path: | + ~/.android/avd/* + ~/.android/adb* + key: avd-${{ matrix.api-level }} + + - name: create AVD and generate snapshot for caching + if: steps.avd-cache.outputs.cache-hit != 'true' + uses: reactivecircus/android-emulator-runner@v2 + with: + api-level: ${{ matrix.api-level }} + force-avd-creation: false + emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none + disable-animations: false + script: echo "Generated AVD snapshot for caching." + - name: Run tests uses: reactivecircus/android-emulator-runner@v2 with: working-directory: ./testrig/android - api-level: 29 - script: (go run ../rig.go &) && ./gradlew connectedCheck + api-level: ${{ matrix.api-level }} + force-avd-creation: false + emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none + disable-animations: true + script: (go run ../rig.go -serve &) && ./gradlew connectedCheck