ci: make MRBind build cache non-fatal#6125
Merged
Merged
Conversation
actions/cache@v5 occasionally exits non-zero in under a second with no log output (seen on PR #6121, windows-2019/Release matrix, run 26152206642 job 76922322315), aborting the whole Build MRBind composite and skipping every downstream step. A cache restore failure should never abort the build: the existing `if: steps.cache.outputs.cache-hit != 'true'` build sub-step already runs from scratch on miss, and `install_mrbind_windows_msys2.bat` (and its Unix equivalent) wipes `build/` before rebuilding, so a partially restored cache directory is safe to fall through. Adding `continue-on-error: true` on the cache step turns transient cache-service blips into a one-off ~10-min rebuild instead of a hard job failure; the post-action save still runs and repopulates the cache for the next run.
Grantim
approved these changes
May 20, 2026
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
Make
actions/cache@v5non-fatal inside thebuild-mrbindcomposite action — a silent cache-service crash should not abort the whole job.Motivation
On PR #6121, the
windows-build-test (msvc-2019, Release, CMake, x64-windows-vs2019-meshlib)job in run 26152206642 failed at theBuild MRBindcomposite step in ~2 seconds with zero log output. Tracing the timeline:Get MRBind submodule SHAsucceededactions/cache@v5started at09:00:14.67Z, the next workflow step's group started at09:00:15.25Z— a 0.57 s gap with no output at all, while the two earlieractions/cache@v5invocations in the same job (CUDA cache, MSYS2 cache) both printedCache restored successfullyas expectedfailure, soGenerate C bindings,Build, tests, archive, upload — all skippedLooks like a transient cache-service blip causing the action to crash before its logger flushes anything. Even with debug logging enabled we'd still pay a full job failure for what should be a recoverable event.
Fix
One-line
continue-on-error: trueon the cache step. On a cache-service error:steps.cache.outputs.cache-hitis empty → the existingif: steps.cache.outputs.cache-hit != 'true'guards on the platform-specificBuild MRBindsub-steps fire → MRBind rebuilds from scratchinstall_mrbind_windows_msys2.bat(and the Unix equivalent) wipesbuild/before rebuilding, so a partially restored cache dir is safeWorst-case cost on a transient failure: one rebuild (~10 min on Windows, less elsewhere) instead of a hard job failure that takes the entire matrix entry down.
Test plan
build-mrbind(run 26155116273): 28 success, 11 skipped, 0 failures across Windows (msvc-2019 + msvc-2022, Debug + Release), Linux vcpkg (x64 + arm64, Debug + Release, GCC 11 + Clang 21), Ubuntu (22.04 + 24.04, arm64 + x64, GCC 12 / 13 / 14), macOS (arm64 Debug + Release, x64 Release), and emscripten (singlethreaded + multithreaded + multithreaded-64bit, build + test).windows-build-test (msvc-2019, Release, CMake, x64-windows-vs2019-meshlib), job 76932415924): the MRBind cache key was unchanged by this PR (onlyaction.ymlwas touched, not the cache-key inputs), so the step hit cache (Cache hit for: mrbind-build-windows-clang18-d5ca6d...), the conditionalBuild MRBind (Windows)sub-step was skipped, and the next workflow step (Generate C bindings) immediately invoked the cachedmrbind/mrbind_gen_cbinaries. Post-action correctly loggedCache hit occurred on the primary key ..., not saving cache.