Skip to content

Set some dependency options to be multi-choice. #81

Set some dependency options to be multi-choice.

Set some dependency options to be multi-choice. #81

name: CI Android Emulator Tests
on:
push:
paths:
- 'android_jni/**'
pull_request:
paths:
- 'android_jni/**'
permissions:
contents: read
# Cancel the workflow if a new one is triggered from the same PR, branch, or tag, except on main.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
build-and-run-android-jni-tests:
runs-on: macos-latest
strategy:
fail-fast: false
steps:
- name: Checkout the repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Download and Setup the Android NDK
uses: nttld/setup-ndk@3354316c3285ea90da09d047280dd79d00d5a37a # v1.4.1
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@8b297075da4cd2a5f1fd21fe011b499edf06e9d2 # v4
- name: Setup cmake
uses: jwlawson/actions-setup-cmake@187efd9581ed20ee4e03c0dfb9ac2cd5896c4835 # v1.14.1
with:
cmake-version: "3.19.x"
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Setup meson
run: pip install meson
- name: Setup nasm
uses: ilammy/setup-nasm@v1
- name: Build dav1d with the Android NDK
working-directory: ext
run: bash dav1d_android.sh ${{ steps.setup-ndk.outputs.ndk-path }}
- name: Build libyuv with the Android NDK
working-directory: ext
run: bash libyuv_android.sh ${{ steps.setup-ndk.outputs.ndk-path }}
- name: Setup JDK
uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # v3.13.0
with:
java-version: '11'
distribution: 'zulu'
- name: Run Instrumented Tests on the Emulator
uses: reactivecircus/android-emulator-runner@d94c3fbe4fe6a29e4a5ba47c12fb47677c73656b # 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