Skip to content

Commit 6be6837

Browse files
committed
ci: Add basic nogil operator tests
1 parent 9e99c84 commit 6be6837

File tree

1 file changed

+29
-3
lines changed

1 file changed

+29
-3
lines changed

.github/workflows/pytest-core-nompi.yml

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ on:
1616

1717
jobs:
1818
pytest:
19-
name: ${{ matrix.name }}-${{ matrix.set }}
19+
name: ${{ matrix.name }}-${{ matrix.suffix || matrix.set }}
2020
runs-on: "${{ matrix.os }}"
2121

2222
env:
@@ -39,6 +39,7 @@ jobs:
3939
pytest-osx-py312-clang-omp,
4040
pytest-docker-py310-gcc-omp,
4141
pytest-docker-py310-icx-omp,
42+
pytest-docker-py313-gcc-nogil,
4243
pytest-ubuntu-py313-gcc14-omp
4344
]
4445
set: [base, adjoint]
@@ -49,69 +50,91 @@ jobs:
4950
arch: "gcc-11"
5051
language: "CXX"
5152
sympy: "1.14"
53+
test-path: 'tests/'
5254

5355
- name: pytest-ubuntu-py312-gcc12-cxxomp
5456
python-version: '3.12'
5557
os: ubuntu-24.04
5658
arch: "gcc-12"
5759
language: "CXXopenmp"
5860
sympy: "1.13"
61+
test-path: 'tests/'
5962

6063
- name: pytest-ubuntu-py310-gcc14-omp
6164
python-version: '3.10'
6265
os: ubuntu-24.04
6366
arch: "gcc-14"
6467
language: "openmp"
6568
sympy: "1.12"
69+
test-path: 'tests/'
6670

6771
- name: pytest-ubuntu-py311-gcc10-noomp
6872
python-version: '3.11'
6973
os: ubuntu-22.04
7074
arch: "gcc-10"
7175
language: "C"
7276
sympy: "1.14"
77+
test-path: 'tests/'
7378

7479
- name: pytest-ubuntu-py312-gcc13-omp
7580
python-version: '3.12'
7681
os: ubuntu-24.04
7782
arch: "gcc-13"
7883
language: "openmp"
7984
sympy: "1.13"
85+
test-path: 'tests/'
8086

8187
- name: pytest-ubuntu-py310-gcc9-omp
8288
python-version: '3.10'
8389
os: ubuntu-22.04
8490
arch: "custom"
8591
language: "openmp"
8692
sympy: "1.12"
93+
test-path: 'tests/'
8794

8895
- name: pytest-osx-py312-clang-omp
8996
python-version: '3.12'
9097
os: macos-latest
9198
arch: "clang"
9299
language: "openmp"
93100
sympy: "1.12"
101+
test-path: 'tests/'
94102

95103
- name: pytest-docker-py310-gcc-omp
96104
python-version: '3.10'
97105
os: ubuntu-latest
106+
base-image: "cpu-gcc"
98107
arch: "gcc"
99108
language: "openmp"
100109
sympy: "1.13"
110+
test-path: 'tests/'
101111

102112
- name: pytest-docker-py310-icx-omp
103113
python-version: '3.10'
104114
os: ubuntu-latest
115+
base-image: "cpu-icx"
105116
arch: "icx"
106117
language: "openmp"
107118
sympy: "1.13"
119+
test-path: 'tests/'
120+
121+
- name: pytest-docker-py313-gcc-nogil
122+
python-version: '3.13'
123+
os: ubuntu-latest
124+
base-image: "cpu-gcc-nogil"
125+
arch: "gcc"
126+
language: "C"
127+
sympy: "1.14"
128+
test-path: 'tests/test_operator.py'
129+
suffix: 'operator'
108130

109131
- name: pytest-ubuntu-py313-gcc14-omp
110132
python-version: '3.13'
111133
os: ubuntu-24.04
112134
arch: "gcc-14"
113135
language: "openmp"
114136
sympy: "1.14"
137+
test-path: 'tests/'
115138

116139
- set: base
117140
test-set: 'not adjoint'
@@ -123,6 +146,9 @@ jobs:
123146
- name: pytest-osx-py312-clang-omp
124147
set: adjoint
125148

149+
- name: pytest-docker-py313-gcc-nogil
150+
set: adjoint
151+
126152
steps:
127153
- name: Checkout devito
128154
uses: actions/checkout@v5
@@ -137,7 +163,7 @@ jobs:
137163
- name: Build docker image
138164
if: contains(matrix.name, 'docker')
139165
run: |
140-
docker build . --file docker/Dockerfile.devito --tag devito_img --build-arg base=devitocodes/bases:cpu-${{ matrix.arch }}
166+
docker build . --file docker/Dockerfile.devito --tag devito_img --build-arg base=devitocodes/bases:${{ matrix.base-image }}
141167
142168
- name: Set run prefix
143169
run: |
@@ -195,7 +221,7 @@ jobs:
195221
196222
- name: Test with pytest
197223
run: |
198-
${{ env.RUN_CMD }} pytest -k "${{ matrix.test-set }}" -m "not parallel" --cov --cov-config=.coveragerc --cov-report=xml tests/
224+
${{ env.RUN_CMD }} pytest -k "${{ matrix.test-set }}" -m "not parallel" --cov --cov-config=.coveragerc --cov-report=xml "${{ matrix.test-path }}"
199225
200226
- name: Upload coverage to Codecov
201227
if: "!contains(matrix.name, 'docker')"

0 commit comments

Comments
 (0)