-
Notifications
You must be signed in to change notification settings - Fork 1
145 lines (123 loc) · 4.09 KB
/
ci.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
name: CI
on:
push:
branches:
- main
pull_request:
schedule:
- cron: '23 3 * * *'
jobs:
flake8:
name: Flake8
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
-
uses: actions/setup-python@v4
with:
# matches compat target in setup.py
python-version: '3.8'
- name: "Flake8 test"
run: |
python3 -m venv myenv
source myenv/bin/activate
python -m pip install wheel
python -m pip install flake8 flake8-quotes
python -m flake8 setup.py driver.py y3prediction/*.py
emirge:
name: Emirge installation
runs-on: ${{ matrix.os }}
strategy:
matrix:
#os: [ubuntu-latest, macos-latest]
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v3
- name: Install emirge
run: |
[[ $(uname) == Linux ]] && sudo apt-get update && sudo apt-get install -y openmpi-bin libopenmpi-dev bsdmainutils libgl1-mesa-glx libegl1
[[ $(uname) == Darwin ]] && brew update && brew install mpich
./buildMirge.sh
cd emirge
source config/activate_env.sh
./version.sh
- name: Run pylint
run: |
source emirge/config/activate_env.sh
python -m pip install wheel
python -m pip install pylint pyyaml
pylint setup.py driver.py y3prediction/*.py
- name: Pytest
run: |
source emirge/config/activate_env.sh
cd test
python -m pip install pytest
python -m pytest .
- name: Eager smoke test
run: |
source emirge/config/activate_env.sh
cd smoke_test
./run.sh
- name: Eager smoke restart test
run: |
source emirge/config/activate_env.sh
cd smoke_test
./run_restart.sh
- name: Eager smoke restart n2 to n7 transition test
run: |
source emirge/config/activate_env.sh
cd smoke_test
./run_transition.sh
- name: Numpy smoke test
run: |
source emirge/config/activate_env.sh
cd smoke_test
./run_numpy.sh
- name: Lazy smoke test
run: |
source emirge/config/activate_env.sh
cd smoke_test
./run_lazy.sh
- name: ESDG smoke test
run: |
source emirge/config/activate_env.sh
cd smoke_test
./run_esdg.sh
- name: Compare smoke_test accuracy
run: |
source emirge/config/activate_env.sh
cd smoke_test/viz_data
TOL_LAZY=1e-2
TOL_NUMPY=1e-2
set -x
for vizfile in $(ls *-eager-*.vtu); do
lazy_vizfile=$(echo ${vizfile/eager/lazy})
python ../../emirge/mirgecom/bin/mirgecompare.py --tolerance $TOL_LAZY ${vizfile} ${lazy_vizfile}
numpy_vizfile=$(echo ${vizfile/eager/numpy})
python ../../emirge/mirgecom/bin/mirgecompare.py --tolerance $TOL_NUMPY ${vizfile} ${numpy_vizfile}
done
- name: Lazy smoke test without wall
run: |
source emirge/config/activate_env.sh
cd smoke_test_nw
./run_lazy.sh
- name: Kitchen sink smoke test
run: |
source emirge/config/activate_env.sh
cd smoke_test_ks
./run_lazy.sh
- name: Kitchen sink 3D smoke test
run: |
source emirge/config/activate_env.sh
cd smoke_test_ks_3d
./run_lazy.sh
- name: 1D shock smoke test
run: |
source emirge/config/activate_env.sh
cd smoke_test_shock1d
./run.sh
- name: smoke test quads lazy
run: |
source emirge/config/activate_env.sh
cd smoke_test_quads
./run_lazy.sh