free up some disk space and reduce logging verbosity further #25
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build | |
on: | |
pull_request: | |
paths-ignore: | |
- "**.md" | |
push: | |
paths-ignore: | |
- "**.md" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the code | |
uses: actions/checkout@v4 | |
- name: Validate Gradle wrapper | |
uses: gradle/wrapper-validation-action@v2 | |
- uses: actions/setup-java@v4 | |
with: | |
java-version: "17" | |
distribution: "temurin" | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v3 | |
- name: Delete unnecessary tools to free up some space | |
uses: jlumbroso/[email protected] | |
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 | |
- name: Accept Android licenses | |
run: yes | "$ANDROID_HOME"/cmdline-tools/latest/bin/sdkmanager --licenses || true | |
- name: Run instrumented tests | |
run: | | |
./gradlew cleanManagedDevices --unused-only && \ | |
./gradlew devicesGroupdebugAndroidTest \ | |
-Dorg.gradle.workers.max=1 \ | |
-Pandroid.testoptions.manageddevices.emulator.gpu=swiftshader_indirect \ | |
-Pandroid.experimental.testOptions.managedDevices.maxConcurrentDevices=1 | |
- name: Build the app | |
run: ./gradlew build | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: apk | |
path: app/build/outputs/apk/debug/app-debug.apk |