Skip to content

Commit d8e4e80

Browse files
ci: update android CI workflow to use ubuntu-latest runner (#282)
1 parent 6eff2f0 commit d8e4e80

1 file changed

Lines changed: 10 additions & 32 deletions

File tree

.github/workflows/e2e.yml

Lines changed: 10 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -25,52 +25,33 @@ on:
2525

2626
jobs:
2727
android:
28-
# currently macos-12
29-
runs-on: macos-latest
28+
runs-on: ubuntu-latest
3029
timeout-minutes: 45
3130
steps:
3231
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
33-
- name: Create AVD and generate snapshot for caching
34-
if: steps.avd-cache.outputs.cache-hit != 'true'
35-
uses: reactivecircus/android-emulator-runner@v2
36-
with:
37-
api-level: 31
38-
force-avd-creation: false
39-
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
40-
disable-animations: false
41-
target: google_apis
42-
arch: x86_64
43-
profile: pixel_5
44-
script: echo "Generated AVD snapshot for caching."
4532
- uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8
4633
name: Install Node.js
4734
with:
4835
node-version: "18"
4936
- uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93
5037
with:
5138
distribution: "temurin"
52-
java-version: "11"
39+
java-version: "17"
40+
- name: Enable KVM
41+
run: |
42+
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
43+
sudo udevadm control --reload-rules
44+
sudo udevadm trigger --name-match=kvm
5345
- name: Gradle cache
54-
uses: gradle/gradle-build-action@v2
55-
46+
uses: gradle/actions/setup-gradle@v3
5647
- name: AVD cache
5748
uses: actions/cache@v3
5849
id: avd-cache
5950
with:
6051
path: |
6152
~/.android/avd/*
6253
~/.android/adb*
63-
key: avd-pixel
64-
- name: Clear Caches Optionally
65-
if: "${{ github.event.inputs.clearCaches != '' }}"
66-
shell: bash
67-
run: |
68-
du -sk ~/.gradle
69-
du -sk ~/.android
70-
rm -fr ~/.gradle
71-
rm -fr ~/.android
72-
du -sk ~/.gradle || echo ~/.gradle is gone
73-
du -sk ~/.android || echo ~/.android is gone
54+
key: avd-ubuntu
7455
- uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa
7556
with:
7657
channel: "stable"
@@ -96,13 +77,10 @@ jobs:
9677
with:
9778
working-directory: tests
9879
api-level: 31
99-
force-avd-creation: false
100-
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
101-
disable-animations: true
10280
target: google_apis
10381
arch: x86_64
10482
profile: pixel_5
105-
script: flutter devices && flutter test integration_test/firebase_ui_test.dart --dart-define=CI=true -d emulator-5554
83+
script: flutter test integration_test/firebase_ui_test.dart --dart-define=CI=true -d emulator-5554
10684

10785
ios:
10886
runs-on: macos-latest

0 commit comments

Comments
 (0)