/
.travis.yml
153 lines (144 loc) · 6.21 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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
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 MPI_INSTALL=1
- 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=False INSTALL_TYPE=conda MPI_INSTALL=0
- os: linux
python: "3.6"
addons:
apt:
sources:
- ubuntu-toolchain-r-test # For gcc 4.9, 5 and 7
packages:
- gcc-8
- g++-8
env: DEVITO_ARCH=gcc-8 DEVITO_OPENMP=1 OMP_NUM_THREADS=2 RUN_EXAMPLES=True INSTALL_TYPE=conda MPI_INSTALL=1 MPI_RESTRAIN=1
- 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 MPI_INSTALL=1
- 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=ops YC_CXX=g++-7 INSTALL_TYPE=conda RUN_EXAMPLES=False MPI_INSTALL=0
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-4.5.4-Linux-x86_64.sh -O miniconda.sh;
else
wget https://repo.continuum.io/miniconda/Miniconda3-4.5.4-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
- if [[ "$MPI_INSTALL" == '1' ]]; then
sudo apt-get install -y -q mpich libmpich-dev;
export MPICH_CC=$DEVITO_ARCH;
fi
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
- if [[ "$MPI_INSTALL" == '1' ]]; then
pip install -r requirements-optional.txt;
fi
# Install devito with pip
- if [[ $INSTALL_TYPE == 'pip_setup' ]]; then python setup.py install; fi
- if [[ $MPI_INSTALL == '1' ]]; then pip install -e .[extras]; fi
before_script:
- echo -e "Host github.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
- if [[ $DEVITO_BACKEND == 'yask' ]]; then
conda install -c conda-forge swig; cd ../;
git clone https://github.com/opesci/yask.git;
cd yask; 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 --durations=20 --cov devito tests/; fi
# Run remaining specialized examples and tests
# Additional seismic operator tests
- if [[ $RUN_EXAMPLES == 'True' ]]; then python benchmarks/user/benchmark.py test -P tti -so 4 -a -d 20 20 20 -n 5; fi
- if [[ $RUN_EXAMPLES == 'True' ]]; then python benchmarks/user/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 --full --checkpointing; fi
- if [[ $RUN_EXAMPLES == 'True' ]]; then python examples/seismic/acoustic/acoustic_example.py --constant --full; fi
- if [[ $RUN_EXAMPLES == 'True' ]]; then python examples/seismic/elastic/elastic_example.py --2d; fi
- if [[ $RUN_EXAMPLES == 'True' ]]; then python examples/seismic/elastic/elastic_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/seismic/tti/tti_example.py -a --noazimuth; fi
# Test tutorial notebooks for the website using nbval
- if [[ $RUN_EXAMPLES == 'True' ]]; then py.test --nbval examples/cfd; fi
- if [[ $RUN_EXAMPLES == 'True' ]]; then py.test --nbval examples/seismic/tutorials; fi
- if [[ $RUN_EXAMPLES == 'True' ]]; then py.test --nbval examples/compiler; fi
# Code coverage and documentation generation
- if [[ $INSTALL_TYPE == 'conda' ]]; then
codecov;
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/_build/html --key-path .deploy_key.enc;
fi