diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 0467fc8..8e99f14 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -26,7 +26,7 @@ jobs: - name: Setup java uses: actions/setup-java@v4 with: - distribution: temurin + distribution: 'zulu' java-version: 17 - name: Decrypt secrets @@ -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() @@ -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 @@ -69,7 +89,7 @@ jobs: - name: Setup java uses: actions/setup-java@v4 with: - distribution: temurin + distribution: 'zulu' java-version: 17 - name: Decrypt secrets @@ -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() @@ -131,7 +149,7 @@ jobs: - name: Setup java uses: actions/setup-java@v4 with: - distribution: temurin + distribution: 'zulu' java-version: 17 - name: Decrypt secrets diff --git a/.github/workflows/publish-docs.yml b/.github/workflows/publish-docs.yml index f989b91..eaa1964 100644 --- a/.github/workflows/publish-docs.yml +++ b/.github/workflows/publish-docs.yml @@ -20,7 +20,7 @@ jobs: - name: Setup java uses: actions/setup-java@v4 with: - distribution: temurin + distribution: 'zulu' java-version: 17 - name: Setup Gradle