Skip to content

Fix JNI ERROR

Fix JNI ERROR #173

Workflow file for this run

name: tests
on: [push, pull_request]
jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
api: [26, 27, 28, 29, 30, 31]
arch: [x86, x86_64]
exclude:
- api: 30
arch: x86
- api: 31
arch: x86
env:
ANDROID_EMULATOR_WAIT_TIME_BEFORE_KILL: 200 # Default is 20
steps:
- name: Check out repo
uses: actions/checkout@v4
- 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*
key: avd-${{ matrix.api }}-${{ matrix.arch }}
- 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 }}
arch: ${{ matrix.arch }}
force-avd-creation: false
emulator-options: -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 in emulator
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.api }}
arch: ${{ matrix.arch }}
force-avd-creation: false
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: true
script: >-
sdkmanager "platforms;android-${{ matrix.api }}"
&& PATH="$ANDROID_SDK_ROOT/build-tools/34.0.0:$PATH"
ANDROID_ARCH=${{ matrix.arch }}
ANDROID_ABI=${{ matrix.arch }}
ANDROID_API_LEVEL=${{ matrix.api }}
ANDROID_LIBDIR=/system/${{ contains(matrix.arch, '64') && 'lib64' || 'lib' }}
make check