Skip to content
This repository has been archived by the owner on Aug 12, 2024. It is now read-only.

Remove workflow cache and add todo for future #35

Remove workflow cache and add todo for future

Remove workflow cache and add todo for future #35

Workflow file for this run

name: kmp-advcrypto
on:
push:
# TODO: Add Gradle cache and don't create Android SDK if SDK was cached
jobs:
build-linux:
name: Linux Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'zulu'
architecture: 'x64'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5
- name: Build and Test
run: ./gradlew :kmp-advcrypto:cleanLinuxX64Test :kmp-advcrypto:linuxX64Test
build-android:
name: Android Tests
runs-on: ubuntu-latest
strategy:
matrix:
api-level: [30, 31, 32, 33]
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'zulu'
architecture: 'x64'
- name: Enable KVM
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: AVD cache
uses: actions/cache@v4
id: avd-cache
with:
path: |
~/.android/avd/*
~/.android/adb*
~/usr/local/lib/android/*
key: kmp-advcrypto-avd-${{ matrix.api-level }}
- name: Create AVD and generate snapshot for caching
if: steps.avd-cache.outputs.cache-hit != 'true'
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.api-level }}
profile: Nexus 6
arch: x86_64
force-avd-creation: false
emulator-options: -no-snapshot -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: false
script: echo "Generated AVD snapshot for caching."
- name: Run tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.api-level }}
profile: Nexus 6
arch: x86_64
force-avd-creation: false
disable-animations: true
emulator-options: -no-snapshot -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
script: ./gradlew :kmp-advcrypto:connectedDebugAndroidTest --info