Skip to content

Save release dependency caches straight after building - #529

Merged
mtrojnar merged 1 commit into
masterfrom
ci/release-cache-save-early
Nov 5, 2026
Merged

mtrojnar merged 1 commit into
masterfrom
ci/release-cache-save-early

Conversation

@mtrojnar

@mtrojnar mtrojnar commented Nov 5, 2026

Copy link
Copy Markdown
Owner

Problem

The macOS and Windows release jobs cache their zlib and OpenSSL builds with the combined actions/cache action. It saves in a post-job step, and only if the whole job succeeds. Any later failure, such as a failing test or the fail-fast cancellation of the other matrix job, throws away a fresh OpenSSL build, which takes about 8–10 minutes on Windows.

Fix

Split each cache into actions/cache/restore before the build and actions/cache/save right after it.

Validation

I ran the workflow via workflow_dispatch from a temporary branch.

  • With a step forcing a failure at the end of every macOS and Windows job (42087423433), 7 of the 8 caches were saved. The eighth job was cancelled mid-build by fail-fast, so it had nothing to save.
  • Without the forced failure (42090343071), the 7 caches were restored and their builds skipped, and the remaining build saved its cache. A rerun restored all 8, skipped every build, and passed all tests.

The macOS and Windows release jobs cached their zlib and OpenSSL builds
with the combined actions/cache action, which saves in a post-job step
and only when the whole job succeeds. A later failure, such as a failing
test or the fail-fast cancellation of the other matrix job, discarded a
fresh build, and the next attempt had to repeat it.

Split each cache into a restore step and a save step that runs straight
after the corresponding build.
@mtrojnar
mtrojnar merged commit a79398a into master Nov 5, 2026
10 checks passed
@mtrojnar
mtrojnar deleted the ci/release-cache-save-early branch November 5, 2026 19:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant