Skip to content

Commit e11f2d8

Browse files
committed
Add OSX Build on Travis
1 parent 880cc48 commit e11f2d8

File tree

3 files changed

+23
-10
lines changed

3 files changed

+23
-10
lines changed

.travis-scripts/install.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash
2+
3+
if [[ $TRAVIS_OS_NAME == 'osx' ]]; then
4+
5+
# Install some custom requirements on OS X
6+
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
7+
hdiutil mount jdk-8u66-macosx-x64.dmg
8+
sudo installer -pkg /Volumes/JDK\ 8\ Update\ 66/JDK\ 8\ Update\ 66.pkg -target LocalSystem
9+
else
10+
export DISPLAY=:99.0
11+
sh -e /etc/init.d/xvfb start
12+
pip install --user codecov
13+
fi

.travis-scripts/push-javadoc-to-gh-pages.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22

33
# Source of file: http://benlimmer.com/2013/12/26/automatically-publish-javadoc-to-gh-pages-with-travis-ci/
4-
if [ "$TRAVIS_REPO_SLUG" == "WPIRoboticsProjects/GRIP" ] && [ "$TRAVIS_JDK_VERSION" == "oraclejdk8" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_BRANCH" == "master" ]; then
4+
if [ "$TRAVIS_REPO_SLUG" == "WPIRoboticsProjects/GRIP" ] && [ "$TRAVIS_JDK_VERSION" == "oraclejdk8" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_BRANCH" == "master" ] && [[ "$TRAVIS_OS_NAME" != "osx" ]]; then
55

66
echo -e "Generating javadoc...\n"
77
./gradlew aggregateJavadocs

.travis.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
# NOTE: Don't use `sudo` anywhere or the build will run on Travis's slower, outdated build system
22
language: java
3-
jdk:
4-
- oraclejdk8
3+
4+
matrix:
5+
include:
6+
- os: linux
7+
jdk:
8+
- oraclejdk8
9+
- os: osx
510

611
# GCC needs to be 4.8 or higher so that GOMP_4.0 is installed for opencv
712
# This is incredibly hard to track down, find the solution for and fix.
@@ -17,9 +22,7 @@ addons:
1722
- oracle-java8-installer
1823

1924
before_install:
20-
- export DISPLAY=:99.0
21-
- sh -e /etc/init.d/xvfb start
22-
- pip install --user codecov
25+
- .travis-scripts/install.sh
2326

2427
# Only do an assemble when we aren't building a pull request
2528
install:
@@ -29,7 +32,7 @@ script:
2932
- ./gradlew check --stacktrace -Pheadless=true
3033

3134
after_success:
32-
- codecov
35+
- if [[ "$TRAVIS_OS_NAME" != "osx" ]]; then codecov ; fi
3336
- .travis-scripts/push-javadoc-to-gh-pages.sh
3437
- .travis-scripts/before-deploy.sh
3538

@@ -47,9 +50,6 @@ env:
4750
global:
4851
secure: f90qqcA5inkHmYUK6WNITkSPbalpw+r+6nzykPdN30ahB8OUupYxoJxFknxw74raPQ69IgsDF+f8RihEBNIjH8TiMihkcwbkUGGfYaON+sVdvV/GgRQcUk0tm/wrWxRiB1qOYfsvU4sdyvFWBtAbeuhBH1JMLlQGaFjHTJOUwCjm3iEW0CKC9btsgcZIvIrHkP2KNHUMD2iBs6BJ4W448ElQTBBnaoInWUm/ecV+nNUX9yT1CpVWABVuioUkSWSm7eMiqYnvm4J9+LUh8+IMYyodO2hjPWlQ18yhmP9kSlGpQT6pRZjCRd394GE8plKxxWwp9CVXyUY/KQiYoNMRQaAiwuNnXrCi2Et1Fp8+MzQjpl+2CWbdtPwqGhKrGICfhPHvswNE2jM7VLAu/8Gn+ubhKuYfiibska5tXDBknrVbOiV1s9h3y3hI2WyyUg+T1ZsirhGVzMSmDk4HZnLUf7uEEMZEMQzLC0yk495TTZ2zihRnAkOXhNd24lHVwns2WSu0BKvawaDlfQinCbddKGNXE0cdkDvO9xk4IsbioRJ3w8DhBdL4HAEw/Gzx5N3xEVXgOAtwoP+zH2b3LIXQvP5pkuyna48R9L7Fc+EXUmejuRUmjQQMbsdLbx6Ci8gnd6Xq7CYvwry6t3R0GKuCwziuZNl44doHYR6MK7CDBWo=
4952

50-
os:
51-
- linux
52-
5353
deploy:
5454
provider: releases
5555
api_key:

0 commit comments

Comments
 (0)