Skip to content

Commit

Permalink
Travis-CI: build with -j4
Browse files Browse the repository at this point in the history
  • Loading branch information
Mizux committed Oct 31, 2018
1 parent c18421a commit 679783d
Show file tree
Hide file tree
Showing 6 changed files with 150 additions and 217 deletions.
47 changes: 16 additions & 31 deletions .travis.yml
@@ -1,89 +1,74 @@
sudo: required
language: generic
language: cpp

matrix:
include:
# Makefile builder
- os: linux
dist: trusty
language: cpp
compiler: gcc
env: BUILDER=make DISTRO=native LANGUAGE=cc
env: BUILDER=make LANGUAGE=cc
- os: linux
dist: trusty
language: cpp
compiler: gcc
env: BUILDER=make DISTRO=native LANGUAGE=python2
env: BUILDER=make LANGUAGE=python2
- os: linux
dist: trusty
language: cpp
compiler: gcc
env: BUILDER=make DISTRO=native LANGUAGE=python3
env: BUILDER=make LANGUAGE=python3
- os: linux
dist: trusty
language: cpp
compiler: gcc
env: BUILDER=make DISTRO=native LANGUAGE=java
env: BUILDER=make LANGUAGE=java
- os: linux
dist: trusty
language: cpp
compiler: gcc
env: BUILDER=make DISTRO=native LANGUAGE=dotnet
env: BUILDER=make LANGUAGE=dotnet

- os: osx
osx_image: xcode9.4
language: cpp
compiler: clang
env: BUILDER=make DISTRO=native LANGUAGE=cc
env: BUILDER=make LANGUAGE=cc
- os: osx
osx_image: xcode9.4
language: cpp
compiler: clang
env: BUILDER=make DISTRO=native LANGUAGE=python2
env: BUILDER=make LANGUAGE=python2
- os: osx
osx_image: xcode9.4
language: cpp
compiler: clang
env: BUILDER=make DISTRO=native LANGUAGE=python3
env: BUILDER=make LANGUAGE=python3
- os: osx
osx_image: xcode9.4
language: cpp
compiler: clang
env: BUILDER=make DISTRO=native LANGUAGE=java
env: BUILDER=make LANGUAGE=java
- os: osx
osx_image: xcode9.4
language: cpp
compiler: clang
env: BUILDER=make DISTRO=native LANGUAGE=dotnet
env: BUILDER=make LANGUAGE=dotnet
# CMake Build Generator
- os: linux
dist: trusty
language: cpp
compiler: gcc
env: BUILDER=cmake DISTRO=native
env: BUILDER=cmake
- os: linux
dist: trusty
language: cpp
compiler: clang
env: BUILDER=cmake DISTRO=native
env: BUILDER=cmake

- os: osx
osx_image: xcode9.4
language: cpp
compiler: gcc
env: BUILDER=cmake DISTRO=native
env: BUILDER=cmake
- os: osx
osx_image: xcode9.4
language: cpp
compiler: clang
env: BUILDER=cmake DISTRO=native
env: BUILDER=cmake
# Jobs too long
allow_failures:
- os: osx
osx_image: xcode9.4
language: cpp
compiler: clang
env: BUILDER=make DISTRO=native LANGUAGE=dotnet
env: BUILDER=make LANGUAGE=dotnet

install:
- ./.travis/install.sh
Expand Down
107 changes: 40 additions & 67 deletions .travis/install.sh
Expand Up @@ -40,56 +40,40 @@ function installdotnetsdk(){
################
if [ "${BUILDER}" == make ]; then
if [ "${TRAVIS_OS_NAME}" == linux ]; then
if [ "${DISTRO}" == native ]; then
sudo apt-get -qq update
sudo apt-get -yqq install autoconf libtool zlib1g-dev gawk curl lsb-release
if [ "${LANGUAGE}" != cc ]; then
installswig
fi
if [ "${LANGUAGE}" == python2 ]; then
pyenv global system 2.7;
python2.7 -m pip install -q virtualenv wheel six;
elif [ "${LANGUAGE}" == python3 ]; then
pyenv global system 3.6;
python3.6 -m pip install -q virtualenv wheel six;
elif [ "${LANGUAGE}" == dotnet ]; then
#installmono
sudo apt-get -yqq install fsharp
installdotnetsdk
fi
else
# Linux Docker Makefile build:
echo "NOT SUPPORTED"
exit 42
sudo apt-get -qq update
sudo apt-get -yqq install autoconf libtool zlib1g-dev gawk curl lsb-release
if [ "${LANGUAGE}" != cc ]; then
installswig
fi
if [ "${LANGUAGE}" == python2 ]; then
pyenv global system 2.7
python2.7 -m pip install -q virtualenv wheel six;
elif [ "${LANGUAGE}" == python3 ]; then
pyenv global system 3.6
python3.6 -m pip install -q virtualenv wheel six
elif [ "${LANGUAGE}" == dotnet ]; then
installdotnetsdk
fi
elif [ "${TRAVIS_OS_NAME}" == osx ]; then
if [ "${DISTRO}" == native ]; then
brew update;
brew install gcc || brew link --overwrite gcc;
brew install make --with-default-names;
if [ "${LANGUAGE}" != cc ]; then
brew install swig;
fi
if [ "${LANGUAGE}" == python2 ]; then
brew outdated | grep -q python@2 && brew upgrade python@2;
python2 -m pip install -q virtualenv wheel six;
elif [ "${LANGUAGE}" == python3 ]; then
brew upgrade python;
python3 -m pip install -q virtualenv wheel six;
elif [ "${LANGUAGE}" == java ]; then
brew tap caskroom/versions;
brew cask install java8;
elif [ "${LANGUAGE}" == dotnet ]; then
#brew install mono;
# Installer changes path but won't be picked up in current terminal session
# Need to explicitly add location (see Makefile.fsharp.mk)
brew tap caskroom/cask
brew cask install dotnet-sdk;
fi
else
# MacOS Docker Makefile build:
echo "NOT SUPPORTED"
exit 42
brew update
# see https://github.com/travis-ci/travis-ci/issues/10275
brew install gcc || brew link --overwrite gcc
brew install make --with-default-names
if [ "${LANGUAGE}" != cc ]; then
brew install swig
fi
if [ "${LANGUAGE}" == python2 ]; then
brew outdated | grep -q python@2 && brew upgrade python@2
python2 -m pip install -q virtualenv wheel six
elif [ "${LANGUAGE}" == python3 ]; then
brew upgrade python
python3 -m pip install -q virtualenv wheel six
elif [ "${LANGUAGE}" == java ]; then
brew tap caskroom/versions
brew cask install java8
elif [ "${LANGUAGE}" == dotnet ]; then
brew tap caskroom/cask
brew cask install dotnet-sdk
fi
fi
fi
Expand All @@ -99,25 +83,14 @@ fi
#############
if [ "${BUILDER}" == cmake ]; then
if [ "${TRAVIS_OS_NAME}" == linux ]; then
if [ "${DISTRO}" == native ]; then
installswig
pyenv global system 3.6;
python3.6 -m pip install -q virtualenv wheel six;
else
# Linux Docker CMake build:
echo "NOT SUPPORTED"
exit 42
fi
installswig
pyenv global system 3.6
python3.6 -m pip install -q virtualenv wheel six
elif [ "${TRAVIS_OS_NAME}" == osx ]; then
if [ "${DISTRO}" == native ]; then
brew update;
brew install gcc || brew link --overwrite gcc;
brew install swig;
brew upgrade python;
else
# MacOS Docker CMake build:
echo "NOT SUPPORTED"
exit 42
fi
brew update
# see https://github.com/travis-ci/travis-ci/issues/10275
brew install gcc || brew link --overwrite gcc
brew install swig
brew upgrade python
fi
fi

0 comments on commit 679783d

Please sign in to comment.