Skip to content

Commit 0ab62ed

Browse files
authored
ci(release): use pixi in release workflow build job (#2521)
just the build job for now. update docs/dist jobs later.
1 parent e298320 commit 0ab62ed

File tree

1 file changed

+20
-30
lines changed

1 file changed

+20
-30
lines changed

.github/workflows/release.yml

Lines changed: 20 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -121,16 +121,6 @@ jobs:
121121
working-directory: modflow6
122122
run: pixi run pip install xugrid xarray netcdf4
123123

124-
- name: Setup Micromamba
125-
uses: mamba-org/setup-micromamba@v1
126-
with:
127-
environment-file: modflow6/environment.yml
128-
cache-downloads: true
129-
cache-environment: true
130-
init-shell: >-
131-
bash
132-
powershell
133-
134124
- name: Setup ${{ matrix.compiler }} ${{ matrix.version }}
135125
if: (!(runner.os == 'Windows' && matrix.extended))
136126
id: setup-fortran
@@ -156,7 +146,7 @@ jobs:
156146
working-directory: modflow6/distribution
157147
run: |
158148
ver="${{ steps.set_version.outputs.version }}"
159-
cmd="python update_version.py -v $ver"
149+
cmd="pixi run update-version -v $ver"
160150
if [[ "${{ inputs.approve }}" == "true" ]]; then
161151
cmd="$cmd --approve"
162152
fi
@@ -168,7 +158,7 @@ jobs:
168158
- name: Get OS tag
169159
id: ostag
170160
run: |
171-
ostag=$(python -c "from modflow_devtools.ostags import get_ostag; print(get_ostag())")
161+
ostag=$(pixi run python -c "from modflow_devtools.ostags import get_ostag; print(get_ostag())")
172162
if [[ "${{ matrix.extended }}" == "true" ]]; then
173163
ostag="${ostag}ext"
174164
fi
@@ -196,16 +186,16 @@ jobs:
196186
if: (!(runner.os == 'Windows' && matrix.extended))
197187
working-directory: modflow6
198188
run: |
199-
meson setup builddir --prefix=$(pwd) --libdir=bin -Doptimization=${{ matrix.optimization }}
200-
meson install -C builddir
201-
meson test --verbose --no-rebuild -C builddir
189+
pixi run setup builddir -Doptimization=${{ matrix.optimization }}
190+
pixi run build builddir
191+
pixi run test builddir
202192
203193
- name: Build mf5to6 converter
204194
if: (!(runner.os == 'Windows' && matrix.extended))
205-
working-directory: modflow6/utils/mf5to6
195+
working-directory: modflow6
206196
run: |
207-
meson setup builddir --prefix=$(pwd)/../../ --libdir=bin -Doptimization=${{ matrix.optimization }}
208-
meson install -C builddir
197+
pixi run setup-mf5to6 builddir -Doptimization=${{ matrix.optimization }}
198+
pixi run build-mf5to6 builddir
209199
210200
- name: Check architecture (macOS)
211201
working-directory: modflow6/bin
@@ -290,18 +280,18 @@ jobs:
290280
if: inputs.run_tests == true && runner.os != 'Windows'
291281
working-directory: modflow6
292282
run: |
293-
cmd="python -m flopy.mf6.utils.generate_classes --dfnpath doc/mf6io/mf6ivar/dfn"
283+
cmd="pixi run update-flopy"
294284
if [[ "${{ inputs.developmode }}" == "false" ]]; then
295285
cmd="$cmd --releasemode"
296286
fi
297287
eval "$cmd"
298288
299289
- name: Get executables
300290
if: inputs.run_tests == true && runner.os != 'Windows'
301-
working-directory: modflow6/autotest
291+
working-directory: modflow6
302292
env:
303293
GITHUB_TOKEN: ${{ github.token }}
304-
run: pytest -v --durations 0 get_exes.py
294+
run: pixi run get-exes -s
305295

306296
- name: Set markers
307297
if: inputs.run_tests == true && runner.os != 'Windows'
@@ -326,25 +316,25 @@ jobs:
326316
327317
- name: Test MF6
328318
if: inputs.run_tests == true && runner.os != 'Windows'
329-
working-directory: modflow6/autotest
319+
working-directory: modflow6
330320
env:
331321
REPOS_PATH: ${{ github.workspace }}
332-
run: pytest -v -n auto -m "${{ steps.set_markers.outputs.markers }} and not external" -k "${{ steps.set_filters.outputs.filters }}"
322+
run: pixi run autotest -m "${{ steps.set_markers.outputs.markers }} and not external" -k "${{ steps.set_filters.outputs.filters }}"
333323

334324
- name: Test MF6 models
335325
if: inputs.run_tests == true && runner.os != 'Windows'
336-
working-directory: modflow6/autotest
326+
working-directory: modflow6
337327
env:
338328
REPOS_PATH: ${{ github.workspace }}
339-
run: pytest -v -n auto -m "${{ steps.set_markers.outputs.markers }} and external" -k "${{ steps.set_filters.outputs.filters }}" --models-path ../../modflow6-testmodels/mf6
329+
run: pixi run autotest -m "${{ steps.set_markers.outputs.markers }} and external" -k "${{ steps.set_filters.outputs.filters }}" --models-path ../../modflow6-testmodels/mf6
340330

341331
- name: Test converter models
342332
if: inputs.run_tests == true && runner.os != 'Windows'
343-
working-directory: modflow6/autotest
333+
working-directory: modflow6
344334
env:
345335
REPOS_PATH: ${{ github.workspace }}
346-
run: pytest -v -n auto -m "${{ steps.set_markers.outputs.markers }} and external" -k "${{ steps.set_filters.outputs.filters }}" --models-path ../../modflow6-testmodels/mf5to6 --namefile-pattern "*.nam"
347-
336+
run: pixi run autotest -m "${{ steps.set_markers.outputs.markers }} and external" -k "${{ steps.set_filters.outputs.filters }}" --models-path ../../modflow6-testmodels/mf5to6 --namefile-pattern "*.nam"
337+
348338
- name: Upload failed test output
349339
if: failure()
350340
uses: actions/upload-artifact@v4
@@ -378,10 +368,10 @@ jobs:
378368

379369
- name: Test distribution scripts
380370
if: ${{ inputs.run_tests == true && runner.os != 'Windows' }}
381-
working-directory: modflow6/distribution
371+
working-directory: modflow6
382372
env:
383373
GITHUB_TOKEN: ${{ github.token }}
384-
run: pytest -v --durations 0
374+
run: pixi run test-dist-scripts
385375

386376
docs:
387377
name: Build docs

0 commit comments

Comments
 (0)