Skip to content

Commit 906dc5d

Browse files
committed
Travis CI: Creating option branches
1 parent 4b702dc commit 906dc5d

File tree

3 files changed

+92
-31
lines changed

3 files changed

+92
-31
lines changed

.travis.yml

Lines changed: 51 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -4,53 +4,73 @@ sudo: required
44

55
dist: trusty
66

7-
compiler:
8-
- gcc
9-
107
branches:
118
only:
129
- master
1310
- v1.6-dev
1411

15-
os:
16-
- linux
17-
- osx
18-
19-
before_install:
20-
- $CXX --version
21-
- $CC --version
22-
23-
- 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
12+
# set here versions / file paths
13+
env:
14+
global:
15+
- ROOT5_FILENAME_LINUX=root_v5.34.36.Linux-ubuntu14-x86_64-gcc4.8.tar.gz
16+
- ROOT5_FILENAME_MAC=root_v5.34.36.macosx64-10.9-clang60.tar.gz
17+
- ROOT6_FILENAME_LINUX=root_v6.06.04.Linux-ubuntu14-x86_64-gcc4.8.tar.gz
18+
- ROOT6_FILENAME_MAC=root_v6.06.04.macosx64-10.9-clang60.tar.gz
19+
20+
# possible options:
21+
# Linux/Mac
22+
# gcc/clang
23+
# ROOT 5/6
24+
# QT 4/5
25+
# Python 2/3
26+
27+
# in order to reduce options:
28+
# Linux/Mac
29+
# gcc/clang
30+
# modern (ROOT 6, QT 5, Python 3) / old (ROOT 5, QT 4, Python 2)
31+
# results in 8 combinations
32+
# documentation to be "compiled" in maximum one option branch
33+
34+
matrix:
35+
include:
36+
- os: linux
37+
compiler: gcc
38+
env: OPTION_BRANCH=modern
39+
- os: linux
40+
compiler: gcc
41+
env: OPTION_BRANCH=old
42+
- os: linux
43+
compiler: clang
44+
env: OPTION_BRANCH=modern
45+
- os: linux
46+
compiler: clang
47+
env: OPTION_BRANCH=old
48+
- os: osx
49+
compiler: gcc
50+
env: OPTION_BRANCH=modern
51+
- os: osx
52+
compiler: gcc
53+
env: OPTION_BRANCH=old
54+
- os: osx
55+
compiler: clang
56+
env: OPTION_BRANCH=modern
57+
- os: osx
58+
compiler: clang
59+
env: OPTION_BRANCH=old
2460

25-
- 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
2661

27-
- if [ $TRAVIS_OS_NAME == linux ]; then sudo apt-get -qq update; fi
28-
29-
# OS X: update brew cache:
30-
- if [ $TRAVIS_OS_NAME == osx ]; then brew update; fi
31-
- if [[ "$TRAVIS_OS_NAME" == "osx" && "$CC" == "gcc" ]]; then CC=gcc-4.9; fi
32-
- 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
33-
- if [ $TRAVIS_OS_NAME == "osx" ]; then echo $PATH; fi
3462

63+
before_install:
64+
- ./.travis/before_install.sh
3565

3666
install:
37-
# Install package dependencies for Linux:
38-
- 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
39-
40-
# Install package dependencies for Mac OS X:
41-
- if [ $TRAVIS_OS_NAME == osx ]; then brew unlink cmake; fi
42-
- if [ $TRAVIS_OS_NAME == osx ]; then brew install python libusb qt; fi
43-
# Install numpy via pip:
44-
- if [ $TRAVIS_OS_NAME == osx ]; then easy_install pip && pip install numpy; fi
67+
- ./.travis/install.sh
4568

4669
before_script:
47-
4870
# For Mac OS X we still need to source the root environment:
4971
# - if [ $TRAVIS_OS_NAME == osx ]; then source $(brew --prefix root)/libexec/thisroot.sh; fi
50-
5172
- $CXX --version
5273
- $CC --version
53-
5474
- cd build
5575

5676
script:

.travis/before_install.sh

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/bin/bash
2+
3+
echo $CXX --version
4+
echo $CC --version
5+
6+
if [[ $TRAVIS_OS_NAME == 'osx' ]]; then
7+
wget https://root.cern.ch/download/root_v5.34.36.macosx64-10.9-clang60.tar.gz
8+
tar -xvf root_v5.34.36.macosx64-10.9-clang60.tar.gz
9+
source root/bin/thisroot.sh
10+
11+
# OS X: update brew cache:
12+
brew update
13+
14+
if [[ "$CC" == "gcc" ]]; then CC=gcc-4.9; fi
15+
16+
wget https://cmake.org/files/v3.4/cmake-3.4.3-Darwin-x86_64.tar.gz
17+
tar xfz cmake-3.4.3-Darwin-x86_64.tar.gz
18+
export PATH="`pwd`/cmake-3.4.3-Darwin-x86_64/CMake.app/Contents/bin":$PATH:
19+
echo $PATH
20+
else
21+
wget https://root.cern.ch/download/root_v5.34.36.Linux-ubuntu14-x86_64-gcc4.8.tar.gz
22+
tar -xvf root_v5.34.36.Linux-ubuntu14-x86_64-gcc4.8.tar.gz
23+
source root/bin/thisroot.sh
24+
25+
sudo apt-get -qq update
26+
fi

.travis/install.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
3+
if [[ $TRAVIS_OS_NAME == 'osx' ]]; then
4+
# Install package dependencies for Mac OS X:
5+
brew unlink cmake
6+
brew install python libusb qt
7+
# Install numpy via pip:
8+
easy_install pip
9+
pip install numpy
10+
else
11+
# Install package dependencies for Linux:
12+
sudo apt-get install -y libusb-1.0-0 libusb-1.0-0-dev python2.7 python-numpy cmake qt4-dev-tools
13+
fi
14+
15+

0 commit comments

Comments
 (0)