Skip to content

Commit

Permalink
mod: use ubuntu to build
Browse files Browse the repository at this point in the history
  • Loading branch information
joeloewi7178 committed Jul 8, 2024
1 parent 8ca51c5 commit 80c119d
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 18 deletions.
25 changes: 16 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,18 @@ jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: macos-latest-large
runs-on: ubuntu-latest
timeout-minutes: 120

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- 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
ls /dev/kvm
- name: Checkout
uses: actions/checkout@v4

Expand All @@ -32,7 +39,7 @@ jobs:
java-version: '17'

- name: Install GMD image for baseline profile generation
run: yes | "$ANDROID_HOME"/cmdline-tools/latest/bin/sdkmanager "system-images;android-34;aosp_atd;x86_64"
run: yes | "$ANDROID_HOME"/cmdline-tools/latest/bin/sdkmanager "system-images;android-33;aosp_atd;x86_64"

- name: Accept Android licenses
run: yes | "$ANDROID_HOME"/cmdline-tools/latest/bin/sdkmanager --licenses || true
Expand All @@ -50,13 +57,13 @@ jobs:
fileDir: './'
encodedString: ${{ secrets.SIGNING_KEY }}

- name: Generate baseline profile
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 34
target: aosp_atd
arch: x86_64
script: ./gradlew :app:bundleRelease
- name: Build release variant including baseline profile generation
run: ./gradlew :app:assembleRelease
-Pandroid.testInstrumentationRunnerArguments.androidx.benchmark.enabledRules=BaselineProfile
-Pandroid.testoptions.manageddevices.emulator.gpu="swiftshader_indirect"
-Pandroid.experimental.testOptions.managedDevices.emulator.showKernelLogging=true
-Pandroid.experimental.androidTest.numManagedDeviceShards=1
-Pandroid.experimental.testOptions.managedDevices.maxConcurrentDevices=1

- name: Upload Android Release to Play Store
uses: r0adkll/upload-google-play@v1
Expand Down
25 changes: 16 additions & 9 deletions .github/workflows/on_pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,18 @@ jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: macos-latest-large
runs-on: ubuntu-latest
timeout-minutes: 120

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- 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
ls /dev/kvm
- name: Checkout
uses: actions/checkout@v4

Expand All @@ -32,7 +39,7 @@ jobs:
java-version: '17'

- name: Install GMD image for baseline profile generation
run: yes | "$ANDROID_HOME"/cmdline-tools/latest/bin/sdkmanager "system-images;android-34;aosp_atd;x86_64"
run: yes | "$ANDROID_HOME"/cmdline-tools/latest/bin/sdkmanager "system-images;android-33;aosp_atd;x86_64"

- name: Accept Android licenses
run: yes | "$ANDROID_HOME"/cmdline-tools/latest/bin/sdkmanager --licenses || true
Expand All @@ -50,10 +57,10 @@ jobs:
fileDir: './'
encodedString: ${{ secrets.SIGNING_KEY }}

- name: Generate baseline profile
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 34
target: aosp_atd
arch: x86_64
script: ./gradlew :app:bundleRelease
- name: Build release variant including baseline profile generation
run: ./gradlew :app:assembleRelease
-Pandroid.testInstrumentationRunnerArguments.androidx.benchmark.enabledRules=BaselineProfile
-Pandroid.testoptions.manageddevices.emulator.gpu="swiftshader_indirect"
-Pandroid.experimental.testOptions.managedDevices.emulator.showKernelLogging=true
-Pandroid.experimental.androidTest.numManagedDeviceShards=1
-Pandroid.experimental.testOptions.managedDevices.maxConcurrentDevices=1

0 comments on commit 80c119d

Please sign in to comment.