forked from mbkumar/cantera
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
91 lines (87 loc) · 3.79 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
language: cpp
sudo: false
dist: xenial
os:
- linux
- osx
addons:
apt:
packages:
- python3-pip
- python3-dev
- python3-numpy
- python3-setuptools
- scons
- python-numpy
- gfortran
- libsundials-serial-dev
- liblapack-dev
- libblas-dev
- libboost-dev
- doxygen
- graphviz
ssh_known_hosts:
- cantera.org
env:
global:
secure: "IqQ4IVKzZbMCIVrD6t3YQDi3mEiswhTWo3AAKg2CrA+CETads/I9d0g68krKCA2xue0zm9pFVWbs5MT2F6Yq2PNsdvoN3ZMHrpXTN2ZJ7pgukgVwNuBe7B/tm6xBzSbZ4KPIanWCu3TNXsZp9EPG1rdhagAZZ+TeDYdIUKAITjYOVIiiAsqiLllsE9cAq3jkiu/JAxB0tzicxERi1RtnMfL/1d9fupP+yrExwIYo+hhAwWwghdiKzh551sowpbVFVxuOtTJfpC+vh1a/kLo/VTr4DDe6Bdkubc7beU8WZiZNVVbNoydy/qYkKuOzmXu9Llo9flMzJKswR7Szxi8nhD2zc+3pOYxJilWPYtrG4WrJr3WFTU3xZg5KsLwNpCane1uAsrj/NNtMagp+Wj1yOBMDMmHF5GAyCVEgSqY2PLISaEPOPCJV4VihaHyie1hM/A5YlD2VwkkKJTjMIP2VpaLVo9Sr3jXUIhtp/wLNleSWENX7etFjVqhwX1ldhz6+gVrn/H6oS2LwHQwlAseE9O6eqAB5ia+9duYDt7JS5F1P8QMYhz1gaJGXKWBnCEur5XHoGhZ75nyNnpmLjDOHKk5NmQQNL6ltUqg3fX7EWOjzxHlymdZ/4lg5AESj/+nBAhJJcAYRn9hHti7JLMjF6Qk/Kf3pJ6qVBHETY2KivH8="
before_script: |
echo TRAVIS_OS_NAME: $TRAVIS_OS_NAME
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
export CONDA_ARCH="${TRAVIS_OS_NAME}_${BUILD_ARCH}"
curl https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -o miniconda.sh;
bash miniconda.sh -b -p $HOME/miniconda
source $HOME/miniconda/etc/profile.d/conda.sh && conda activate
conda config --set always_yes yes --set changeps1 no
conda install -q numpy cython scons boost ruamel_yaml
conda install -q -c conda-forge openmp
else
pip3 install --user --upgrade pip
pip3 install --user --upgrade setuptools wheel
pip3 install --user cython
pip3 install --user ruamel.yaml==0.15.94 # Need a version compatible with Python 3.4
# Install packages for the documentation
pip3 install --user sphinx sphinxcontrib-matlabdomain sphinxcontrib-doxylink
pip3 install --user https://github.com/hagenw/sphinxcontrib-katex/archive/master.tar.gz
fi
rm -f cantera.conf
script: |
set -e
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
scons build -j2 python_cmd=/usr/bin/python3 VERBOSE=y python_package=full blas_lapack_libs=lapack,blas optimize=n coverage=y
scons test
scons samples
scons build sphinx_docs=y doxygen_docs=y sphinx_cmd="/usr/bin/python3 `which sphinx-build`"
if [[ "${TRAVIS_PULL_REQUEST}" == "false" ]] && [[ "${TRAVIS_BRANCH}" == "master" ]] && [[ "${TRAVIS_REPO_SLUG}" == "Cantera/cantera" ]]; then
cd build
find docs -type f | grep -v /xml/ | grep -v .map$ | grep -v .md5$ | tar cjvf docs/dev-docs.tar.bz2 --files-from - >/dev/null
cd -
openssl aes-256-cbc -k "${ctdeploy_pass}" -in ./doc/ctdeploy_key.enc -out ./doc/ctdeploy_key -d
chmod 0600 ./doc/ctdeploy_key
RSYNC_OPTIONS=(
-avzP
--checksum
--rsh='ssh -i ./doc/ctdeploy_key'
--exclude='*.map'
--exclude='*.md5'
--exclude='/doxygen/xml'
--delete
--delete-excluded
)
RSYNC_USER="ctdeploy"
RSYNC_SERVER="cantera.org"
RSYNC_DEST="cantera/documentation/dev"
DOCS_OUTPUT_DIR="./build/docs/"
rsync "${RSYNC_OPTIONS[@]}" "${DOCS_OUTPUT_DIR}" ${RSYNC_USER}@${RSYNC_SERVER}:${RSYNC_DEST}
else
echo "Skipping documentation upload from source other than Cantera/cantera:master"
fi
else
scons build -j2 python_cmd=python3 VERBOSE=y python_package=full blas_lapack_libs=lapack,blas optimize=n coverage=y extra_inc_dirs=$CONDA_PREFIX/include extra_lib_dirs=$CONDA_PREFIX/lib
scons test
scons samples
fi
after_success: |
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
bash <(curl -s https://codecov.io/bash)
fi