CI: pin OpenSSL artifact directory mtimes too (openssl-sys cache, follow-up to #14971)#14972
Merged
Merged
Conversation
cargo's rerun-if-changed on a directory also stats the directories themselves (that's how it detects file deletions), and extraction recreates them with fresh mtimes on every run. With only file mtimes pinned, openssl-sys still recompiled on every Windows/macOS run, as the first CI run with the previous change showed. https://claude.ai/code/session_014StKTjk7GBcVdiWKimEsQb
reaperhulk
approved these changes
Jun 7, 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.
What
Follow-up to #14971: pin directory mtimes too, not just files.
Why
The first CI run with #14971 showed the pin step working (
pinned 386 files in C:/openssl-win64 to 2026-05-29T00:46:07Z) butCompiling openssl-sys v0.9.116still appearing in the windows logs. The reason: cargo'srerun-if-changedon a directory stats the directories themselves as well as the files within (that's how it notices file deletions — a removed file leaves no mtime behind, but the parent directory's mtime changes). Extraction recreates the directory tree with fresh mtimes every run, so the fingerprint stayed dirty.With directories pinned to the artifact's
created_atalongside the files, everything cargo stats under the include dir predates the cached fingerprint, andopenssl-sysshould finally stay cached. Verifiable on this PR's first run: the windows/macos job logs should no longer containCompiling openssl-sys.https://claude.ai/code/session_014StKTjk7GBcVdiWKimEsQb
Generated by Claude Code