Skip to content

android_jni: Set threads to 2 instead of CPU count #3851

android_jni: Set threads to 2 instead of CPU count

android_jni: Set threads to 2 instead of CPU count #3851

Workflow file for this run

name: CI Android JNI
on: [push, pull_request]
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-android-jni:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Checkout the repository
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- name: Download and Setup the Android NDK
uses: nttld/setup-ndk@afb4c9964b521afb97c864b7d40b11e6911bd410 # v1.5.0
id: setup-ndk
with:
# r25c is the same as 25.2.9519653.
ndk-version: r25c
add-to-path: false
- uses: ./.github/actions/setup-linux
with:
codec-aom: "LOCAL"
codec-dav1d: "LOCAL"
- name: Setup JDK
uses: actions/setup-java@b36c23c0d998641eff861008f374ee103c25ac73 # v4.4.0
with:
distribution: "zulu"
java-version: 17
- name: Download and Setup the Android SDK
uses: android-actions/setup-android@00854ea68c109d98c75d956347303bf7c45b0277 # v3.2.1
- name: Install CMake in the Android SDK
# This is the same version of cmake that is found in build.gradle. This
# will be used to build libavif and the JNI bindings.
run: sdkmanager "cmake;3.22.1"
- name: Build the libavif JNI Wrapper
working-directory: android_jni
run: ./gradlew --no-daemon assembleRelease
env:
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}