GitHub Actions update
📅 2022/07/22
There are two big changes that happened in GitHub Actions:
Android NDK
Android NDK 22 on GitHub Actions was replaced in favor of 24, version 23 will be set as the default one: https://github.com/actions/virtual-environments/issues/5595.
And Android ndk-bundle along with old NDK versions will be deprecated: https://github.com/actions/virtual-environments/issues/5879. The ANDROID_NDK_HOME
doesn’t exist anymore, you need to replace it to ANDROID_NDK_LATEST_HOME
cross your project.
For NAPI-RS projects, there may some issues with the new NDK:
- The
arm-linux-androideabi-strip
andaarch64-linux-android-strip
don’t exist anymore, we need to usellvm-strip
to replace them in pipeline. So if your pipeline failed because thearm-linux-androideabi-strip
oraarch64-linux-android-strip
doesn’t exist, please replace them tollvm-strip
instead:
- ${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/arm-linux-androideabi-strip *.node
+ ${ANDROID_NDK_LATEST_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip *.node
- ${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-androideabi-strip *.node
+ ${ANDROID_NDK_LATEST_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip *.node
- The
arm-linux-androideabi-ar
andaarch64-linux-androideabi-ar
doesn’t exist on NDK bin path anymore, your build may failed with error occurred: Failed to find tool. Isarm-linux-androideabi-ar
installed? or error occurred: Failed to find tool. Isaarch64-linux-androideabi-ar
installed?. You need to exportAR
environment variable to point to the correctar
path:
export CXX="${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi24-clang++"
+ export AR="${ANDROID_NDK_LATEST_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar"
export PATH="${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin:${PATH}"
export CXX="${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-androideabi24-clang++"
+ export AR="${ANDROID_NDK_LATEST_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar"
export PATH="${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin:${PATH}"
macOS 10.15 is being deprecated
This does not affect the macOS builds, but it will make the freebsd-x64
pipeline fail. You can easily fix it by upgrading the vmactions/freebsd-vm
:
build-freebsd:
- runs-on: macos-10.15
+ runs-on: macos-12
name: Build FreeBSD
steps:
- uses: actions/checkout@v3
- name: Build
id: build
- uses: vmactions/freebsd-vm@v0.1.6
+ uses: vmactions/freebsd-vm@v0
Happy hacking :)