Conversation
After uploading artifacts to the 'latest' pre-release, call `gh release edit latest --target $(git rev-parse HEAD)` so the release is re-pointed to the current commit. Previously, only assets were replaced while the release tag remained frozen at the old commit, causing the release page to show a stale hash and date. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Upgrade actions/checkout v3->v4 and actions/setup-python v4->v5 across all three CI workflows to address Node.js 20 deprecation warnings. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
- Switch macOS and Windows from actions/cache@v4 to separate cache/restore + cache/save steps so deps (DCMTK, ITK, zlib) are cached even when the build or test step fails - Add if: always() && cache-hit != 'true' guard on save steps - Remove CMakeLists.txt from Windows cache key hash so that dcmqi-only changes don't bust the dep cache (matches macOS) Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
|
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.
Summary
This PR contains three CI workflow improvements across all platforms (Linux, macOS, Windows).
Fix stale commit on
latestprerelease after asset uploadAfter uploading artifacts to the
latestpre-release,gh release edit latest --target $(git rev-parse HEAD)is now called on all three platforms. Previously, only the assets were replaced while the release tag remained frozen at the old commit, causing the release page to show a stale hash and date.Update actions to Node.js 24 compatible versions
actions/checkoutupgradedv3→v4andactions/setup-pythonupgradedv4→v5across all three workflows, addressing Node.js 20 deprecation warnings in the runner.Always save dep caches even on job failure; fix Windows cache key (macOS, Windows)
Problem: Reviewing recent workflow runs showed that the dep cache (DCMTK, ITK, zlib) was never saved after a failed build.
actions/cache@v4only saves on job success by default, so a failed macOS build meant the next run had to rebuild all deps from scratch (~30 min on macOS).Fix: Replaced the single
actions/cache@v4step with separateactions/cache/restore@v4+actions/cache/save@v4steps. The save step usesif: always() && cache-hit != 'true', which saves the dep cache even when a later step (test, packaging) fails, and skips re-uploading when the cache was already a hit.Windows cache key fix: The Windows cache key previously hashed
CMakeLists.txtin addition toCMakeExternals/*.cmake. Changes toCMakeLists.txt(which happen frequently for dcmqi-only changes) were needlessly busting the dep cache. The key now only coversCMakeExternals/*.cmake, consistent with macOS.Test plan
latestrelease target commit updates to the current HEAD after a successful prerelease upload