Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

handle GitHub's switch to M1 macs for macos-latest runners #981

Merged
merged 1 commit into from
Apr 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 38 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ jobs:

instrumentation-tests:
name: Instrumentation tests
runs-on: macos-latest
runs-on: ubuntu-latest
timeout-minutes: 20
strategy:
# Allow tests to continue on other devices if they fail on one device.
Expand All @@ -238,23 +238,57 @@ jobs:
java-version: '17'
check-latest: true

- name: Instrumentation Tests
- name: Enable KVM
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: AVD cache
uses: actions/cache/save@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # 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@6b0df4b0efb23bb0ec63d881db79aefbc976e4b2 # v2
with:
api-level: ${{ matrix.api-level }}
arch: x86_64
disable-animations: false
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
force-avd-creation: false
profile : Galaxy Nexus
ram-size : 4096M
target: default
script: echo "Generated AVD snapshot for caching."

- name: Instrumentation Tests
uses: reactivecircus/android-emulator-runner@6b0df4b0efb23bb0ec63d881db79aefbc976e4b2 # v2
with:
api-level: ${{ matrix.api-level }}
arch: x86_64
disable-animations: true
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
force-avd-creation: false
profile : Galaxy Nexus
ram-size : 4096M
target: default
script: ./gradlew connectedCheck --no-build-cache --no-daemon --stacktrace

- name: Upload results
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4
with:
name: insrumentation-test-results
name: instrumentation-test-results
path: ./**/build/reports/androidTests/connected/**

gradle-integration-tests:
name: Gradle integration tests
runs-on: macos-14
runs-on: macos-latest
timeout-minutes: 25

steps:
Expand Down
Loading