forked from devitocodes/devito
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
96 lines (85 loc) · 3.02 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
sudo: false
language: python
# Environment variable for documentation deployment
# Change author email when website author changes
env:
global:
- ENCRYPTION_LABEL: "1909213e8aea"
- COMMIT_AUTHOR_EMAIL: "[email protected]"
- DEVITO_LOGGING: "INFO"
matrix:
include:
- os: linux
python: "3.6"
env: DEVITO_ARCH=gcc-4.9 DEVITO_OPENMP=0
- os: linux
python: "3.6"
env: DEVITO_ARCH=gcc-5 DEVITO_OPENMP=0
- os: linux
python: "3.6"
env: DEVITO_ARCH=gcc-4.9 DEVITO_OPENMP=1 OMP_NUM_THREADS=2
- os: linux
python: "3.6"
env: DEVITO_ARCH=gcc-4.9 DEVITO_OPENMP=0 DEVITO_BACKEND=yask
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 and 5
packages:
- gcc-4.9
- g++-4.9
- gcc-5
- g++-5
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:
- conda env create -q -f environment.yml python=$TRAVIS_PYTHON_VERSION
- source activate devito
- pip install -e .
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; git checkout develop;
make compiler && make compiler-api; pip install -e .; cd ../devito;
fi
script:
- flake8 --builtins=ArgumentError .
- py.test -vs tests/
# Additional seismic operator tests
- if [[ $DEVITO_BACKEND != 'yask' ]]; then
DEVITO_BACKEND=foreign py.test -vs tests/test_operator.py -k TestForeign;
python examples/seismic/benchmark.py test -P tti -so 4 -a -d 20 20 20 -n 5;
python examples/seismic/benchmark.py test -P acoustic -a;
python examples/seismic/acoustic/acoustic_example.py --full;
python examples/seismic/acoustic/acoustic_example.py --constant --full;
python examples/seismic/acoustic/gradient_example.py;
python examples/checkpointing/checkpointing_example.py;
fi
# Test tutorial notebooks for the website using nbval
- if [[ $DEVITO_BACKEND != 'yask' ]]; then py.test -vs --nbval examples/seismic/tutorials; fi
- if [[ $DEVITO_BACKEND != 'yask' ]]; then py.test -vs --nbval examples/cfd; fi
# Docs generation and deployment
- sphinx-apidoc -f -o docs/ examples
- sphinx-apidoc -f -o docs/ devito devito/yask/*
- if [[ $DEVITO_ARCH == 'gcc-5' ]]; then ./docs/deploy.sh; fi