Travis-CI: Use Android NDK r13b specifically
authorDavid Neto <dneto@google.com>
Wed, 11 Jul 2018 19:31:36 +0000 (15:31 -0400)
committerDavid Neto <dneto@google.com>
Thu, 12 Jul 2018 16:02:26 +0000 (12:02 -0400)
The Travis-CI bot downloads a copy of the Android NDK.  The source
we get it from recently updated to Android NDK r17b.  However,
the android.toolchain.cmake file does not know how to parse the
Android native API level from that version of the NDK.  So check
out the NDK r13b version that we were using until yesterday.

Fixes #1439

.travis.yml

index 4fe4b5e..67bc273 100644 (file)
@@ -50,8 +50,16 @@ install:
     fi
   # Download Android NDK and Android CMake toolchain file.
   - if [[ "$BUILD_NDK" == "ON" ]]; then
-      git clone --depth=1 https://github.com/urho3d/android-ndk.git $HOME/android-ndk;
+      # Unfortunately the android.toolchain.cmake file does not understand how to
+      # get the API level from Android NDK r17b.  So fall back on r13b.
+      # Get only one commit at tag r13b.
       export ANDROID_NDK=$HOME/android-ndk;
+      git init $ANDROID_NDK;
+      pushd $ANDROID_NDK;
+        git remote add urho3d https://github.com/urho3d/android-ndk.git;
+        git fetch --depth=1 urho3d r13b;
+        git checkout FETCH_HEAD;
+      popd;
       git clone --depth=1 https://github.com/taka-no-me/android-cmake.git $HOME/android-cmake;
       export TOOLCHAIN_PATH=$HOME/android-cmake/android.toolchain.cmake;
     fi