forked from devitocodes/devito
-
Notifications
You must be signed in to change notification settings - Fork 0
133 lines (110 loc) · 4.08 KB
/
tutorials.yml
File metadata and controls
133 lines (110 loc) · 4.08 KB
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
name: Jupyter Notebooks
on:
# Trigger the workflow on push or pull request,
# but only for the master branch
push:
branches:
- master
pull_request:
branches:
- master
jobs:
tutorials:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
env:
DEVITO_ARCH: "${{ matrix.compiler }}"
DEVITO_LANGUAGE: ${{ matrix.language }}
DEVITO_BACKEND: "core"
PYTHON_VERSION: "3.7"
RUN_CMD: ""
strategy:
# Prevent all build to stop if a single one fails
fail-fast: false
matrix:
name: [
tutos-ubuntu-gcc-py37,
tutos-osx-gcc-py37,
tutos-osx-clang-py37,
tutos-docker-gcc-py36
]
include:
- name: tutos-ubuntu-gcc-py37
os: ubuntu-16.04
compiler: gcc-7
language: "openmp"
- name: tutos-osx-gcc-py37
os: macos-latest
compiler: gcc-9
language: "openmp"
- name: tutos-osx-clang-py37
os: macos-latest
compiler: clang
language: "C"
- name: tutos-docker-gcc-py36
os: ubuntu-latest
compiler: gcc
language: "openmp"
steps:
- name: Checkout devito
uses: actions/checkout@v1
- name: Set up Python 3.7
if: matrix.name != 'tutos-docker-gcc-py36'
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Install compilers for OSX
if: runner.os == 'macOS'
run: |
if [ "${{ matrix.compiler }}" = "gcc-9" ]; then
brew install gcc
else
sudo xcode-select -s /Applications/Xcode_12.2.app/Contents/Developer
fi
- name: Build docker image
if: matrix.name == 'tutos-docker-gcc-py36'
run: |
docker build . --file docker/Dockerfile --tag devito_img
echo "::set-env name=RUN_CMD::docker run --rm --name testrun devito_img"
- name: Install dependencies
if: matrix.name != 'tutos-docker-gcc-py36'
run: |
python -m pip install --upgrade pip
pip install -e .
pip install matplotlib blosc
- name: Seismic notebooks
run: |
$RUN_CMD py.test --nbval --cov . --cov-config=.coveragerc --cov-report=xml:seis_coverage.xml -k 'not dask' examples/seismic/tutorials/ # Horrible, but we're still at a loss
$RUN_CMD py.test --nbval --cov . --cov-config=.coveragerc --cov-report=xml:acc_coverage.xml examples/seismic/acoustic/accuracy.ipynb
- name: Dask notebooks
if: runner.os != 'macOS'
run: |
$RUN_CMD py.test --nbval --cov . --cov-config=.coveragerc --cov-report=xml:seis_coverage.xml examples/seismic/tutorials/*dask*.ipynb
- name: Self-adjoint notebooks
run: |
$RUN_CMD py.test --nbval --cov . --cov-config=.coveragerc --cov-report=xml:sa_coverage.xml examples/seismic/self_adjoint/
- name: CFD notebooks
run: |
$RUN_CMD py.test --nbval --cov . --cov-config=.coveragerc --cov-report=xml:cfd_coverage.xml examples/cfd
- name: User api notebooks
run: |
$RUN_CMD py.test --nbval --cov . --cov-config=.coveragerc --cov-report=xml:api_coverage.xml examples/userapi
- name: Compiler notebooks
run: |
$RUN_CMD py.test --nbval --cov . --cov-config=.coveragerc --cov-report=xml:comp_coverage.xml examples/compiler
- name: Finance notebooks
run: |
$RUN_CMD py.test --nbval --cov . --cov-config=.coveragerc --cov-report=xml:comp_coverage.xml examples/finance
- name: Performance notebooks
run: |
$RUN_CMD py.test --nbval --cov . --cov-config=.coveragerc --cov-report=xml:comp_coverage.xml examples/performance
- name: ABC Notebooks
run: |
$RUN_CMD py.test --nbval --cov . --cov-config=.coveragerc --cov-report=xml:comp_coverage.xml examples/seismic/abc_methods
- name: Upload coverage to Codecov
if: matrix.name != 'tutos-docker-gcc-py36'
uses: codecov/codecov-action@v1.0.6
with:
token: ${{ secrets.CODECOV_TOKEN }}
name: ${{ matrix.name }}
file: ./*_coverage.xml