forked from BlueBrain/nmodl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
132 lines (122 loc) · 4.34 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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
#=============================================================================
# Travis NMODL settings
#=============================================================================
#=============================================================================
# Environment
#=============================================================================
# Use new Travis infrastructure (Docker can't sudo yet)
sudo: false
#=============================================================================
# Build matrix
#=============================================================================
matrix:
fast_finish: true
include:
- language: cpp
os: linux
dist: xenial
env:
- MATRIX_EVAL="CXX=g++"
- PYTHON_VERSION=3.6.7
- language: cpp
os: osx
osx_image: xcode10.2
env:
- MATRIX_EVAL="CXX=c++"
#=============================================================================
# Common Packages
#=============================================================================
addons:
# for Linux builds, we use APT
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- flex
- bison
- libboost-all-dev
- cmake
- python3-dev
- python3-pip
- doxygen
- pandoc
# for Mac builds, we use Homebrew
homebrew:
packages:
- flex
- bison
- boost
- cmake
- python@3
#=============================================================================
# Install dependencies / setup Spack
#=============================================================================
before_install:
# brew installed flex and bison is not in $PATH
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
export PATH=/usr/local/opt/flex/bin:/usr/local/opt/bison/bin:$PATH;
else
pyenv global $PYTHON_VERSION;
ls /usr/bin/;
fi
- eval "${MATRIX_EVAL}"
#=============================================================================
# Install NMODL dependencies
#=============================================================================
install:
- echo "------- Install Dependencies -------"
- pip3 install -U pip setuptools
- pip3 install Jinja2 PyYAML pytest sympy --user
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
pip3 install -U --user sphinx nbsphinx>=0.3.2 m2r sphinx-rtd-theme jupyter;
fi
#=============================================================================
# Build, test and install
#=============================================================================
script:
- echo "------- Build, Test and Install -------"
- mkdir build && cd build
- cmake .. -DPYTHON_EXECUTABLE=`which python3` -DCMAKE_INSTALL_PREFIX=$HOME/nmodl
- make -j 2
- make test
- make install
#=============================================================================
# Build Documentation, CoreNEURON and run tests
#=============================================================================
after_success:
- export PYTHONPATH=$HOME/nmodl/lib/python:$PYTHONPATH
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
echo "------- Build Documentation -------";
cd $TRAVIS_BUILD_DIR/docs;
doxygen && make html;
rm -rf _build/doctrees && touch _build/.nojekyll;
echo "<meta http-equiv=\"refresh\" content=\"0; url=./html/index.html\" />" > _build/index.html;
fi
- echo "------- Build and Test CoreNEURON -------"
- cd $HOME
- git clone --recursive https://github.com/BlueBrain/CoreNeuron.git
- mkdir CoreNeuron/build && cd CoreNeuron/build
- cmake .. -DENABLE_MPI=OFF -DENABLE_NMODL=ON -DNMODL_ROOT=$HOME/nmodl -DNMODL_EXTRA_FLAGS="passes --verbatim-rename --inline sympy --analytic"
- make -j
- make test
#=============================================================================
# Notifications
#=============================================================================
notifications:
email:
recipients: [email protected]
on_success: change
on_failure: always
#=============================================================================
# Documentation deployment
#=============================================================================
deploy:
provider: pages
skip_cleanup: true
github_token: $GITHUB_TOKEN
keep_history: false
local_dir: $TRAVIS_BUILD_DIR/docs/_build/
target_branch: gh-pages
on:
branch: master
condition: $TRAVIS_OS_NAME = linux