/
.travis.yml
87 lines (79 loc) · 3.37 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
language: generic
sudo: required
branches:
only:
- master
- develop
matrix:
fast_finish: true
include:
- os: linux
before_install:
- sudo apt-get install libhdf5-serial-dev zlib1g-dev libatlas-base-dev valgrind lcov cppcheck libboost-serialization-dev
- sudo add-apt-repository -y 'deb http://us.archive.ubuntu.com/ubuntu/ xenial main universe restricted'
- sudo add-apt-repository -y 'deb http://gb.archive.ubuntu.com/ubuntu/ xenial-updates main restricted'
- sudo apt-get update -q
- sudo apt-get install swig3.0 g++-4.9
# full support of <regex> requires gcc4.9
- export CC="gcc-4.9" CXX="g++-4.9"
# Python distutils only looks for `swig` and does not find `swig3.0`
- mkdir -p ~/bin/ && ln -s /usr/bin/swig3.0 ~/bin/swig && export PATH=~/bin/:$PATH
- pyenv shell 2.7 3.6
compiler: gcc
env: ENABLE_GCOV_COVERAGE=TRUE
after_script:
- bash <(curl -s https://codecov.io/bash) -f coverage.info -X fix -F cpp
- bash <(curl -s https://codecov.io/bash) -f coverage_py.xml -F python
- os: osx
osx_image: xcode9.3
compiler: clang
before_install:
- brew update # without this homebrew can stumble over wrong ruby version
- travis_wait brew install gcc || brew link --overwrite gcc # fix linker warning regarding /usr/local/include/c++
- travis_wait brew install hdf5 cppcheck swig doxygen ragel graphviz homebrew/cask/mactex
- brew upgrade python
- export PATH=/Users/travis/Library/Python/3.7/bin:/Library/TeX/texbin:$PATH
after_success:
- cd $BASE_DIR # cd to base dir for correct relative path in deploy
deploy:
provider: pages
local-dir: doc
skip-cleanup: true
github-token: $GITHUB_TOKEN # Set in the settings page of your repository, as a secure variable
keep-history: false
verbose: true
on:
branch: master
install:
- export BASE_DIR=`pwd`
- pip3 install --user --upgrade pip==9.0.3 setuptools wheel pkgconfig doxypypy scipy # pinning pip because of https://github.com/pypa/pip/issues/5240
- ./scripts/buildSuiteSparse.sh
- ./scripts/buildSundials.sh
- ./scripts/buildCpputest.sh
- ./scripts/buildBNGL.sh
- export BNGPATH=$(pwd)/ThirdParty/BioNetGen-2.3.2
- ./scripts/buildAmici.sh
- ./scripts/installAmiciArchive.sh
- ./scripts/installAmiciSource.sh
script:
# - cd $BASE_DIR/python/sdist
# - python3 setup.py sdist --dist-dir=$BASE_DIR/build/python/
# - python3 -m pip install $BASE_DIR/build/python/amici-*.tar.gz --verbose
- cd $BASE_DIR
- ./scripts/run-cpputest.sh
- ./scripts/run-cppcheck.sh
- cd $BASE_DIR/build
- make python-tests
- cd $BASE_DIR
- scripts/runNotebook.sh python/examples/example_*/
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./scripts/run-valgrind.sh; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ./scripts/run-doxygen.sh; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./scripts/run-codecov.sh; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]] && [[ "$TRAVIS_EVENT_TYPE" == "cron" ]]; then ./scripts/run-SBMLTestsuite.sh; fi
after_failure:
- echo -en 'travis_fold:start:failure\\r'
- ls -alR
- echo -en 'travis_fold:end:failure\\r'
# cache dependencies
cache:
- pip