diff --git a/.travis.yml b/.travis.yml index f65bf985f..7469664ca 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,24 +1,52 @@ sudo: true +language: java + +env: + - TARGET=java + - TARGET=csharp + - TARGET=python2 + - TARGET=python3 + - TARGET=javascript + - TARGET=cpp + - TARGET=go + - TARGET=swift + matrix: include: - os: linux env: CXX=g++-5 compiler: clang - language: java jdk: oraclejdk7 - os: osx compiler: clang - language: java osx_image: xcode8.1 + exclude: + - os: linux + env: TARGET=swift + - os: osx + env: TARGET=java + - os: osx + env: TARGET=csharp + - os: osx + env: TARGET=python2 + - os: osx + env: TARGET=python3 + - os: osx + env: TARGET=javascript + - os: osx + env: TARGET=cpp + - os: osx + env: TARGET=go + +before_install: + - ./.travis/before-install-$TRAVIS_OS_NAME-$TARGET.sh + - fi script: - - if [[ $TRAVIS_OS_NAME == osx ]]; then cd runtime-testsuite; ../.travis/run-tests-macos.sh; fi - - if [[ $TRAVIS_OS_NAME == linux ]]; then cd runtime-testsuite; ../.travis/run-tests-linux.sh; fi - -before_install: - - if [[ $TRAVIS_OS_NAME == osx ]]; then ./.travis/before-install-macos.sh; fi - - if [[ $TRAVIS_OS_NAME == linux ]]; then ./.travis/before-install-linux.sh; fi + - cd runtime-testsuite + - ../.travis/run-tests-$TARGET.sh + - fi addons: apt: diff --git a/.travis/before-install-linux-cpp.sh b/.travis/before-install-linux-cpp.sh new file mode 100755 index 000000000..c5bf43614 --- /dev/null +++ b/.travis/before-install-linux-cpp.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +set -euo pipefail + +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 diff --git a/.travis/before-install-linux-csharp.sh b/.travis/before-install-linux-csharp.sh new file mode 100755 index 000000000..048d147d7 --- /dev/null +++ b/.travis/before-install-linux-csharp.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +set -euo pipefail + +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 +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 diff --git a/.travis/before-install-linux.sh b/.travis/before-install-linux-go.sh similarity index 100% rename from .travis/before-install-linux.sh rename to .travis/before-install-linux-go.sh diff --git a/.travis/before-install-linux-java.sh b/.travis/before-install-linux-java.sh new file mode 100755 index 000000000..fc927107f --- /dev/null +++ b/.travis/before-install-linux-java.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +set -euo pipefail + +sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF +sudo add-apt-repository ppa:fkrull/deadsnakes -y +sudo apt-get update -qq diff --git a/.travis/before-install-linux-python2.sh b/.travis/before-install-linux-python2.sh new file mode 100755 index 000000000..79ae76f6e --- /dev/null +++ b/.travis/before-install-linux-python2.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +set -euo pipefail + +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 +python --version diff --git a/.travis/before-install-linux-python3.sh b/.travis/before-install-linux-python3.sh new file mode 100755 index 000000000..abfce1d81 --- /dev/null +++ b/.travis/before-install-linux-python3.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +set -euo pipefail + +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 +python3 --version diff --git a/.travis/before-install-macos.sh b/.travis/before-install-osx-swift.sh similarity index 72% rename from .travis/before-install-macos.sh rename to .travis/before-install-osx-swift.sh index 00d68d433..145a505c6 100755 --- a/.travis/before-install-macos.sh +++ b/.travis/before-install-osx-swift.sh @@ -5,13 +5,8 @@ set -euo pipefail thisdir=$(dirname "$0") brew update -brew install mono python3 cmake # Work around apparent rvm bug that is in Travis's Xcode image. # https://github.com/direnv/direnv/issues/210 # https://github.com/travis-ci/travis-ci/issues/6307 shell_session_update() { :; } - -( go version ; go env ) || true -python --version -python3 --version diff --git a/.travis/run-tests-cpp.sh b/.travis/run-tests-cpp.sh new file mode 100755 index 000000000..5e8b018f3 --- /dev/null +++ b/.travis/run-tests-cpp.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +mvn -Dtest=cpp.* test # timeout due to no output for 10 min on travis if in parallel diff --git a/.travis/run-tests-csharp.sh b/.travis/run-tests-csharp.sh new file mode 100755 index 000000000..3bb35c098 --- /dev/null +++ b/.travis/run-tests-csharp.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +mvn -Dparallel=methods -DthreadCount=4 -Dtest=csharp.* test diff --git a/.travis/run-tests-go.sh b/.travis/run-tests-go.sh new file mode 100755 index 000000000..ce194d7f1 --- /dev/null +++ b/.travis/run-tests-go.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +mvn -Dparallel=methods -DthreadCount=4 -Dtest=go.* test diff --git a/.travis/run-tests-java.sh b/.travis/run-tests-java.sh new file mode 100755 index 000000000..43c17a76c --- /dev/null +++ b/.travis/run-tests-java.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +mvn -Dparallel=methods -DthreadCount=4 -Dtest=java.* test diff --git a/.travis/run-tests-javascript.sh b/.travis/run-tests-javascript.sh new file mode 100755 index 000000000..17ea458a1 --- /dev/null +++ b/.travis/run-tests-javascript.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +mvn -Dparallel=methods -DthreadCount=4 -Dtest=node.* test diff --git a/.travis/run-tests-linux.sh b/.travis/run-tests-linux.sh deleted file mode 100755 index 232d36149..000000000 --- a/.travis/run-tests-linux.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -mvn -Dparallel=methods -DthreadCount=4 -Dtest=java.* test -mvn -Dparallel=methods -DthreadCount=4 -Dtest=csharp.* test -mvn -Dparallel=methods -DthreadCount=4 -Dtest=python2.* test -mvn -Dparallel=methods -DthreadCount=4 -Dtest=python3.* test -mvn -Dparallel=methods -DthreadCount=4 -Dtest=node.* test -mvn -Dparallel=methods -DthreadCount=4 -Dtest=go.* test -mvn -Dtest=cpp.* test # timeout due to no output for 10 min on travis if in parallel -#mvn -Dparallel=methods -DthreadCount=4 -Dtest=swift.* test diff --git a/.travis/run-tests-python2.sh b/.travis/run-tests-python2.sh new file mode 100755 index 000000000..355dabaa8 --- /dev/null +++ b/.travis/run-tests-python2.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +mvn -Dparallel=methods -DthreadCount=4 -Dtest=python2.* test diff --git a/.travis/run-tests-python3.sh b/.travis/run-tests-python3.sh new file mode 100755 index 000000000..d3e6f2e51 --- /dev/null +++ b/.travis/run-tests-python3.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +mvn -Dparallel=methods -DthreadCount=4 -Dtest=python3.* test diff --git a/.travis/run-tests-macos.sh b/.travis/run-tests-swift.sh similarity index 100% rename from .travis/run-tests-macos.sh rename to .travis/run-tests-swift.sh