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

Fix android emulator runner error #104

Merged
merged 1 commit into from
May 23, 2024
Merged
Show file tree
Hide file tree
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
54 changes: 36 additions & 18 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Setup java
uses: actions/setup-java@v4
with:
distribution: temurin
distribution: 'zulu'
java-version: 17

- name: Decrypt secrets
Expand All @@ -37,14 +37,17 @@ jobs:
with:
gradle-home-cache-cleanup: true

- name: Build, lint and spotless
run: |
./gradlew --scan --stacktrace \
spotlessCheck \
assemble \
assembleAndroidTest \
metalavaCheckCompatibilityRelease \
lintDebug
- name: Check spotless
run: ./gradlew spotlessCheck --stacktrace

- name: Check metalava
run: ./gradlew metalavaCheckCompatibilityRelease --stacktrace

- name: Check lint
run: ./gradlew lintDebug --stacktrace

- name: Build all build type and flavor permutations
run: ./gradlew assemble --stacktrace

- name: Clean secrets
if: always()
Expand All @@ -57,10 +60,27 @@ jobs:

strategy:
matrix:
# Disable 21-23 for now as the devices seem to be flakey on CI
api-level: [ 24, 26, 30 ]
api-level: [ 22, 26, 30 ]

steps:
- name: Delete unnecessary tools 🔧
uses: jlumbroso/free-disk-space@v1.3.1
with:
android: false # Don't remove Android tools
tool-cache: true # Remove image tool cache - rm -rf "$AGENT_TOOLSDIRECTORY"
dotnet: true # rm -rf /usr/share/dotnet
haskell: true # rm -rf /opt/ghc...
swap-storage: true # rm -f /mnt/swapfile (4GiB)
docker-images: false # Takes 16s, enable if needed in the future
large-packages: false # includes google-cloud-sdk and it's slow

- 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

- uses: actions/checkout@v4

- name: Copy CI gradle.properties
Expand All @@ -69,7 +89,7 @@ jobs:
- name: Setup java
uses: actions/setup-java@v4
with:
distribution: temurin
distribution: 'zulu'
java-version: 17

- name: Decrypt secrets
Expand All @@ -89,11 +109,9 @@ jobs:
api-level: ${{ matrix.api-level }}
arch: x86_64
disable-animations: true
disk-size: 1500M
heap-size: 512M
script: |
adb logcat > logcat.txt &
./gradlew connectedCheck
disk-size: 6000M
heap-size: 600M
script: ./gradlew connectedDebugAndroidTest --daemon

- name: Clean secrets
if: always()
Expand Down Expand Up @@ -131,7 +149,7 @@ jobs:
- name: Setup java
uses: actions/setup-java@v4
with:
distribution: temurin
distribution: 'zulu'
java-version: 17

- name: Decrypt secrets
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Setup java
uses: actions/setup-java@v4
with:
distribution: temurin
distribution: 'zulu'
java-version: 17

- name: Setup Gradle
Expand Down
Loading