From ffd9c481bb0bad2b499182a4a77fb962b3c8ce4b Mon Sep 17 00:00:00 2001 From: Michael Rozumyanskiy Date: Thu, 17 Oct 2024 21:43:45 +0400 Subject: [PATCH] Try and fix build on GitHub Actions (#54) --- .github/workflows/build.yml | 33 ++++++++++++--------------------- 1 file changed, 12 insertions(+), 21 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6f22251d..4dc780d8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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