CI: Deduplicate the GMT cache download step into a composite action - #4858
Open
seisman wants to merge 9 commits into
Open
CI: Deduplicate the GMT cache download step into a composite action#4858seisman wants to merge 9 commits into
seisman wants to merge 9 commits into
Conversation
Six workflows (benchmarks, ci_docs, ci_doctests, ci_tests, ci_tests_dev and
ci_tests_legacy) each carried their own copy of the step that downloads the
'gmt-cache' artifact into ~/.gmt. All six were functionally identical; the only
differences were comment drift.
Replace them with a local composite action at
.github/actions/download-gmt-cache, which removes 48 lines and adds 6.
Note that composite actions do not inherit the job's 'defaults.run.shell', so the
action sets 'shell: bash -l {0}' explicitly to match the workflows.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The 'Ensure hyphens are not used in names of directories and Python files' step in style_checks.yaml greps every tracked directory, so '.github/actions/download-gmt-cache' would have failed CI. Rename it to 'download_gmt_cache'. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Member
Author
|
@weiji14 Do you have any comments on this PR? |
Member
|
The code itself looks fine, I'm just not sure how I feel yet about more AI-assisted contributions, whether it should be encouraged or not (should talk about in #4759). |
seisman
marked this pull request as ready for review
August 27, 2026 05:18
Member
Author
Personally, I encourage AI assistance in contributing, but the contributor should be able to understand and explain the changes. Anyway, it should be discussed in #4759. |
weiji14
reviewed
Aug 31, 2026
seisman
commented
Aug 31, 2026
seisman
commented
Aug 31, 2026
Co-authored-by: Wei Ji <23487320+weiji14@users.noreply.github.com> Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
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.
What this does
Six workflows each carried their own copy of the step that downloads the
gmt-cacheartifact into
~/.gmt:benchmarks,ci_docs,ci_doctests,ci_tests,ci_tests_devandci_tests_legacy.They now share
.github/actions/download-gmt-cache:Possible follow-ups, deliberately not done here
Get current week number of year(4 workflows) andmake install(5 workflows) arealso duplicated, but they are 1-2 lines each, so wrapping them likely costs more in
indirection than it saves.
Idea by @seisman, and implemented by Claude Code