Skip to content

Commit

Permalink
Build runtime with an NDK version which is pre-installed on the GitHu…
Browse files Browse the repository at this point in the history
…b Actions runner
  • Loading branch information
mhsmith committed Jul 20, 2023
1 parent 3f85e74 commit 9a56db4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 11 deletions.
8 changes: 0 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,6 @@ jobs:
python$(target/list-versions.py --default) -m \
pip install -r product/runtime/requirements-build.txt
# TODO: move versions to a single location used by both CI and
# runtime/build.gradle. COMPILE_SDK_VERSION can then be removed from Common.java,
# since it's not used anywhere else.
- name: Set up Android SDK
run: |
$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager \
'cmake;3.22.1' 'ndk;22.1.7171670' 'platforms;android-30'
- uses: ./.github/actions/create-local-properties

- name: Build
Expand Down
6 changes: 4 additions & 2 deletions product/runtime/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,10 @@ for (abi in ["host"] + Common.ABIS) {
args ("-DCHAQUOPY_INCLUDE_JAVA=$javaHome/include;" +
"$javaHome/include/$javaIncludeSubdir")
} else {
// Should match the version in target/build-common.sh.
def ndkDir = sdkPath("ndk/22.1.7171670")
// This must be one of the NDK versions which are pre-installed on the
// GitHub Actions runner. Ideally it would also match the version in
// target/build-common.sh, but the latter is more difficult to change.
def ndkDir = sdkPath("ndk/23.2.8568313")
def prefixDir = "$projectDir/../../target/prefix/$abi"
args "-DCMAKE_TOOLCHAIN_FILE=$ndkDir/build/cmake/android.toolchain.cmake",
"-DANDROID_ABI=$abi", "-DANDROID_STL=system",
Expand Down
2 changes: 1 addition & 1 deletion target/build-common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# * The release notes (https://developer.android.com/ndk/downloads/revision_history)
# * https://android.googlesource.com/platform/ndk/+/ndk-release-rXX/docs/BuildSystemMaintainers.md,
# where XX is the NDK version. Do a diff against the version you're upgrading from.
ndk_version=22.1.7171670 # Should match ndkDir in product/runtime/build.gradle.
ndk_version=22.1.7171670 # See ndkDir in product/runtime/build.gradle.
ndk=${ANDROID_HOME:?}/ndk/$ndk_version
if ! [ -e $ndk ]; then
# Print all messages on stderr so they're visible when running within build-wheel.
Expand Down

0 comments on commit 9a56db4

Please sign in to comment.