-
Notifications
You must be signed in to change notification settings - Fork 70
/
Copy path.travis.yml
99 lines (96 loc) · 2.57 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
language: cpp
addons:
apt:
packages:
- swig
- gfortran
- libfftw3-dev
- libcfitsio3-dev
- libmuparser-dev
- python-dev
- python-numpy
- python-setuptools
- python3-setuptools
- python3-dev
- cmake
- libhdf5-serial-dev
- python-matplotlib
- python3-matplotlib
- python-scipy
- python3-scipy
- libiomp5
- libiomp-dev
- doxygen
- graphviz
cache:
directories:
- $HOME/crpropa_cache
matrix:
include:
- os : linux
dist: trusty
compiler: gcc
env: PYTHON_EXECUTABLE=/usr/bin/python3
- os : linux
dist: trusty
compiler: clang
env:
- PYTHON_EXECUTABLE=/usr/bin/python2
- LD_LIBRARY_PATH=/usr/local/clang/lib:$LD_LIBRARY_PATH
- os : linux
dist: trusty
compiler: gcc
env: PYTHON_EXECUTABLE=/usr/bin/python2
- os : linux
dist: trusty
compiler: clang
env:
- PYTHON_EXECUTABLE=/usr/bin/python2
- LD_LIBRARY_PATH=/usr/local/clang/lib:$LD_LIBRARY_PATH
- os : osx
compiler: clang
env:
- CXX_COMPILER='clang++'
- C_COMPILER='clang++'
- Fortran_COMPILER='gfortran'
- PYTHON_EXECUTABLE=/usr/bin/python
allow_failures:
- os : osx
before_install:
- |
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
HOMEBREW_NO_AUTO_UPDATE=1 brew install swig;
HOMEBREW_NO_AUTO_UPDATE=1 brew install gcc || true;
HOMEBREW_NO_AUTO_UPDATE=1 brew link --overwrite gcc;
fi;
before_script:
- mkdir build
- cd build
- |
DATAFILE=$HOME/crpropa_cache/data.tar.gz
if [ -f $DATAFILE ]; then
echo "Using data file from cache!"
cp $DATAFILE .
fi
- cmake .. -DENABLE_PYTHON=True -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE -DENABLE_TESTING=On
- cp data.tar.gz $HOME/crpropa_cache
script:
- VERBOSE=1 make
- make test
after_failure:
- cat Testing/Temporary/LastTest.log
after_success:
- make doc
- |
if [ $TRAVIS_BRANCH = "master" ] && [ $TRAVIS_PULL_REQUEST = "false" ]; then
openssl aes-256-cbc -K $encrypted_0581d1b3cf0a_key -iv $encrypted_0581d1b3cf0a_iv -in ../.travis/travis_deploy.enc -out travis_deploy -d
chmod 600 travis_deploy
eval "$(ssh-agent -s)"
ssh-add travis_deploy
cd html
git init
git checkout -b gh-pages
git add .
git -c user.name='travis' -c user.email='travis' commit -m `echo Build_$TRAVIS_COMMIT`
git push -f --set-upstream [email protected]:CRPropa/CRPropa3.git gh-pages
fi