Fix travis NDK setup
Summary: Phew, this took a while. Buck had some changes in how it picks up SDK/NDK configs. In order to satisfy the new demands, I'm now installing the NDK manually and no longer through the SDK manager. I'm also trying to cache as much as possible to reduce the flakiness here. Reviewed By: emilsjolander Differential Revision: D5465206 fbshipit-source-id: 61a4b9006fe96fc9a99fb9d75b822589064a9d1a
This commit is contained in:
committed by
Facebook Github Bot
parent
154e67adbc
commit
7ea50439ce
@@ -1,7 +1,7 @@
|
||||
[cxx]
|
||||
gtest_dep = //lib/gtest:gtest
|
||||
[android]
|
||||
target = android-23
|
||||
target = android-25
|
||||
[ndk]
|
||||
ndk_version = 13.1.3345770
|
||||
compiler = clang
|
||||
|
@@ -12,6 +12,8 @@ compiler: clang
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/Library/Caches/Homebrew
|
||||
- $HOME/android-sdk
|
||||
- $HOME/android-ndk
|
||||
|
||||
env:
|
||||
- TARGET=c
|
||||
@@ -73,6 +75,8 @@ before_install:
|
||||
export TERMINAL=dumb;
|
||||
source scripts/android-setup.sh && installAndroidSDK
|
||||
export ANDROID_SDK=$ANDROID_HOME
|
||||
export ANDROID_NDK_REPOSITORY=$HOME/android-ndk
|
||||
export ANDROID_NDK_HOME=$ANDROID_NDK_REPOSITORY/android-ndk-13b
|
||||
fi
|
||||
|
||||
# JavaScript
|
||||
|
@@ -21,17 +21,28 @@ function installsdk() {
|
||||
}
|
||||
|
||||
function installAndroidSDK {
|
||||
TMP=/tmp/sdk$$.zip
|
||||
download 'https://dl.google.com/android/repository/tools_r25.2.3-linux.zip' $TMP
|
||||
unzip -d $HOME/android-sdk $TMP
|
||||
rm $TMP
|
||||
|
||||
export ANDROID_HOME=$HOME/android-sdk
|
||||
export ANDROID_NDK_REPOSITORY=$HOME/android-ndk
|
||||
export PATH="$ANDROID_HOME/platform-tools:$ANDROID_HOME/tools:$ANDROID_HOME/tools/bin:$PATH"
|
||||
|
||||
if [[ ! -d "$ANDROID_HOME" ]]; then
|
||||
TMP=/tmp/sdk$$.zip
|
||||
download 'https://dl.google.com/android/repository/sdk-tools-darwin-3859397.zip' $TMP
|
||||
unzip -qod $ANDROID_HOME $TMP
|
||||
rm $TMP
|
||||
fi
|
||||
|
||||
if [[ ! -d "$ANDROID_NDK_REPOSITORY" ]]; then
|
||||
TMP=/tmp/ndk$$.zip
|
||||
mkdir -p $ANDROID_NDK_REPOSITORY
|
||||
download 'https://dl.google.com/android/repository/android-ndk-r13b-darwin-x86_64.zip' $TMP
|
||||
unzip -qod $ANDROID_NDK_REPOSITORY $TMP
|
||||
rm $TMP
|
||||
fi
|
||||
|
||||
mkdir -p $ANDROID_HOME/licenses/
|
||||
echo > $ANDROID_HOME/licenses/android-sdk-license
|
||||
echo -n 8933bad161af4178b1185d1a37fbf41ea5269c55 > $ANDROID_HOME/licenses/android-sdk-license
|
||||
echo -n 8933bad161af4178b1185d1a37fbf41ea5269c55 >> $ANDROID_HOME/licenses/android-sdk-license
|
||||
|
||||
installsdk 'build-tools;23.0.2' 'build-tools;25.0.2' 'build-tools;25.0.1' 'platforms;android-23' 'platforms;android-25' 'ndk-bundle' 'extras;android;m2repository'
|
||||
installsdk 'build-tools;23.0.2' 'build-tools;25.0.2' 'build-tools;25.0.1' 'platform-tools' 'platforms;android-23' 'platforms;android-25' 'extras;android;m2repository'
|
||||
}
|
||||
|
Reference in New Issue
Block a user