Skip to content

Commit

Permalink
ci: switch from macos-latest -> ubuntu-latest + KVM (#239)
Browse files Browse the repository at this point in the history
  • Loading branch information
ashishb authored Apr 7, 2024
1 parent 29f5558 commit 93a4581
Show file tree
Hide file tree
Showing 17 changed files with 107 additions and 16 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/adbe-unittests-api16.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ concurrency:

jobs:
testOnAndroidApi16:
runs-on: macos-latest
runs-on: ubuntu-latest
# This test is slower compared to the other tests
timeout-minutes: 20

Expand All @@ -38,6 +38,13 @@ jobs:
- name: checkout
uses: actions/checkout@v4

# Ref: https://github.com/ReactiveCircus/android-emulator-runner?tab=readme-ov-file#running-hardware-accelerated-emulators-on-linux-runners
- 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: Gradle cache
uses: gradle/gradle-build-action@v3

Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/adbe-unittests-api21.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ concurrency:

jobs:
test:
runs-on: macos-latest
runs-on: ubuntu-latest
timeout-minutes: 15

strategy:
Expand All @@ -26,6 +26,13 @@ jobs:
- name: checkout
uses: actions/checkout@v4

# Ref: https://github.com/ReactiveCircus/android-emulator-runner?tab=readme-ov-file#running-hardware-accelerated-emulators-on-linux-runners
- 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: Gradle cache
uses: gradle/gradle-build-action@v3

Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/adbe-unittests-api22.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ concurrency:

jobs:
testOnApi22:
runs-on: macos-latest
runs-on: ubuntu-latest
timeout-minutes: 15

strategy:
Expand All @@ -26,6 +26,13 @@ jobs:
- name: checkout
uses: actions/checkout@v4

# Ref: https://github.com/ReactiveCircus/android-emulator-runner?tab=readme-ov-file#running-hardware-accelerated-emulators-on-linux-runners
- 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: Gradle cache
uses: gradle/gradle-build-action@v3

Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/adbe-unittests-api23.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ concurrency:

jobs:
testOnAp23:
runs-on: macos-latest
runs-on: ubuntu-latest
timeout-minutes: 15

strategy:
Expand All @@ -26,6 +26,13 @@ jobs:
- name: checkout
uses: actions/checkout@v4

# Ref: https://github.com/ReactiveCircus/android-emulator-runner?tab=readme-ov-file#running-hardware-accelerated-emulators-on-linux-runners
- 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: Gradle cache
uses: gradle/gradle-build-action@v3

Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/adbe-unittests-api24.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ concurrency:

jobs:
testOnApi24:
runs-on: macos-latest
runs-on: ubuntu-latest
timeout-minutes: 15

strategy:
Expand All @@ -29,6 +29,13 @@ jobs:
- name: Gradle cache
uses: gradle/gradle-build-action@v3

# Ref: https://github.com/ReactiveCircus/android-emulator-runner?tab=readme-ov-file#running-hardware-accelerated-emulators-on-linux-runners
- 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@v4
id: avd-cache
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/adbe-unittests-api25.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ concurrency:

jobs:
testOnApi25:
runs-on: macos-latest
runs-on: ubuntu-latest
timeout-minutes: 15

strategy:
Expand All @@ -26,6 +26,13 @@ jobs:
- name: checkout
uses: actions/checkout@v4

# Ref: https://github.com/ReactiveCircus/android-emulator-runner?tab=readme-ov-file#running-hardware-accelerated-emulators-on-linux-runners
- 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: Gradle cache
uses: gradle/gradle-build-action@v3

Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/adbe-unittests-api26.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ concurrency:

jobs:
testOnApi26:
runs-on: macos-latest
runs-on: ubuntu-latest
timeout-minutes: 15

strategy:
Expand All @@ -26,6 +26,13 @@ jobs:
- name: checkout
uses: actions/checkout@v4

# Ref: https://github.com/ReactiveCircus/android-emulator-runner?tab=readme-ov-file#running-hardware-accelerated-emulators-on-linux-runners
- 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: Gradle cache
uses: gradle/gradle-build-action@v3

Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/adbe-unittests-api27.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ concurrency:

jobs:
testOnApi27:
runs-on: macos-latest
runs-on: ubuntu-latest
timeout-minutes: 15

strategy:
Expand All @@ -26,6 +26,13 @@ jobs:
- name: checkout
uses: actions/checkout@v4

# Ref: https://github.com/ReactiveCircus/android-emulator-runner?tab=readme-ov-file#running-hardware-accelerated-emulators-on-linux-runners
- 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: Gradle cache
uses: gradle/gradle-build-action@v3

Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/adbe-unittests-api28.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ concurrency:

jobs:
testOnApi28:
runs-on: macos-latest
runs-on: ubuntu-latest
timeout-minutes: 15

strategy:
Expand All @@ -26,6 +26,13 @@ jobs:
- name: checkout
uses: actions/checkout@v4

# Ref: https://github.com/ReactiveCircus/android-emulator-runner?tab=readme-ov-file#running-hardware-accelerated-emulators-on-linux-runners
- 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: Gradle cache
uses: gradle/gradle-build-action@v3

Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/adbe-unittests-api29.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ concurrency:

jobs:
testOnApi29:
runs-on: macos-latest
runs-on: ubuntu-latest
timeout-minutes: 15

strategy:
Expand All @@ -26,6 +26,13 @@ jobs:
- name: checkout
uses: actions/checkout@v4

# Ref: https://github.com/ReactiveCircus/android-emulator-runner?tab=readme-ov-file#running-hardware-accelerated-emulators-on-linux-runners
- 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: Gradle cache
uses: gradle/gradle-build-action@v3

Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/adbe-unittests-api30.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ concurrency:

jobs:
testOnApi30:
runs-on: macos-latest
runs-on: ubuntu-latest
timeout-minutes: 15

strategy:
Expand All @@ -29,6 +29,13 @@ jobs:
- name: checkout
uses: actions/checkout@v4

# Ref: https://github.com/ReactiveCircus/android-emulator-runner?tab=readme-ov-file#running-hardware-accelerated-emulators-on-linux-runners
- 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: Gradle cache
uses: gradle/gradle-build-action@v3

Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/adbe-unittests-api31.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ concurrency:

jobs:
testOnApi31:
runs-on: macos-latest
runs-on: ubuntu-latest
timeout-minutes: 15

strategy:
Expand All @@ -29,6 +29,13 @@ jobs:
- name: checkout
uses: actions/checkout@v4

# Ref: https://github.com/ReactiveCircus/android-emulator-runner?tab=readme-ov-file#running-hardware-accelerated-emulators-on-linux-runners
- 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: Gradle cache
uses: gradle/gradle-build-action@v3

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/adbe-unittests-api32.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ jobs:
- name: checkout
uses: actions/checkout@v4

# Ref: https://github.com/ReactiveCircus/android-emulator-runner?tab=readme-ov-file#running-hardware-accelerated-emulators-on-linux-runners
- name: Enable KVM
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/adbe-unittests-api33.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ concurrency:

jobs:
testOnApi33:
runs-on: macos-latest
runs-on: ubuntu-latest
# This test is slow
timeout-minutes: 30

Expand All @@ -32,6 +32,13 @@ jobs:
- name: checkout
uses: actions/checkout@v4

# Ref: https://github.com/ReactiveCircus/android-emulator-runner?tab=readme-ov-file#running-hardware-accelerated-emulators-on-linux-runners
- 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: Gradle cache
uses: gradle/gradle-build-action@v3

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/adbe-unittests-api34.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ jobs:
- name: checkout
uses: actions/checkout@v4

# Ref: https://github.com/ReactiveCircus/android-emulator-runner?tab=readme-ov-file#running-hardware-accelerated-emulators-on-linux-runners
- name: Enable KVM
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/adbe-unittests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ concurrency:

jobs:
unittestsApi21And26:
runs-on: macos-latest
runs-on: ubuntu-latest
timeout-minutes: 30

strategy:
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/install-adb-enhanced-from-homebrew.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ jobs:

- name: Install adb-enhanced from homebrew
run: |
# TODO(ashishb): Remove update after Aug 1, 2023
brew update || echo "brew update failed, still proceeding"
brew link --force [email protected]
HOMEBREW_NO_INSTALL_CLEANUP=true brew install --verbose adb-enhanced || echo "brew install returned non-zero exit code"
adbe --version
Expand Down

0 comments on commit 93a4581

Please sign in to comment.