This repository has been archived by the owner on Oct 6, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
135 lines (127 loc) · 5.54 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
133
134
135
sudo: false
language: python
env:
global:
# Doctr deploy key for opesci/devito
- secure: "A6t8XTNLC7HS3Wip3Qnn93ZlHM8Y6JEQ1jFv9eLbQx+tGIvpCNXoM4QGaL2tphqHcVQDQGO6rVX9hjm8Cz2bRwOdCNTqbukChnd2tcCuF/2u+Ua0ev+/2o8/N1IaQxM62XI73PEgX+NTaYHpcTmFHfkfHnxpAlGpycW0aiNxzrGM400Wq6ap8zmq1SdFxWms7w1+li1P3zoGd7In+Gg8Kxd6Ty5qsy/qsl3rDQExT8Li8P0NWcthmTvMokUpb3ocLRfrpdobk9x3YTtwoRXaZFyp80nD2pVzjZSI3oiqHMNJF9lWbLVTInNvoK4nCR4gB8gYg34RcE50JoBsqFFN/qQMJtsEUc00/8Y9SLAsxMve0JtZnBBjmR+LWy89DHpAy8MlPhc40JVh53LSyzYglXlSkMwfDhWnollOQjyhC5ndV8tpuHW/9c+SqaG9SwVktAot+OGKogn1FT6bIxgMslRJpBhUROM9KO7qDssT+iC26wAUagsUtEpSFz4CqiYThyGcvnKFnlxAIOG/yWFF6GcfI/swsEixHjQdeMx7ICV2bWm+jAoS/ojjtDdPzgoxnsWnIChMvGCDCChNoAl3IlAJNKR5VsVr7bwr4eHSR9DBWJCZSfg1lyzU2nOQz4q8y/C0gfP1N0zv5kKWn8HKTr7FjLfofMWVCguwUS7hIVU="
- DEVITO_LOGGING: "INFO"
matrix:
include:
- os: linux
python: "3.6"
addons:
apt:
sources:
- ubuntu-toolchain-r-test # For gcc 4.9, 5 and 7
packages:
- gcc-4.9
- g++-4.9
env: DEVITO_ARCH=gcc-4.9 DEVITO_OPENMP=0 INSTALL_TYPE=pip_setup RUN_EXAMPLES=False
- os: linux
python: "3.6"
addons:
apt:
sources:
- ubuntu-toolchain-r-test # For gcc 4.9, 5 and 7
packages:
- gcc-5
- g++-5
env: DEVITO_ARCH=gcc-5 DEVITO_OPENMP=0 RUN_EXAMPLES=True INSTALL_TYPE=conda
- os: linux
python: "3.6"
addons:
apt:
sources:
- ubuntu-toolchain-r-test # For gcc 4.9, 5 and 7
packages:
- gcc-4.9
- g++-4.9
env: DEVITO_ARCH=gcc-4.9 DEVITO_OPENMP=1 OMP_NUM_THREADS=2 RUN_EXAMPLES=True INSTALL_TYPE=conda
- os: linux
python: "3.6"
addons:
apt:
sources:
- ubuntu-toolchain-r-test # For gcc 4.9, 5 and 7
packages:
- gcc-7
- g++-7
env: DEVITO_ARCH=gcc-7 DEVITO_OPENMP=0 DEVITO_BACKEND=yask YC_CXX=g++-7 INSTALL_TYPE=conda RUN_EXAMPLES=False
allow_failures:
- os: linux
python: "2.7"
env: DEVITO_ARCH=gcc-4.9 DEVITO_OPENMP=0
- os: osx
python: "2.7"
env: DEVITO_ARCH=clang DEVITO_OPENMP=0
addons:
apt:
sources:
- ubuntu-toolchain-r-test # For gcc 4.9, 5 and 7
before_install:
# Setup anaconda
- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O miniconda.sh;
else
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
fi
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- hash -r
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
# Useful for debugging any issues with conda
- conda info -a
install:
# Install devito with conda
- if [[ $INSTALL_TYPE == 'conda' ]]; then
conda env create -q -f environment.yml python=$TRAVIS_PYTHON_VERSION;
source activate devito;
pip install -e .;
conda list;
fi
# Install devito with pip
- if [[ $INSTALL_TYPE == 'pip_setup' ]]; then python setup.py install; fi
before_script:
- echo -e "Host github.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
- if [[ $DEVITO_BACKEND == 'yask' ]]; then
conda install swig; cd ../;
git clone https://github.com/opesci/yask.git;
cd yask; make compiler && make compiler-api; pip install -e .; cd ../devito;
fi
script:
- flake8 --builtins=ArgumentError .
# Run tests with pip
- if [[ $INSTALL_TYPE == 'pip_setup' ]]; then python setup.py test; fi
# Run test with py.tests
# - if [[ $INSTALL_TYPE == 'conda' ]]; then py.test -vs --cov devito tests/; fi
# Run remaining specialized examples and tests
# Additional seismic operator tests
# - if [[ $RUN_EXAMPLES == 'True' ]]; then DEVITO_BACKEND=foreign py.test -vs tests/test_operator.py -k TestForeign; fi
#- if [[ $RUN_EXAMPLES == 'True' ]]; then python examples/seismic/benchmark.py test -P tti -so 4 -a -d 20 20 20 -n 5; fi
#- if [[ $RUN_EXAMPLES == 'True' ]]; then python examples/seismic/benchmark.py test -P acoustic -a; fi
#- if [[ $RUN_EXAMPLES == 'True' ]]; then python examples/seismic/acoustic/acoustic_example.py --full; fi
#- if [[ $RUN_EXAMPLES == 'True' ]]; then python examples/seismic/acoustic/acoustic_example.py --constant --full; fi
#- if [[ $RUN_EXAMPLES == 'True' ]]; then python examples/seismic/acoustic/gradient_example.py; fi
#- if [[ $RUN_EXAMPLES == 'True' ]]; then python examples/misc/linalg.py mat-vec mat-mat-sum transpose-mat-vec; fi
#- if [[ $RUN_EXAMPLES == 'True' ]]; then python examples/seismic/tti/tti_example.py -a; fi
#- if [[ $RUN_EXAMPLES == 'True' ]]; then python examples/checkpointing/checkpointing_example.py;fi
# Test tutorial notebooks for the website using nbval
#- if [[ $RUN_EXAMPLES == 'True' ]]; then py.test -vs --nbval examples/cfd; fi
#- if [[ $RUN_EXAMPLES == 'True' ]]; then py.test -vs --nbval examples/seismic/tutorials; fi
- if [[ $RUN_EXAMPLES == 'True' ]]; then py.test -vs --nbval examples/seismic/tutorials/04_dask.ipynb; fi
# Code coverage and documentation generation
- if [[ $INSTALL_TYPE == 'conda' ]]; then
codecov;
sphinx-apidoc -f -o docs/ examples;
sphinx-apidoc -f -o docs/ devito devito/yask/*;
cd docs;
make html;
cd ..;
fi
# Docs deployment only once from a single build
- if [[ $DEVITO_ARCH == 'gcc-5' ]]; then
set -e;
pip install doctr;
doctr deploy . --built-docs docs --key-path .deploy_key.enc;
fi