Skip to content

Commit 59644e0

Browse files
authored
ci(release): fix workflow to pass test markers/filters to extended build (#2528)
some reorganization in the release workflow to consistently pass test markers and filters to the test step (if testing is activated) for both regular and extended build flavors
1 parent 2adcd4d commit 59644e0

File tree

3 files changed

+60
-70
lines changed

3 files changed

+60
-70
lines changed

.github/actions/test-extended-win/action.yml

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,12 @@ runs:
2323
run: |
2424
unix2dos -n "%GITHUB_WORKSPACE%\modflow6\.github\common\test_modflow6_extended.bat" "%TEMP%\test_modflow6_extended.bat"
2525
26-
- name: Test programs (extended)
27-
if: github.ref_name != 'master'
28-
shell: cmd
29-
env:
30-
REPOS_PATH: ${{ github.workspace }}
31-
run: |
32-
"%ONEAPI_ROOT%\setvars.bat" intel64 vs2022 && "%TEMP%\test_modflow6_extended.bat"
33-
3426
- name: Test programs (extended)
3527
if: github.ref_name == 'master'
3628
shell: cmd
3729
env:
3830
REPOS_PATH: ${{ github.workspace }}
39-
MARKERS: not developmode
31+
MARKERS: ${{ env.MARKERS }}
32+
FILTERS: ${{ env.FILTERS }}
4033
run: |
4134
"%ONEAPI_ROOT%\setvars.bat" intel64 vs2022 && "%TEMP%\test_modflow6_extended.bat"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
cd "%GITHUB_WORKSPACE%\modflow6\autotest"
2-
pixi run autotest -m "%MARKERS%" --netcdf --parallel
2+
pixi run autotest -m "%MARKERS%" -k "%FILTERS%" --netcdf --parallel

.github/workflows/release.yml

Lines changed: 57 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,20 @@ jobs:
112112
path: modflow6
113113
ref: ${{ inputs.branch }}
114114

115+
- name: Checkout modflow6-testmodels
116+
if: inputs.run_tests == true && runner.os != 'Windows'
117+
uses: actions/checkout@v5
118+
with:
119+
repository: MODFLOW-ORG/modflow6-testmodels
120+
path: modflow6-testmodels
121+
122+
- name: Checkout modflow6-examples
123+
if: inputs.run_tests == true && runner.os != 'Windows'
124+
uses: actions/checkout@v5
125+
with:
126+
repository: MODFLOW-ORG/modflow6-examples
127+
path: modflow6-examples
128+
115129
- name: Setup pixi
116130
uses: prefix-dev/[email protected]
117131
with:
@@ -160,7 +174,17 @@ jobs:
160174
fi
161175
eval "$cmd"
162176
163-
- name: Get OS tag
177+
- name: Update flopy
178+
if: inputs.run_tests == true && runner.os != 'Windows'
179+
working-directory: modflow6
180+
run: |
181+
cmd="pixi run update-flopy"
182+
if [[ "${{ inputs.developmode }}" == "false" ]]; then
183+
cmd="$cmd --releasemode"
184+
fi
185+
eval "$cmd"
186+
187+
- name: Set OS tag
164188
id: ostag
165189
working-directory: modflow6
166190
run: |
@@ -170,6 +194,34 @@ jobs:
170194
fi
171195
echo "ostag=$ostag" >> $GITHUB_OUTPUT
172196
197+
- name: Get executables
198+
if: inputs.run_tests == true && runner.os != 'Windows'
199+
working-directory: modflow6
200+
env:
201+
GITHUB_TOKEN: ${{ github.token }}
202+
run: pixi run get-exes -s
203+
204+
- name: Set markers
205+
if: inputs.run_tests == true
206+
id: set_markers
207+
run: |
208+
markers="not large"
209+
if [[ "${{ inputs.developmode }}" == "false" ]]; then
210+
markers="$markers and not developmode"
211+
fi
212+
echo "markers=$markers" >> $GITHUB_OUTPUT
213+
214+
- name: Set filters
215+
if: inputs.run_tests == true
216+
id: set_filters
217+
run: |
218+
filters=""
219+
if [[ "${{ matrix.os }}" == "macos-14" ]]; then
220+
# comparison fails on macos-14 with optimization=1
221+
filters="not test028_sfr_rewet"
222+
fi
223+
echo "filters=$filters" >> $GITHUB_OUTPUT
224+
173225
# for statically linked gfortran ARM mac build
174226
- name: Hide dylibs (macOS)
175227
if: matrix.os == 'macos-14'
@@ -221,14 +273,11 @@ jobs:
221273
uses: ./modflow6/.github/actions/build-extended-win
222274

223275
- name: Build and test binaries (Windows)
224-
if: runner.os == 'Windows' && matrix.extended && inputs.run_tests && inputs.developmode
225-
uses: ./modflow6/.github/actions/test-extended-win
226-
227-
- name: Build and test binaries (Windows)
228-
if: runner.os == 'Windows' && matrix.extended && inputs.run_tests && !inputs.developmode
276+
if: runner.os == 'Windows' && matrix.extended && inputs.run_tests
229277
uses: ./modflow6/.github/actions/test-extended-win
230278
env:
231-
MARKERS: not developmode
279+
MARKERS: ${{ steps.set_markers.outputs.markers }}
280+
FILTERS: ${{ steps.set_filters.outputs.filters }}
232281

233282
- name: Copy deps to bin dir
234283
if: runner.os == 'Windows' && matrix.extended
@@ -273,59 +322,7 @@ jobs:
273322
with:
274323
name: bin-${{ steps.ostag.outputs.ostag }}
275324
path: modflow6/bin
276-
277-
- name: Checkout modflow6-testmodels
278-
if: inputs.run_tests == true && runner.os != 'Windows'
279-
uses: actions/checkout@v5
280-
with:
281-
repository: MODFLOW-ORG/modflow6-testmodels
282-
path: modflow6-testmodels
283-
284-
- name: Checkout modflow6-examples
285-
if: inputs.run_tests == true && runner.os != 'Windows'
286-
uses: actions/checkout@v5
287-
with:
288-
repository: MODFLOW-ORG/modflow6-examples
289-
path: modflow6-examples
290-
291-
- name: Update flopy
292-
if: inputs.run_tests == true && runner.os != 'Windows'
293-
working-directory: modflow6
294-
run: |
295-
cmd="pixi run update-flopy"
296-
if [[ "${{ inputs.developmode }}" == "false" ]]; then
297-
cmd="$cmd --releasemode"
298-
fi
299-
eval "$cmd"
300-
301-
- name: Get executables
302-
if: inputs.run_tests == true && runner.os != 'Windows'
303-
working-directory: modflow6
304-
env:
305-
GITHUB_TOKEN: ${{ github.token }}
306-
run: pixi run get-exes -s
307-
308-
- name: Set markers
309-
if: inputs.run_tests == true && runner.os != 'Windows'
310-
id: set_markers
311-
run: |
312-
markers="not large"
313-
if [[ "${{ inputs.developmode }}" == "false" ]]; then
314-
markers="$markers and not developmode"
315-
fi
316-
echo "markers=$markers" >> $GITHUB_OUTPUT
317-
318-
- name: Set filters
319-
if: inputs.run_tests == true && runner.os != 'Windows'
320-
id: set_filters
321-
run: |
322-
filters=""
323-
if [[ "${{ matrix.os }}" == "macos-14" ]]; then
324-
# comparison fails on macos-14 with optimization=1
325-
filters="not test028_sfr_rewet"
326-
fi
327-
echo "filters=$filters" >> $GITHUB_OUTPUT
328-
325+
329326
- name: Test MF6
330327
if: inputs.run_tests == true && runner.os != 'Windows'
331328
working-directory: modflow6

0 commit comments

Comments
 (0)