Skip to content

Commit

Permalink
Try and fix build on GitHub Actions (#54)
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelRocks authored Oct 17, 2024
1 parent af6dd38 commit e2b0564
Showing 1 changed file with 12 additions and 21 deletions.
33 changes: 12 additions & 21 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,44 +5,35 @@ env:
GRADLE_OPTS: "-Dorg.gradle.jvmargs=-Xmx4g -Dorg.gradle.daemon=false -Dkotlin.incremental=false"
jobs:
build:
name: Build
name: Build and test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: gradle/wrapper-validation-action@v1
- uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 19
- uses: gradle/gradle-build-action@v2
- run: ./gradlew check

test:
name: Test
runs-on: macos-latest
strategy:
matrix:
api-level: [ 21, 29 ]
target: [ default ]
arch: [ x86_64 ]
needs:
- build
steps:
- uses: actions/checkout@v3
- uses: gradle/wrapper-validation-action@v1
- uses: actions/setup-java@v3
- uses: actions/checkout@v4
- uses: gradle/actions/wrapper-validation@v3
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 19
- uses: gradle/gradle-build-action@v2
- uses: gradle/actions/setup-gradle@v3
- run: ./gradlew check
- name: AVD cache
uses: actions/cache@v3
uses: actions/cache@v4
id: avd-cache
with:
path: |
~/.android/avd/*
~/.android/adb*
key: avd-${{ matrix.api-level }}
- name: Enable KVM group perms
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: Create AVD and generate snapshot for caching
if: steps.avd-cache.outputs.cache-hit != 'true'
uses: reactivecircus/android-emulator-runner@v2
Expand Down

0 comments on commit e2b0564

Please sign in to comment.