diff --git a/.travis-scripts/install.sh b/.travis-scripts/install.sh new file mode 100755 index 0000000000..db9ae6d94e --- /dev/null +++ b/.travis-scripts/install.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +if [[ $TRAVIS_OS_NAME == 'osx' ]]; then + + # Install some custom requirements on OS X + # Get and install Java 8 + wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u66-b17/jdk-8u66-macosx-x64.dmg + hdiutil mount jdk-8u66-macosx-x64.dmg + sudo installer -pkg /Volumes/JDK\ 8\ Update\ 66/JDK\ 8\ Update\ 66.pkg -target LocalSystem + +else + # Install custom requirements on Linux + sudo add-apt-repository ppa:wpilib/toolchain -y + sudo apt-get update -q + sudo apt-get install frc-toolchain -y +fi diff --git a/.travis.yml b/.travis.yml index 06220dee10..7e04cfd248 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,13 @@ -sudo: required -dist: trusty language: java +matrix: + include: + - os: linux + dist: trusty + sudo: required + - os: osx + env: WPILIB_FLAGS=-PskipArm + addons: apt: packages: @@ -9,12 +15,13 @@ addons: - lib32stdc++6 before_install: - - sudo add-apt-repository ppa:wpilib/toolchain -y - - sudo apt-get update -q - - sudo apt-get install frc-toolchain -y + - .travis-scripts/install.sh + +install: + - ./gradlew assemble $WPILIB_FLAGS script: - - ./gradlew build + - ./gradlew build $WPILIB_FLAGS before_cache: - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock