Have both Linux and macOS tests on Travis.

The Swift tests will not work on Linux, because they depend on Xcode, so
we need a separate macOS run for them.
This commit is contained in:
Ewan Mellor 2016-11-06 14:49:54 -08:00 committed by parrt
parent c611a64461
commit 017f6586d7
4 changed files with 36 additions and 12 deletions

View File

@ -1,5 +1,8 @@
sudo: true
language: java
os:
- linux
- osx
script:
- mvn -Dparallel=methods -DthreadCount=4 install
@ -8,18 +11,8 @@ jdk:
- oraclejdk8
before_install:
- sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
- sudo add-apt-repository ppa:fkrull/deadsnakes -y
- sudo add-apt-repository ppa:rwky/nodejs -y
- sudo apt-get update -qq
- sudo apt-get install -qq python3.5
- sudo apt-get install -qq nodejs
- echo "deb http://download.mono-project.com/repo/debian wheezy/snapshots/3.12.1 main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list
- sudo apt-get install -qq mono-complete
- eval "$(sudo gimme 1.7.3)"
- go version ; go env
- python --version
- python3 --version
- if [[ $TRAVIS_OS_NAME == osx ]]; then ./travis/before_install-macos.sh; fi
- if [[ $TRAVIS_OS_NAME == linux ]]; then ./travis/before_install-linux.sh; fi
env:
- CXX=g++-5

View File

@ -0,0 +1,7 @@
#!/bin/bash
set -euo pipefail
( go version ; go env ) || true
python --version
python3 --version

17
travis/before_install-linux.sh Executable file
View File

@ -0,0 +1,17 @@
#!/bin/bash
set -euo pipefail
thisdir=$(dirname $(readlink -f "$0"))
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
sudo add-apt-repository ppa:fkrull/deadsnakes -y
sudo add-apt-repository ppa:rwky/nodejs -y
sudo apt-get update -qq
sudo apt-get install -qq python3.5
sudo apt-get install -qq nodejs
echo "deb http://download.mono-project.com/repo/debian wheezy/snapshots/3.12.1 main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list
sudo apt-get install -qq mono-complete
eval "$(sudo gimme 1.7.3)"
"$thisdir/before_install-common.sh"

7
travis/before_install-macos.sh Executable file
View File

@ -0,0 +1,7 @@
#!/bin/bash
set -euo pipefail
thisdir=$(dirname $(readlink -f "$0"))
"$thisdir/before_install-common.sh"