diff --git a/.github/workflows/gradle-android-instrumented-tests.yml b/.github/workflows/gradle-android-instrumented-tests.yml index 99bb63f06b6..80065ada874 100644 --- a/.github/workflows/gradle-android-instrumented-tests.yml +++ b/.github/workflows/gradle-android-instrumented-tests.yml @@ -14,7 +14,7 @@ jobs: uses: ./.github/workflows/codestyle.yml gradle-run-tests: needs: [ detekt ] - runs-on: buildjet-4vcpu-ubuntu-2204 + runs-on: ubuntu-22.04 strategy: matrix: api-level: [ 30 ] @@ -25,8 +25,14 @@ jobs: with: fetch-depth: 0 + - name: Enable KVM group perms # For a faster emulator + 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: Set up JDK - uses: buildjet/setup-java@v3 + uses: actions/setup-java@v4 with: java-version: '17' distribution: 'temurin' @@ -42,36 +48,37 @@ jobs: run: | ./gradlew :samples:compileDebugSources - # - name: AVD cache - # uses: actions/cache@v3 - # 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.27.0 - # with: - # api-level: ${{ matrix.api-level }} - # force-avd-creation: false - # target: google_apis - # emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none - # cores: 4 - # ram-size: 4096M - # heap-size: 2048M - # disable-animations: false - # script: echo "Generated AVD snapshot for caching." + - name: AVD cache + uses: actions/cache@v4 + 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 + target: google_apis + emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none + cores: 2 + ram-size: 4096M + heap-size: 2048M + disable-animations: false + script: echo "Generated AVD snapshot for caching." - name: Android Instrumentation Tests - uses: reactivecircus/android-emulator-runner@v2.27.0 + uses: reactivecircus/android-emulator-runner@v2 with: api-level: ${{ matrix.api-level }} + force-avd-creation: false target: google_apis emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none - cores: 4 + cores: 2 ram-size: 4096M heap-size: 2048M script: ./gradlew connectedAndroidOnlyAffectedTest @@ -81,14 +88,14 @@ jobs: - name: Archive Test Reports if: always() - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: test-reports path: ./**/build/reports/tests/** - name: Archive Test Results if: always() - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: test-results path: | @@ -117,7 +124,7 @@ jobs: steps: - name: Download tests results - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 continue-on-error: true with: name: test-results diff --git a/.github/workflows/gradle-android-unit-tests.yml b/.github/workflows/gradle-android-unit-tests.yml index b375ac63b0b..6ceb7a45a34 100644 --- a/.github/workflows/gradle-android-unit-tests.yml +++ b/.github/workflows/gradle-android-unit-tests.yml @@ -50,14 +50,14 @@ jobs: - name: Archive Test Reports if: always() - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: test-reports path: ./**/build/reports/tests/** - name: Archive Test Results if: always() - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: test-results path: | @@ -86,7 +86,7 @@ jobs: steps: - name: Download tests results - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 continue-on-error: true with: name: test-results diff --git a/.github/workflows/gradle-ios-tests.yml b/.github/workflows/gradle-ios-tests.yml index 70075427d35..1ccf5ec0ba3 100644 --- a/.github/workflows/gradle-ios-tests.yml +++ b/.github/workflows/gradle-ios-tests.yml @@ -55,14 +55,14 @@ jobs: - name: Archive Test Reports if: always() - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: test-reports path: ./**/build/reports/tests/** - name: Archive Test Results if: always() - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: test-results path: | @@ -91,7 +91,7 @@ jobs: steps: - name: Download tests results - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 continue-on-error: true with: name: test-results diff --git a/.github/workflows/gradle-jvm-tests.yml b/.github/workflows/gradle-jvm-tests.yml index b0a3b0dcf2e..b8aaf718815 100644 --- a/.github/workflows/gradle-jvm-tests.yml +++ b/.github/workflows/gradle-jvm-tests.yml @@ -59,14 +59,14 @@ jobs: - name: Archive Test Reports if: always() - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: test-reports path: ./**/build/reports/tests/** - name: Archive Test Results if: always() - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: test-results path: ./**/build/test-results/**/*.xml @@ -89,7 +89,7 @@ jobs: files: "build/reports/kover/report.xml" - name: Archive Kover report - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: kover-report path: build/reports/kover/report.xml @@ -108,7 +108,7 @@ jobs: steps: - name: Download tests results - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 continue-on-error: true - name: Display structure of downloaded files run: ls -R