Skip to content

Commit 998f833

Browse files
authored
ci: multiple fixes (#2503)
* skip vtk/pyvista pathlines example on windows for now, I think one of the windows-latest (2025) image updates today broke something which pyvista/vtk/opengl rely on * switch mf6 CI tests to use the mf6 pixi environment, accommodating MODFLOW-ORG/modflow6-examples#275
1 parent 82d9806 commit 998f833

File tree

3 files changed

+64
-48
lines changed

3 files changed

+64
-48
lines changed

.github/workflows/mf6.yml

+57-43
Original file line numberDiff line numberDiff line change
@@ -23,54 +23,65 @@ jobs:
2323

2424
- name: Checkout flopy repo
2525
uses: actions/checkout@v4
26-
27-
- name: Setup Python
28-
uses: astral-sh/setup-uv@v6
2926
with:
30-
cache-dependency-glob: "**/pyproject.toml"
31-
32-
- name: Install FloPy
33-
run: uv sync --all-extras
27+
path: flopy
3428

35-
- name: Install other dependencies from GitHub
36-
run: uv pip install -r etc/requirements.mf6.txt
29+
- name: Checkout MODFLOW 6
30+
uses: actions/checkout@v4
31+
with:
32+
repository: MODFLOW-ORG/modflow6
33+
path: modflow6
3734

3835
- name: Setup GNU Fortran
3936
uses: fortran-lang/setup-fortran@v1
4037
with:
4138
compiler: gcc
4239
version: 13
4340

44-
- name: Checkout MODFLOW 6
45-
uses: actions/checkout@v4
41+
- name: Setup pixi
42+
uses: prefix-dev/[email protected]
4643
with:
47-
repository: MODFLOW-ORG/modflow6
48-
path: modflow6
44+
pixi-version: v0.41.4
45+
manifest-path: modflow6/pixi.toml
4946

50-
- name: Build and install MF6
47+
- name: Install dependencies
5148
working-directory: modflow6
5249
run: |
53-
uv run meson setup builddir --buildtype=debugoptimized --prefix=$(pwd) --libdir=bin
54-
uv run meson install -C builddir
55-
uv run meson test --verbose --no-rebuild -C builddir
50+
pixi run install
51+
pixi run pip install coverage pytest-cov
5652
57-
- name: Update package classes
58-
working-directory: modflow6/autotest
59-
run: uv run update_flopy.py
53+
- name: Install FloPy
54+
working-directory: flopy
55+
run: |
56+
pixi run --manifest-path=../modflow6/pixi.toml pip install --no-deps -e .
57+
pixi run --manifest-path=../modflow6/pixi.toml python -m flopy.mf6.utils.generate_classes --dfnpath ../modflow6/doc/mf6io/mf6ivar/dfn
58+
59+
- name: Build MF6
60+
working-directory: modflow6
61+
run: |
62+
pixi run meson setup builddir --buildtype=debugoptimized --prefix=$(pwd) --libdir=bin
63+
pixi run meson install -C builddir
64+
pixi run meson test --verbose --no-rebuild -C builddir
65+
66+
- name: Build mf5to6 converter
67+
working-directory: modflow6/utils/mf5to6
68+
run: |
69+
pixi run meson setup builddir --prefix=$(pwd)/../../ --libdir=bin
70+
pixi run meson install -C builddir
6071
6172
- name: Install executables
6273
working-directory: modflow6/autotest
6374
env:
6475
GITHUB_TOKEN: ${{ github.token }}
65-
run: uv run pytest -v --durations=0 get_exes.py
76+
run: pixi run pytest -v --durations=0 get_exes.py
6677

6778
- name: Run tests
6879
working-directory: modflow6/autotest
69-
run: uv run pytest -v --cov=flopy --cov-report=xml --cov-append --durations=0 -n auto -m "not repo and not regression"
80+
run: pixi run pytest -v --cov=flopy --cov-report=xml --cov-append --durations=0 -n auto -m "not repo and not regression"
7081

7182
- name: Print coverage report before upload
7283
working-directory: ./modflow6/autotest
73-
run: uv run coverage report
84+
run: pixi run coverage report
7485

7586
- name: Upload coverage to Codecov
7687
if:
@@ -86,9 +97,11 @@ jobs:
8697
run:
8798
shell: bash
8899
steps:
89-
100+
90101
- name: Checkout flopy repo
91102
uses: actions/checkout@v4
103+
with:
104+
path: flopy
92105

93106
- name: Checkout MODFLOW 6
94107
uses: actions/checkout@v4
@@ -102,38 +115,39 @@ jobs:
102115
repository: MODFLOW-ORG/modflow6-examples
103116
path: modflow6-examples
104117

105-
- name: Setup Python
106-
uses: astral-sh/setup-uv@v6
107-
with:
108-
cache-dependency-glob: "**/pyproject.toml"
109-
110-
- name: Install FloPy
111-
run: uv sync --all-extras
112-
113-
- name: Install other dependencies from modflow6-examples and GitHub
114-
run: uv pip install -r etc/requirements.mf6.txt -r modflow6-examples/etc/requirements.pip.txt
115-
116118
- name: Setup GNU Fortran
117119
uses: fortran-lang/setup-fortran@v1
118120
with:
119121
compiler: gcc
120122
version: 13
121123

124+
- name: Setup pixi
125+
uses: prefix-dev/[email protected]
126+
with:
127+
pixi-version: v0.41.4
128+
manifest-path: modflow6/pixi.toml
129+
130+
- name: Install dependencies
131+
working-directory: modflow6
132+
run: pixi run install
133+
134+
- name: Install FloPy
135+
working-directory: flopy
136+
run: |
137+
pixi run --manifest-path=../modflow6/pixi.toml pip install --no-deps -e .
138+
pixi run --manifest-path=../modflow6/pixi.toml python -m flopy.mf6.utils.generate_classes --dfnpath ../modflow6/doc/mf6io/mf6ivar/dfn
139+
122140
- name: Install executables
123141
uses: modflowpy/install-modflow-action@v1
124142

125143
- name: Build and install MF6
126144
working-directory: modflow6
127145
run: |
128-
uv run meson setup builddir --buildtype=debugoptimized --prefix=$(pwd) --libdir=bin
129-
uv run meson install -C builddir
130-
uv run meson test --verbose --no-rebuild -C builddir
146+
pixi run meson setup builddir --buildtype=debugoptimized --prefix=$(pwd) --libdir=bin
147+
pixi run meson install -C builddir
148+
pixi run meson test --verbose --no-rebuild -C builddir
131149
cp bin/* ~/.local/bin/modflow/
132150
133-
- name: Update package classes
134-
working-directory: modflow6/autotest
135-
run: uv run update_flopy.py
136-
137151
- name: Test MF6 examples
138152
working-directory: modflow6-examples/autotest
139-
run: uv run pytest -v -n=auto --durations=0 test_scripts.py
153+
run: pixi run --manifest-path=../../modflow6/pixi.toml pytest -v -n=auto --durations=0 test_scripts.py

.github/workflows/rtd.yml

+7-1
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,13 @@ jobs:
137137

138138
- name: Run tutorial and example notebooks
139139
working-directory: autotest
140-
run: pytest -v -n auto test_notebooks.py
140+
run: |
141+
filters=""
142+
if [[ ${{ runner.os }} == "Windows" ]]; then
143+
# TODO figure out VTK error: GLSL 1.50 is not supported. Supported versions are: 1.10, 1.20, 1.30, and 1.00 ES
144+
filters="not vtk_pathlines"
145+
fi
146+
pytest -v -n auto test_notebooks.py -k "$filters"
141147
142148
- name: Upload notebooks artifact for ReadtheDocs
143149
if: |

etc/requirements.mf6.txt

-4
This file was deleted.

0 commit comments

Comments
 (0)