Skip to content

Setup Android NDK

Actions
Setup an Android NDK environment by downloading and optionally caching it and adding it to the PATH
v1.5.0
Latest
Star (69)

Tags

 (1)

setup-ndk

This action sets up an Android NDK environment by downloading and caching a version of the NDK and optionally adding it to the PATH and linking it to the Android SDK.

Usage

See action.yml

Basic

steps:
  - uses: actions/checkout@v3
  - uses: nttld/setup-ndk@v1
    with:
      ndk-version: r26d
  - run: ndk-build NDK_PROJECT_PATH=. APP_BUILD_SCRIPT=./Android.mk NDK_APPLICATION_MK=./Application.mk

Using the installation path

steps:
  - uses: actions/checkout@v3
  - uses: nttld/setup-ndk@v1
    id: setup-ndk
    with:
      ndk-version: r21e
      add-to-path: false
  - run: ./build.sh
    env:
      ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}

Linking to the SDK

steps:
  - uses: actions/checkout@v3
  - uses: nttld/setup-ndk@v1
    id: setup-ndk
    with:
      ndk-version: r26d
      link-to-sdk: true
  - run: ./gradlew build

Caching locally for the workflow

steps:
  - uses: actions/checkout@v3
  - uses: nttld/setup-ndk@v1
    with:
      ndk-version: r21e
      local-cache: true

Setup Android NDK is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Setup an Android NDK environment by downloading and optionally caching it and adding it to the PATH
v1.5.0
Latest

Tags

 (1)

Setup Android NDK is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.