feat(crypto): Introduce separate crypto-only module (#114) #162
This file contains hidden or 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: Android CI | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Copy CI gradle.properties | |
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: 17 | |
- name: Set up Gradle | |
uses: gradle/actions/setup-gradle@v4 | |
- name: Clean project | |
run: ./gradlew clean | |
- name: Run lint | |
run: ./gradlew lint | |
- name: Run spotless | |
run: ./gradlew spotlessCheck --init-script gradle/init.gradle.kts --no-configuration-cache | |
- name: Run unit tests | |
run: ./gradlew testDebugUnitTest | |
- name: Upload test results (XML) | |
if: ${{ !cancelled() }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: unit-test-results | |
path: '**/build/test-results/test*UnitTest/**.xml' | |
- name: Assemble debug APK | |
run: ./gradlew assembleDebug | |
instrumented-test: | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
strategy: | |
matrix: | |
api-level: [ 26, 34 ] | |
steps: | |
- name: Delete unnecessary tools | |
uses: jlumbroso/free-disk-space@v1.3.1 | |
with: | |
android: false | |
tool-cache: true | |
dotnet: true | |
haskell: true | |
swap-storage: true | |
docker-images: false | |
large-packages: false | |
- 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 | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Copy CI gradle.properties | |
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: 17 | |
- name: Set up Gradle | |
uses: gradle/actions/setup-gradle@v4 | |
- name: Launch emulator and run instrumented tests | |
uses: reactivecircus/android-emulator-runner@v2 | |
with: | |
api-level: ${{ matrix.api-level }} | |
arch: x86_64 | |
disable-animations: true | |
disk-size: 6000M | |
heap-size: 600M | |
emulator-options: -no-snapshot -no-window -gpu swiftshader_indirect -noaudio | |
script: ./gradlew connectedAndroidTest --daemon | |
- name: Upload test reports | |
if: ${{ !cancelled() }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: test-reports-${{ matrix.api-level }} | |
path: '**/build/reports/androidTests' |