Repository navigation
Conversation
Composite actions, scripts and example workflows for building, packaging and releasing MODFLOW program repositories, generalized from mfusg's workflows. Moved from MODFLOW-ORG/release-tooling, so the actions are versioned with modflow-devtools. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
actionlint 1.7.7 rejects YAML aliases for on.<event>.paths. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Move the release-start/finish logic into modflow_devtools/release/workflow.py so it can be tested, and make each stage safe to rerun. Fail before the build when a release has no changelog section. Support extra release assets, drop Intel macOS, take gfortran from pixi and always link compiler runtimes statically, enforce static linkage on every platform, package the same way everywhere, use only the shared git-cliff template at a pinned version, scope the meson version to project(), and update version files atomically. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On Windows, --prepend repeated the changelog header. Insert the new section above the earlier ones in Python, and write the file with LF line endings. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Move the linkage check from bash in check-linkage into modflow_devtools/release/linkage.py, with parsers tested on sample tool output. Binaries may link only libraries the OS provides (allowlists per OS, replacing the compiler runtime denylist, so libstdc++ on Linux now fails), must need glibc 2.34 or older on Linux, and must be arm64 with a minimum macOS of 14.0 on macOS. Binaries are found by file format, recursively, and the check fails if it finds none or a tool fails. The setup action sets MACOSX_DEPLOYMENT_TARGET=14.0 on macOS and drops the discontinued intel-classic compiler. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On dispatch, release-start now fails if the version isn't newer than the highest release tag on origin (vX.Y.Z, or X.Y.Z from before the convention), and in the dual-branch model if that tag isn't reachable from the development branch, as happens when the post-release pull request is squash-merged, which would make the changelog repeat it. Extra asset globs are also matched against the downloaded dist-* artifacts, so files built in other jobs can be attached by uploading them as dist-* artifacts, instead of being rejected as unexpected. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…elogs The shared git-cliff template now recognizes X.Y.Z tags as well as vX.Y.Z, since some programs' older releases were tagged without the v, and links the pull request for commits ending in (#N), as squash merges do, instead of the commit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Nothing uses the changelog action, since release-start and release-finish update CHANGELOG.md and read the notes themselves. Remove the release-start no-op CI job too, which the workflow module's tests cover. Bump actions/setup-python to v7, and say in the docs that the actions are written for Fortran programs, and what C++ programs need to do. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The workflow module's pull request and release calls now go through a GitHub class, so the rest of the module only uses git, and another forge would need only another class with the same methods. Errors and notices go through the ci module, as workflow commands in GitHub Actions and plain text elsewhere. Add a test that each release module runs with only the standard library, since the actions run them without installing anything. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Explain why a GitHub App token is better than the workflow token for the release pull requests, and that release versions are plain integers, so zero padding is dropped. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Link libgcc statically for Intel on Linux too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…of CI Intel's static Windows runtime links imagehlp.dll, a system DLL, for tracebacks. The no-binaries test read stderr, but in Actions errors are annotations on stdout. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…programs The program's name and long name come from release.toml instead of action inputs. Remove release-finish's platforms input, since every release has the same archives, and the version action, which the example workflows don't use. setup links libstdc++ statically on Linux, and checks for gfortran only for Fortran programs. release-start rejects zero-padded versions, and warns when a release's changelog section is empty. A test checks that setup's minimum macOS matches the linkage check's. The docs explain the path input, two-part tags and ubuntu-22.04's glibc. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Release notes are generated from commits into CHANGELOG.md by default. A program whose notes are written by hand names the file holding them, with the same "## Version X.Y.Z" sections, as release-notes.path in release.toml. Then git-cliff doesn't run, and the version's section of that file becomes the release's description. Either way, release-notes.asset can name a document built from the notes, e.g. ReleaseNotes.pdf. release-finish refuses to publish unless it is attached, and the description links to it. The example build workflow has a commented job building it with pandoc. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Shared CI/release tooling for program repos
setup: Intel compilers via setup-fortran, gfortran from the repo's pixi environment (conda-forge), static linking viaLDFLAGS(including libstdc++ on Linux),MACOSX_DEPLOYMENT_TARGET=14.0check-linkage: fail unless binaries dynamically link only system libraries (compiler runtimes static), glibc ≤ 2.34 on Linux, arm64 and macOS ≥ 14.0 on macOSpackage: zipbin/as<ostag>.zipand the source as<name>_source.zip, identically on every platformrelease-start: check the version is newer than the latest tag and has no zero padding (and, for dual branching repos i.e.developandmain/master, that the last release is merged back todevelop)release-finish: publish with optionalextra-assets, from the repo ordist-*artifactsversionchangelogpackagelinkageworkflowconfigrelease.tomlin each program repo for the program's name and long name, and any extra files holding the versiondocs/examples/for program repos to copygit-clifftemplatecliff.tomlmain/master) and dual (develop->main/master) branching modelsThe idea is for each program repo to own its workflows, since they may vary too much to share, but define shared scripts/actions/conventions here. Moving some logic into Python should help if God forbid we are ever forced off GitHub to another git forge/CICD platform.