@@ -17,6 +17,7 @@ matrix:
17
17
dist : xenial
18
18
env :
19
19
- cmake_option="-DCORENRN_ENABLE_MPI=ON"
20
+ - BUILD_DOCUMENTATION=ON
20
21
- os : linux
21
22
dist : xenial
22
23
env :
@@ -84,6 +85,7 @@ addons:
84
85
sources :
85
86
- ubuntu-toolchain-r-test
86
87
packages :
88
+ - doxygen
87
89
- bison
88
90
- flex
89
91
- libboost-all-dev
@@ -114,27 +116,37 @@ before_install:
114
116
else
115
117
pyenv global $PYTHON_VERSION;
116
118
fi
117
- # install NMODL dependencies
118
- - if [[ "$USE_NMODL" == "ON" || "$USE_ISPC" == "ON" ]]; then
119
- pip3 install jinja2 pyyaml pytest "sympy<1.6";
119
+ - if [ `command -v pip3` ]; then
120
+ pip3 install --upgrade pip
120
121
fi
121
122
- if [ -n "$GCC_VERSION" ]; then
122
123
export CXX="g++-${GCC_VERSION}" CC="gcc-${GCC_VERSION}";
123
124
$CXX --version;
124
125
fi
126
+
127
+ install :
125
128
# install ISPC compiler (only for mac or linux build for now)
126
129
- if [[ "$USE_ISPC" == "ON" ]]; then
127
- ispc_version="v1.12.0";
128
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then
129
- url_os="linux";
130
- ispc_version_suffix="b";
131
- else
132
- url_os="macOS";
133
- ispc_version_suffix="";
134
- fi;
135
- url="https://github.com/ispc/ispc/releases/download/${ispc_version}/ispc-${ispc_version}${ispc_version_suffix}-${url_os}.tar.gz";
136
- wget -O ispc.tar.gz $url;
137
- mkdir ispc && tar -xvzf ispc.tar.gz -C ispc --strip 1;
130
+ ispc_version="v1.12.0";
131
+ if [ "$TRAVIS_OS_NAME" == "linux" ]; then
132
+ url_os="linux";
133
+ ispc_version_suffix="b";
134
+ else
135
+ url_os="macOS";
136
+ ispc_version_suffix="";
137
+ fi;
138
+ url="https://github.com/ispc/ispc/releases/download/${ispc_version}/ispc-${ispc_version}${ispc_version_suffix}-${url_os}.tar.gz";
139
+ wget -O ispc.tar.gz $url;
140
+ mkdir ispc && tar -xvzf ispc.tar.gz -C ispc --strip 1;
141
+ fi
142
+
143
+ # install NMODL dependencies
144
+ - if [[ "$USE_NMODL" == "ON" || "$USE_ISPC" == "ON" ]]; then
145
+ pip3 install jinja2 pyyaml pytest "sympy<1.6";
146
+ fi
147
+ # install documentation dependencies
148
+ - if [ "$BUILD_DOCUMENTATION" = "ON" ] && [ "$TRAVIS_OS_NAME" == "linux" ]; then
149
+ pip3 install --user -r docs/docs_requirements.txt --upgrade;
138
150
fi
139
151
# =============================================================================
140
152
# Build, test and install
@@ -154,3 +166,32 @@ script:
154
166
- cmake --build .
155
167
- ctest --output-on-failure
156
168
- make install
169
+
170
+
171
+ # =============================================================================
172
+ # Prepare Documentation
173
+ # =============================================================================
174
+ after_success :
175
+ - if [ "$BUILD_DOCUMENTATION" = "ON" ] && [ "$TRAVIS_OS_NAME" == "linux" ]; then
176
+ echo "------- Build Doxygen Documentation -------";
177
+ pushd $TRAVIS_BUILD_DIR/build;
178
+ make docs;
179
+ echo "-------- Disable jekyll --------";
180
+ pushd $TRAVIS_BUILD_DIR/build/docs;
181
+ touch .nojekyll;
182
+ fi
183
+
184
+
185
+ # =============================================================================
186
+ # Documentation deployment
187
+ # =============================================================================
188
+ deploy :
189
+ provider : pages
190
+ skip_cleanup : true
191
+ github_token : $GITHUB_TOKEN
192
+ keep_history : false
193
+ local_dir : $TRAVIS_BUILD_DIR/build/docs
194
+ target_branch : gh-pages
195
+ on :
196
+ branch : master
197
+ condition : $BUILD_DOCUMENTATION = ON && $TRAVIS_OS_NAME = linux
0 commit comments