diff options
author | Marcel Metz <[email protected]> | 2017-03-06 11:24:57 +0100 |
---|---|---|
committer | Marcel Metz <[email protected]> | 2017-03-06 11:39:39 +0100 |
commit | 099b0a1f7cfc8ca12b8c4f993026f69aea5fab99 (patch) | |
tree | 653e8b0b66fc19f80405ace7de5cc9d1a5ed7d0b | |
parent | 6a067d9f7eda65fd8ca5ebafa812745d5a03d907 (diff) |
Only download and strip Android NDK when not cached
-rw-r--r-- | .travis.yml | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/.travis.yml b/.travis.yml index 44702c88..c24cd95b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,16 +27,18 @@ install: fi - > if [[ "${TRAVIS_OS_NAME}" == "linux" && "${BUILD_ANDROID}" == "true" ]]; then - curl -o ~/android-ndk.zip https://dl.google.com/android/repository/android-ndk-r14-linux-x86_64.zip - unzip -q ~/android-ndk.zip -d ~ \ - 'android-ndk-r14/build/cmake/*' \ - 'android-ndk-r14/platforms/android-9/arch-arm/*' \ - 'android-ndk-r14/source.properties' \ - 'android-ndk-r14/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a/*' \ - 'android-ndk-r14/sysroot/*' \ - 'android-ndk-r14/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/*' \ - 'android-ndk-r14/toolchains/llvm/prebuilt/linux-x86_64/*' - sed -i -e 's/VERSION 3.6.0/VERSION 3.2/' ~/android-ndk-r14/build/cmake/android.toolchain.cmake + if [[ ! -d ~/android-ndk-r14 || -z "$(ls -A ~/android-ndk-r14)" ]]; then + curl -o ~/android-ndk.zip https://dl.google.com/android/repository/android-ndk-r14-linux-x86_64.zip + unzip -q ~/android-ndk.zip -d ~ \ + 'android-ndk-r14/build/cmake/*' \ + 'android-ndk-r14/platforms/android-9/arch-arm/*' \ + 'android-ndk-r14/source.properties' \ + 'android-ndk-r14/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a/*' \ + 'android-ndk-r14/sysroot/*' \ + 'android-ndk-r14/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/*' \ + 'android-ndk-r14/toolchains/llvm/prebuilt/linux-x86_64/*' + sed -i -e 's/VERSION 3.6.0/VERSION 3.2/' ~/android-ndk-r14/build/cmake/android.toolchain.cmake + fi fi script: - > |