blob: 9503dd47bb8bc3175b6a1e04a428c8d3b7357c6e [file] [log] [blame]
name: CI
on:
push:
paths:
- 'android_jni/**'
pull_request:
paths:
- 'android_jni/**'
permissions:
contents: read
jobs:
build-and-run-android-jni-tests:
runs-on: macos-latest
strategy:
fail-fast: false
steps:
- name: Checkout the repository
uses: actions/checkout@v3
- name: Download and Setup the Android NDK
uses: nttld/setup-ndk@v1
id: setup-ndk
with:
# r25c is the same as 25.2.9519653.
ndk-version: r25c
add-to-path: false
- name: Setup ninja
uses: seanmiddleditch/gha-setup-ninja@v3
- name: Setup cmake
uses: jwlawson/actions-setup-cmake@v1.13
with:
# This is the minimum cmake version needed to build libgav1.
cmake-version: '3.7.x'
- name: Build libgav1 with the Android NDK
working-directory: ext
run: bash libgav1_android.sh ${{ steps.setup-ndk.outputs.ndk-path }}
- name: Setup JDK
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'zulu'
- name: Run Instrumented Tests on the Emulator
uses: reactivecircus/android-emulator-runner@v2.28.0
with:
working-directory: android_jni
api-level: 30
force-avd-creation: false
# This is the same version of cmake that is found in build.gradle.
# This will be used to build libavif and the JNI bindings.
cmake: 3.22.1
ndk: 25.2.9519653
arch: x86_64
script: ./gradlew cAT