Merge pull request #59 from wpilibsuite/build/osxTravisBuild

Adds OSX Build to travis
This commit is contained in:
Jonathan Leitschuh
2016-05-11 14:12:28 -04:00
2 changed files with 29 additions and 6 deletions

16
.travis-scripts/install.sh Executable file
View File

@@ -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

View File

@@ -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