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 #80

Merged
merged 1 commit into from
Jun 1, 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
56 changes: 40 additions & 16 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 @@ -61,6 +64,24 @@ jobs:
api-level: [ 24, 26, 29 ]

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 +90,7 @@ jobs:
- name: Setup java
uses: actions/setup-java@v4
with:
distribution: temurin
distribution: 'zulu'
java-version: 17

- name: Decrypt secrets
Expand All @@ -87,10 +108,11 @@ jobs:
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.api-level }}
profile: Nexus 5X
script: |
adb logcat > logcat.txt &
./gradlew --scan connectedCheck
arch: x86_64
disable-animations: true
disk-size: 6000M
heap-size: 600M
script: ./gradlew connectedDebugAndroidTest --daemon

- name: Clean secrets
if: always()
Expand All @@ -108,7 +130,9 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: test-results-${{ matrix.api-level }}
path: "**/build/outputs/*/connected/*.xml"
path: |
**/build/reports/*
**/build/outputs/*/connected/*

deploy:
if: github.event_name == 'push' # only deploy for pushed commits (not PRs)
Expand All @@ -128,7 +152,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