diff --git a/.travis.yml b/.travis.yml index f048bce121..402a577bc6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,53 +4,73 @@ sudo: required dist: trusty -compiler: - - gcc - branches: only: - master - v1.6-dev -os: - - linux - - osx - -before_install: - - $CXX --version - - $CC --version - - - if [ $TRAVIS_OS_NAME == linux ]; then wget https://root.cern.ch/download/root_v5.34.36.Linux-ubuntu14-x86_64-gcc4.8.tar.gz && tar -xvf root_v5.34.36.Linux-ubuntu14-x86_64-gcc4.8.tar.gz && source root/bin/thisroot.sh; fi +# set here versions / file paths +env: + global: + - ROOT5_FILENAME_LINUX=root_v5.34.36.Linux-ubuntu14-x86_64-gcc4.8.tar.gz + - ROOT5_FILENAME_MAC=root_v5.34.36.macosx64-10.9-clang60.tar.gz + - ROOT6_FILENAME_LINUX=root_v6.06.04.Linux-ubuntu14-x86_64-gcc4.8.tar.gz + - ROOT6_FILENAME_MAC=root_v6.06.04.macosx64-10.9-clang60.tar.gz + +# possible options: +# Linux/Mac +# gcc/clang +# ROOT 5/6 +# QT 4/5 +# Python 2/3 + +# in order to reduce options: +# Linux/Mac +# gcc/clang +# modern (ROOT 6, QT 5, Python 3) / old (ROOT 5, QT 4, Python 2) +# results in 8 combinations +# documentation to be "compiled" in maximum one option branch + +matrix: + include: + - os: linux + compiler: gcc + env: OPTION_BRANCH=modern + - os: linux + compiler: gcc + env: OPTION_BRANCH=old + - os: linux + compiler: clang + env: OPTION_BRANCH=modern + - os: linux + compiler: clang + env: OPTION_BRANCH=old + - os: osx + compiler: gcc + env: OPTION_BRANCH=modern + - os: osx + compiler: gcc + env: OPTION_BRANCH=old + - os: osx + compiler: clang + env: OPTION_BRANCH=modern + - os: osx + compiler: clang + env: OPTION_BRANCH=old - - if [ $TRAVIS_OS_NAME == osx ]; then wget https://root.cern.ch/download/root_v5.34.36.macosx64-10.9-clang60.tar.gz && tar -xvf root_v5.34.36.macosx64-10.9-clang60.tar.gz && source root/bin/thisroot.sh; fi - - if [ $TRAVIS_OS_NAME == linux ]; then sudo apt-get -qq update; fi - - # OS X: update brew cache: - - if [ $TRAVIS_OS_NAME == osx ]; then brew update; fi - - if [[ "$TRAVIS_OS_NAME" == "osx" && "$CC" == "gcc" ]]; then CC=gcc-4.9; fi - - if [ $TRAVIS_OS_NAME == "osx" ]; then wget https://cmake.org/files/v3.4/cmake-3.4.3-Darwin-x86_64.tar.gz && tar xfz cmake-3.4.3-Darwin-x86_64.tar.gz && export PATH="`pwd`/cmake-3.4.3-Darwin-x86_64/CMake.app/Contents/bin":$PATH:; fi - - if [ $TRAVIS_OS_NAME == "osx" ]; then echo $PATH; fi +before_install: + - ./.travis/before_install.sh install: - # Install package dependencies for Linux: - - if [ $TRAVIS_OS_NAME == linux ]; then sudo apt-get install -y libusb-1.0-0 libusb-1.0-0-dev python2.7 python-numpy cmake qt4-dev-tools; fi - - # Install package dependencies for Mac OS X: - - if [ $TRAVIS_OS_NAME == osx ]; then brew unlink cmake; fi - - if [ $TRAVIS_OS_NAME == osx ]; then brew install python libusb qt; fi - # Install numpy via pip: - - if [ $TRAVIS_OS_NAME == osx ]; then easy_install pip && pip install numpy; fi + - ./.travis/install.sh before_script: - # For Mac OS X we still need to source the root environment: # - if [ $TRAVIS_OS_NAME == osx ]; then source $(brew --prefix root)/libexec/thisroot.sh; fi - - $CXX --version - $CC --version - - cd build script: diff --git a/.travis/before_install.sh b/.travis/before_install.sh new file mode 100644 index 0000000000..7c219d73de --- /dev/null +++ b/.travis/before_install.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +echo $CXX --version +echo $CC --version + +if [[ $TRAVIS_OS_NAME == 'osx' ]]; then + wget https://root.cern.ch/download/root_v5.34.36.macosx64-10.9-clang60.tar.gz + tar -xvf root_v5.34.36.macosx64-10.9-clang60.tar.gz + source root/bin/thisroot.sh + + # OS X: update brew cache: + brew update + + if [[ "$CC" == "gcc" ]]; then CC=gcc-4.9; fi + + wget https://cmake.org/files/v3.4/cmake-3.4.3-Darwin-x86_64.tar.gz + tar xfz cmake-3.4.3-Darwin-x86_64.tar.gz + export PATH="`pwd`/cmake-3.4.3-Darwin-x86_64/CMake.app/Contents/bin":$PATH: + echo $PATH +else + wget https://root.cern.ch/download/root_v5.34.36.Linux-ubuntu14-x86_64-gcc4.8.tar.gz + tar -xvf root_v5.34.36.Linux-ubuntu14-x86_64-gcc4.8.tar.gz + source root/bin/thisroot.sh + + sudo apt-get -qq update +fi diff --git a/.travis/install.sh b/.travis/install.sh new file mode 100644 index 0000000000..24d68a06d7 --- /dev/null +++ b/.travis/install.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +if [[ $TRAVIS_OS_NAME == 'osx' ]]; then + # Install package dependencies for Mac OS X: + brew unlink cmake + brew install python libusb qt + # Install numpy via pip: + easy_install pip + pip install numpy +else + # Install package dependencies for Linux: + sudo apt-get install -y libusb-1.0-0 libusb-1.0-0-dev python2.7 python-numpy cmake qt4-dev-tools +fi + +