Skip to content

ci(release): remove release logic from workflow #3058

ci(release): remove release logic from workflow

ci(release): remove release logic from workflow #3058

Workflow file for this run

name: CI
env:
DISTNAME: mf6examples
on:
push:
paths-ignore:
- 'README.md'
- 'DEVELOPER.md'
pull_request:
branches:
- master
- develop
paths-ignore:
- 'README.md'
- 'DEVELOPER.md'
workflow_dispatch:
jobs:
lint:
name: Lint/format example scripts
runs-on: ubuntu-latest
timeout-minutes: 10
defaults:
run:
shell: bash -el {0}
steps:
- name: Checkout MODFLOW 6 examples
uses: actions/checkout@v6
- name: Setup pixi
uses: prefix-dev/setup-pixi@v0.9.4
with:
pixi-version: v0.41.4
- name: Check format
run: pixi run check-format
- name: Check spelling
run: pixi run check-spelling
dist:
name: Build example models
runs-on: ubuntu-latest
needs: lint
defaults:
run:
shell: bash -el {0}
steps:
- name: Checkout MODFLOW6 examples
uses: actions/checkout@v6
with:
path: modflow6-examples
- name: Checkout MODFLOW 6
uses: actions/checkout@v6
with:
repository: MODFLOW-ORG/modflow6
path: modflow6
- name: Setup pixi
uses: prefix-dev/setup-pixi@v0.9.4
with:
pixi-version: v0.41.4
manifest-path: modflow6-examples/pixi.toml
- name: Create Jupyter kernel
working-directory: modflow6-examples
run: pixi run python -m ipykernel install --name python_kernel --user
- name: Update FloPy classes
working-directory: modflow6-examples
run: pixi run update-flopy --releasemode
- name: Install MODFLOW executables
uses: modflowpy/install-modflow-action@v1
- name: Build MODFLOW 6
working-directory: modflow6
run: |
pixi run --manifest-path ../modflow6-examples/pixi.toml meson setup builddir -Ddebug=false --prefix=$(pwd) --libdir=bin
pixi run --manifest-path ../modflow6-examples/pixi.toml meson install -C builddir
pixi run --manifest-path ../modflow6-examples/pixi.toml meson test --verbose --no-rebuild -C builddir
- name: Install MODFLOW 6
working-directory: modflow6
run: cp bin/mf6 ~/.local/bin/modflow/
- name: Create example models
working-directory: modflow6-examples/autotest
# run the scripts via pytest without running the models, just build input files
run: pixi run pytest -v -n=auto --durations=0 test_scripts.py --init
- name: Make zipfile
working-directory: modflow6-examples
run: |
import shutil
shutil.make_archive("${{ env.DISTNAME }}", "zip", "examples")
shell: python
- name: Upload zipfile
uses: actions/upload-artifact@v7
with:
name: ${{ env.DISTNAME }}.zip
path: modflow6-examples/${{ env.DISTNAME }}.zip
docs:
name: Run examples, make docs
runs-on: ubuntu-latest
needs: lint
defaults:
run:
shell: bash -el {0}
env:
MPLBACKEND: agg
steps:
- name: Checkout MODFLOW 6 examples
uses: actions/checkout@v6
with:
path: modflow6-examples
- name: Checkout MODFLOW 6
uses: actions/checkout@v6
with:
repository: MODFLOW-ORG/modflow6
path: modflow6
- name: Checkout usgslatex
uses: actions/checkout@v6
with:
repository: MODFLOW-ORG/usgslatex
path: usgslatex
- name: Setup pixi
uses: prefix-dev/setup-pixi@v0.9.4
with:
pixi-version: v0.41.4
manifest-path: modflow6-examples/pixi.toml
- name: Install LaTeX and extra fonts
run: |
sudo apt-get update
sudo apt install texlive-latex-extra texlive-science fonts-liberation
- name: Install USGS styles and fonts
working-directory: usgslatex/usgsLaTeX
run: sudo ./install.sh --all-users
- name: Set up headless display
uses: pyvista/setup-headless-display-action@v4
- name: Create Jupyter kernel
working-directory: modflow6-examples
run: pixi run python -m ipykernel install --name python_kernel --user
- name: Update FloPy classes
working-directory: modflow6-examples
run: pixi run update-flopy --releasemode
- name: Install MODFLOW executables
uses: modflowpy/install-modflow-action@v1
- name: Build MODFLOW 6
working-directory: modflow6
run: |
pixi run --manifest-path ../modflow6-examples/pixi.toml meson setup builddir -Ddebug=false --prefix=$(pwd) --libdir=bin
pixi run --manifest-path ../modflow6-examples/pixi.toml meson install -C builddir
pixi run --manifest-path ../modflow6-examples/pixi.toml meson test --verbose --no-rebuild -C builddir
- name: Install MODFLOW 6
working-directory: modflow6
run: cp bin/mf6 ~/.local/bin/modflow/
- name: Run examples, make plots
working-directory: modflow6-examples/autotest
run: pixi run pytest -v -n=auto --durations=0 test_scripts.py --plot
- name: Run postprocessing
working-directory: modflow6-examples/scripts
run: pixi run python create-doc-tables.py
- name: Build PDF document
working-directory: modflow6-examples/doc
run: ./build-pdf.sh
- name: Move PDF document
working-directory: modflow6-examples
run: mv doc/${{ env.DISTNAME }}.pdf ${{ env.DISTNAME }}.pdf
- name: Upload PDF document
uses: actions/upload-artifact@v7
with:
name: ${{ env.DISTNAME}}.pdf
path: modflow6-examples/${{ env.DISTNAME }}.pdf