-
Notifications
You must be signed in to change notification settings - Fork 1
144 lines (123 loc) · 3.8 KB
/
Copy pathtest-PR-pure-python.yml
File metadata and controls
144 lines (123 loc) · 3.8 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
134
135
136
137
138
139
140
141
142
143
144
name: PR - pure Python tests in Container
on:
pull_request:
branches:
- devel
push:
branches:
- devel
schedule:
# run at 1 a.m. on Sunday
- cron: "0 1 * * 0"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
defaults:
run:
shell: bash
permissions:
contents: read
jobs:
model-tests-in-container-with-reqs:
runs-on: ubuntu-latest
container:
image: ghcr.io/struphy-hub/struphy/ubuntu-with-reqs:latest
credentials:
username: spossann
password: ${{ secrets.GHCR_TOKEN }}
steps:
- name: Check for dockerenv file
run: (ls /.dockerenv && echo Found dockerenv) || (echo No dockerenv)
- name: Checkout repo
uses: actions/checkout@v4
- name: Check .testmondata 1
run: |
ls .testmon* || echo "No .testmondata"
- name: Setup cache for testmon
uses: actions/cache@v4
with:
path: |
.testmondata-pure-python
.testmondata-pure-python-mpi
key: testmon-pure-python-${{ github.ref_name }}-${{ github.event.number }}-${{ github.run_number }}
restore-keys: |
testmon-pure-python-${{ github.ref_name }}-${{ github.event.number }}-
testmon-pure-python-${{ github.ref_name }}
testmon-pure-python-devel
testmon-pure-python-
- name: Check .testmondata 2
run: |
ls .testmon* || echo "No .testmondata"
- name: Install Struphy
shell: bash
run: |
python3 -m venv env
source env/bin/activate
pip install .[dev]
- name: LinearMHD test
shell: bash
env:
TESTMON_DATAFILE: ${{ github.workspace }}/.testmondata-pure-python
run: |
source env/bin/activate
struphy compile --status
struphy test LinearMHD
- name: Vlasov test
shell: bash
env:
TESTMON_DATAFILE: ${{ github.workspace }}/.testmondata-pure-python
run: |
source env/bin/activate
struphy test Vlasov
- name: GuidingCenter test
shell: bash
env:
TESTMON_DATAFILE: ${{ github.workspace }}/.testmondata-pure-python
run: |
source env/bin/activate
struphy test GuidingCenter
- name: VlasovAmpere test
shell: bash
env:
TESTMON_DATAFILE: ${{ github.workspace }}/.testmondata-pure-python
run: |
source env/bin/activate
struphy test VlasovAmpereOneSpecies
- name: EulerSPH test
shell: bash
env:
TESTMON_DATAFILE: ${{ github.workspace }}/.testmondata-pure-python
run: |
source env/bin/activate
struphy test EulerSPH
- name: Vlasov test MPI
shell: bash
env:
TESTMON_DATAFILE: ${{ github.workspace }}/.testmondata-pure-python-mpi
# init .testmondata with non-MPI call
run: |
source env/bin/activate
struphy test Maxwell
struphy test Vlasov --mpi 2
- name: GuidingCenter test MPI
shell: bash
env:
TESTMON_DATAFILE: ${{ github.workspace }}/.testmondata-pure-python-mpi
run: |
source env/bin/activate
struphy test GuidingCenter --mpi 2
- name: VlasovAmpere test MPI
shell: bash
env:
TESTMON_DATAFILE: ${{ github.workspace }}/.testmondata-pure-python-mpi
run: |
source env/bin/activate
struphy test VlasovAmpereOneSpecies --mpi 2
- name: EulerSPH test MPI
shell: bash
env:
TESTMON_DATAFILE: ${{ github.workspace }}/.testmondata-pure-python-mpi
run: |
source env/bin/activate
struphy test EulerSPH --mpi 2