Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Travis CI configuration #4

Merged
merged 1 commit into from
Dec 21, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 65 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
language: android
jdk: oraclejdk8

sudo: false

env:
global:
- NDK_VERSION=r11c
- BORINGSSL_HOME="$HOME/boringssl"
- CC=clang
- CXX=clang++

cache:
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/dists/
- $HOME/.cache/ndk
before_cache:
- find $HOME/.gradle -name "*.lock" -exec rm {} \;
- rm -rf $HOME/.gradle/caches/[1-9]*

before_script:
# newest Android NDK
- mkdir -p $HOME/.cache/ndk
- curl https://dl.google.com/android/repository/android-ndk-${NDK_VERSION}-linux-x86_64.zip -z $HOME/.cache/ndk/ndk-${NDK_VERSION}.zip -o $HOME/.cache/ndk/ndk-${NDK_VERSION}.zip
- unzip -q $HOME/.cache/ndk/ndk-$NDK_VERSION.zip -d $HOME
- echo "ndk.dir=$HOME/android-ndk-$NDK_VERSION" >> local.properties
# get and build BoringSSL
- mkdir $BORINGSSL_HOME
- git clone --depth 1 https://boringssl.googlesource.com/boringssl $BORINGSSL_HOME
- mkdir $BORINGSSL_HOME/build && pushd $BORINGSSL_HOME/build
- cmake -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE -DCMAKE_BUILD_TYPE=Release -DCMAKE_ASM_FLAGS=-Wa,--noexecstack -GNinja ..
- ninja
- popd

before_install:
- echo 'android.builder.sdkDownload=false' > gradle.properties

addons:
apt:
sources:
- kalakris-cmake
- ubuntu-toolchain-r-test
packages:
- cmake
- ninja-build
- clang

android:
components:
- tools
- tools # https://github.com/travis-ci/travis-ci/issues/6040
- platform-tools
- extra-android-m2repository
- build-tools-25.0.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it make sense for 25.0.0 (and 25 below) to be variables?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think you can have substitutions here unfortunately. It would be nice to have a gradle rule that made sure they were in sync, though.

- android-25

license:
- 'android-sdk-license-.+'

script:
- ./gradlew --stacktrace --info build

after_script:
- "[ -f android/build/outputs/lint-results-debug.xml ] && cat android/build/outputs/lint-results-debug.xml"