Key the cargo cache on the OpenSSL build it was compiled against (#15570)
* Key the cargo cache on the OpenSSL build it was compiled against
openssl-sys registers cargo:rerun-if-changed on the OpenSSL include
directory, and cargo evaluates that by mtime. The cargo cache was keyed
on the OpenSSL configuration but not on the specific build, so a
cargo cache saved before the library was rebuilt saw "newer" headers on
every run and recompiled openssl-sys, openssl, and everything above
them until the next Cargo.lock or rustc change rotated the key. On
macOS this was happening on every run: the pyca/infra artifact is
newer than the cache.
On macOS and Windows the id of the downloaded artifact becomes part of
the key, which means downloading before the cache step. On linux the
OpenSSL cache key (which, unlike the config hash, includes the build
script hash) is used instead of the config hash.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QZZQDQuPPD8T7jaAsCSHtM
* Trim comments
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QZZQDQuPPD8T7jaAsCSHtM
---------
Co-authored-by: Claude <noreply@anthropic.com>
4 files changed