Add TravisCI support. Summary: Add TravisCI support. This makes it so test status shows up in the README.md and on pull requests. We use TravisCI for xctool as well.
diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..a8cbc23 --- /dev/null +++ b/.travis.yml
@@ -0,0 +1,25 @@ +language: java +jdk: + - oraclejdk7 +before_install: + # Make sure apt is up to date. + - sudo apt-get update -qq + # Travis is on 64bit and there will be a cryptic aapt error w/o these libs. + - if [ `uname -m` = x86_64 ]; then sudo apt-get install -qq --force-yes libgd2-xpm ia32-libs ia32-libs-multiarch > /dev/null; fi + # Download the Android sdk and unzip. + - wget http://dl.google.com/android/android-sdk_r22.2.1-linux.tgz + - tar -zxf android-sdk_r22.2.1-linux.tgz + # Set up the sdk environment. + - export ANDROID_HOME=`pwd`/android-sdk-linux + - export PATH=${PATH}:${ANDROID_HOME}/tools + - export PATH=${PATH}:${ANDROID_HOME}/platform-tools + - export PATH=${PATH}:${ANDROID_HOME}/build-tools + # Install the sdk bits we need. + - ./scripts/travisci_install_android_sdk.sh > /dev/null + # Download the Android ndk and unzip. + - wget http://dl.google.com/android/ndk/android-ndk-r9-linux-x86_64.tar.bz2 + - tar xf android-ndk-r9-linux-x86_64.tar.bz2 + - mv android-ndk-r9 android-ndk-linux + # Set up the ndk environment. + - export ANDROID_NDK=`pwd`/android-ndk-linux + - export PATH=${ANDROID_NDK}:${PATH}
diff --git a/README.md b/README.md index 962f058..5260e1b 100644 --- a/README.md +++ b/README.md
@@ -4,6 +4,8 @@ Buck is an Android build tool. To see what Buck can do for you, check out the documentation at <http://facebook.github.io/buck/>. +[](https://travis-ci.org/facebook/buck) + Installation ------------
diff --git a/scripts/travisci_install_android_sdk.sh b/scripts/travisci_install_android_sdk.sh new file mode 100755 index 0000000..47ad474 --- /dev/null +++ b/scripts/travisci_install_android_sdk.sh
@@ -0,0 +1,17 @@ +#!/bin/bash +set -x + +# Values from `android list sdk --extended --all` +(while : +do + echo y + sleep 2 + done) | android update sdk --force --no-ui --all --filter \ +tools,\ +platform-tools,\ +build-tools-18.1.1,\ +android-16,\ +addon-google_apis-google-16,\ +android-18,\ +addon-google_apis-google-18,\ +extra-android-support