Skip to content

Commit a91ce14

Browse files
authored
ci: use modflow6 pixi env, remove requirements.txt (#48)
remove bespoke environment and use mf6 pixi environment, also fix pymake usage with full --exclude
1 parent 7f80a07 commit a91ce14

3 files changed

Lines changed: 39 additions & 37 deletions

File tree

.github/workflows/integration.yml

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,15 @@ jobs:
2828
repository: MODFLOW-ORG/modflow6
2929
path: modflow6
3030

31-
- name: Setup Micromamba
32-
uses: mamba-org/setup-micromamba@v1
31+
- name: Setup pixi
32+
uses: prefix-dev/setup-pixi@v0.9.1
3333
with:
34-
environment-file: modflow6/environment.yml
35-
cache-environment: true
36-
cache-downloads: true
37-
init-shell: bash
34+
pixi-version: v0.41.4
35+
manifest-path: modflow6/pixi.toml
36+
37+
- name: Custom pixi install
38+
working-directory: modflow6
39+
run: pixi run install
3840

3941
- name: Setup ${{ contains(fromJSON('["macos-14"]'), matrix.os) && 'gcc' || 'intel-classic' }} ${{ contains(fromJSON('["macos-14"]'), matrix.os) && env.GCC_V || env.INTEL_V }}
4042
uses: fortran-lang/setup-fortran@v1
@@ -69,13 +71,12 @@ jobs:
6971
if [[ "${{ matrix.os }}" == "macos-14" ]]; then
7072
setupargs="$setupargs -Doptimization=1"
7173
fi
72-
meson setup builddir $setupargs
73-
meson install -C builddir
74+
pixi run build builddir $setupargs
7475
7576
- name: Get OS tag
7677
id: ostag
7778
run: |
78-
ostag=$(python -c "from modflow_devtools.ostags import get_ostag; print(get_ostag())")
79+
ostag=$(pixi run --manifest-path modflow6/pixi.toml python -c "from modflow_devtools.ostags import get_ostag; print(get_ostag())")
7980
echo "ostag=$ostag" >> $GITHUB_OUTPUT
8081
8182
- name: Build programs
@@ -86,12 +87,12 @@ jobs:
8687
command: |
8788
ostag="${{ steps.ostag.outputs.ostag }}"
8889
mkdir $ostag
89-
make-program : --appdir $ostag -ex gridgen --zip $ostag.zip --verbose
90-
make-program mf2005,mflgr,mfnwt,mfusg --appdir $ostag --double --keep --zip $ostag.zip --verbose
90+
pixi run --manifest-path modflow6/pixi.toml make-program : --appdir $ostag --exclude gridgen --zip $ostag.zip --verbose
91+
pixi run --manifest-path modflow6/pixi.toml make-program mf2005,mflgr,mfnwt,mfusg --appdir $ostag --double --keep --zip $ostag.zip --verbose
9192
if [[ "${{ matrix.os }}" == "macos-14" ]]; then
92-
make-program mf6 --appdir $ostag --keep --zip $ostag.zip --verbose --fflags='-O1'
93+
pixi run --manifest-path modflow6/pixi.toml make-program mf6 --appdir $ostag --keep --zip $ostag.zip --verbose --fflags='-O1'
9394
fi
94-
make-code-json --appdir $ostag --zip $ostag.zip --verbose
95+
pixi run --manifest-path modflow6/pixi.toml make-code-json --appdir $ostag --zip $ostag.zip --verbose
9596
9697
- name: Move programs
9798
run: |
@@ -150,9 +151,9 @@ jobs:
150151
./code.md
151152
152153
- name: Update flopy
153-
working-directory: modflow6/autotest
154-
run: python update_flopy.py
154+
working-directory: modflow6
155+
run: pixi run update-flopy
155156

156157
- name: Test modflow6
157-
working-directory: modflow6/autotest
158-
run: pytest -v -n auto -m "not developmode" --durations 0
158+
working-directory: modflow6
159+
run: pixi run autotest -m "not developmode"

.github/workflows/release.yml

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,11 @@ jobs:
2424
shell: bash
2525

2626
steps:
27-
- name: Checkout repo
28-
uses: actions/checkout@v4
27+
- name: Checkout modflow6
28+
uses: actions/checkout@v5
29+
with:
30+
repository: MODFLOW-ORG/modflow6
31+
path: modflow6
2932

3033
- name: Setup ${{ contains(fromJSON('["macos-14"]'), matrix.os) && 'gcc' || 'intel-classic' }} ${{ contains(fromJSON('["macos-14"]'), matrix.os) && env.GCC_V || env.INTEL_V }}
3134
uses: fortran-lang/setup-fortran@v1
@@ -65,23 +68,26 @@ jobs:
6568
echo "${{ github.repository }} version ${{ steps.tag.outputs.tag }}"
6669
echo "RELEASE_VERSION=${{ steps.tag.outputs.tag }}" >> $GITHUB_ENV
6770
68-
- name: Setup Python
69-
uses: actions/setup-python@v4
71+
- name: Setup pixi
72+
uses: prefix-dev/setup-pixi@v0.9.1
7073
with:
71-
python-version: "3.10"
74+
pixi-version: v0.41.4
75+
manifest-path: modflow6/pixi.toml
7276

73-
- name: Install Python dependencies
74-
run: |
75-
python -m pip install --upgrade pip
76-
pip install -r requirements.txt
77-
pip list
77+
- name: Custom pixi install
78+
working-directory: modflow6
79+
run: pixi run install
7880

7981
- name: Get OS tag
8082
id: ostag
8183
run: |
82-
ostag=$(python -c "from modflow_devtools.ostags import get_ostag; print(get_ostag())")
84+
ostag=$(pixi run --manifest-path modflow6/pixi.toml python -c "from modflow_devtools.ostags import get_ostag; print(get_ostag())")
8385
echo "ostag=$ostag" >> $GITHUB_OUTPUT
8486
87+
# interactive debugging
88+
# - name: Setup tmate session
89+
# uses: mxschmitt/action-tmate@v3
90+
8591
- name: Build programs
8692
uses: nick-fields/retry@v3
8793
with:
@@ -90,12 +96,12 @@ jobs:
9096
command: |
9197
ostag="${{ steps.ostag.outputs.ostag }}"
9298
mkdir $ostag
93-
make-program : --appdir $ostag -ex gridgen --zip $ostag.zip --verbose
94-
make-program mf2005,mflgr,mfnwt,mfusg --appdir $ostag --double --keep --zip $ostag.zip --verbose
99+
pixi run --manifest-path modflow6/pixi.toml make-program : --appdir $ostag --exclude gridgen --zip $ostag.zip --verbose
100+
pixi run --manifest-path modflow6/pixi.toml make-program mf2005,mflgr,mfnwt,mfusg --appdir $ostag --double --keep --zip $ostag.zip --verbose
95101
if [[ "${{ matrix.os }}" == "macos-14" ]]; then
96-
make-program mf6 --appdir $ostag --keep --zip $ostag.zip --verbose --fflags='-O1'
102+
pixi run --manifest-path modflow6/pixi.toml make-program mf6 --appdir $ostag --keep --zip $ostag.zip --verbose --fflags='-O1'
97103
fi
98-
make-code-json --appdir $ostag --zip $ostag.zip --verbose
104+
pixi run --manifest-path modflow6/pixi.toml make-code-json --appdir $ostag --zip $ostag.zip --verbose
99105
100106
- name: Show programs
101107
run: |
@@ -194,8 +200,6 @@ jobs:
194200
# interactive debugging
195201
# - name: Setup tmate session
196202
# uses: mxschmitt/action-tmate@v3
197-
# with:
198-
# limit-access-to-actor: true
199203

200204
- name: Update readme
201205
id: update-readme

requirements.txt

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)