forked from devitocodes/devito
-
Notifications
You must be signed in to change notification settings - Fork 2
93 lines (77 loc) · 2.79 KB
/
examples.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
name: Examples
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
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: Examples with conda install
runs-on: ubuntu-latest
defaults:
# Default for conda env
run:
shell: bash -l {0}
env:
DEVITO_ARCH: gcc
DEVITO_LANGUAGE: "openmp"
strategy:
# Prevent all build to stop if a single one fails
fail-fast: false
steps:
- name: Checkout devito
uses: actions/checkout@v3
- name: Setup conda
uses: conda-incubator/setup-miniconda@v2
with:
python-version: "3.10"
activate-environment: devito
environment-file: environment-dev.yml
auto-activate-base: false
- name: Install dependencies
run: |
pip install -e .[tests,extras]
- name: Tests in examples
run: |
py.test --cov --cov-config=.coveragerc --cov-report=xml examples/
- name: Seismic acoustic examples
run: |
python examples/seismic/acoustic/acoustic_example.py --full
python examples/seismic/acoustic/acoustic_example.py --full --checkpointing
python examples/seismic/acoustic/acoustic_example.py --constant --full
python examples/seismic/acoustic/acoustic_example.py --fs
python examples/seismic/inversion/fwi.py
python examples/seismic/self_adjoint/example_iso.py
python examples/seismic/viscoacoustic/viscoacoustic_example.py
python examples/seismic/viscoacoustic/viscoacoustic_example.py -k kv
python examples/seismic/viscoacoustic/viscoacoustic_example.py -k maxwell
- name: Seismic tti examples
run: |
python examples/seismic/tti/tti_example.py -a basic
python examples/seismic/tti/tti_example.py -a basic --noazimuth
python examples/seismic/tti/tti_example.py -k staggered
python examples/seismic/tti/tti_example.py -nd 2 --full -so 12
python examples/seismic/tti/tti_example.py -nd 2 --full -so 4 --checkpointing
- name: Seismic elastic examples
run: |
python examples/seismic/elastic/elastic_example.py
python examples/seismic/viscoelastic/viscoelastic_example.py
- name: Linear algebra example
run: |
python examples/misc/linalg.py mat-vec mat-mat mat-mat-sum transpose-mat-vec
python examples/misc/linalg.py mat-vec -o mat-mat -o mat-mat-sum -o transpose-mat-vec -o
- name: CFD examples
run: |
python examples/cfd/example_diffusion.py
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
name: ${{ matrix.name }}