-
Notifications
You must be signed in to change notification settings - Fork 9
58 lines (48 loc) · 1.57 KB
/
example.yaml
File metadata and controls
58 lines (48 loc) · 1.57 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
name: Examples
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
runs-on: ubuntu-latest
env:
DEVITO_ARCH: gcc
DEVITO_LANGUAGE: "openmp"
strategy:
# Prevent all build to stop if a single one fails
fail-fast: false
matrix:
ndim: ['1', '2', '3']
steps:
- name: Checkout devito
uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install dependencies
run: |
pip install --upgrade pip
pip install -e .
- name: Seismic acoustic examples
run: |
python seismic/acoustic/acoustic_example.py --full -nd ${{ matrix.ndim }}
python seismic/acoustic/acoustic_example.py --constant --full -nd ${{ matrix.ndim }}
- name: Seismic advanced examples
if: matrix.ndim > 1
run: |
python seismic/acoustic/acoustic_example.py --full --checkpointing -nd ${{ matrix.ndim }}
python seismic/tti/tti_example.py -a basic -nd ${{ matrix.ndim }}
python seismic/tti/tti_example.py -a basic --noazimuth -nd ${{ matrix.ndim }}
python seismic/elastic/elastic_example.py -nd ${{ matrix.ndim }}
python seismic/viscoelastic/viscoelastic_example.py -nd ${{ matrix.ndim }}
- name: Tutorials
if: matrix.ndim > 1
run: py.test --nbval --ignore-glob=seismic/tutorials/TLE*.ipynb seismic/tutorials/