ci: key Rust cache on resolved Python version#1554
Merged
Conversation
The Swatinem/rust-cache key didn't include Python's patch version, so when the runner image bumped Python (e.g. 3.14.4 -> 3.14.5) the restored build artifacts kept absolute LIBPATH entries pointing at the prior install dir and the link step failed with LNK1181 looking for python3.lib in the old 3.14.4 path. Reorder setup-python before rust-cache so its output is available, and append the full python-version to the cache key.
Replace the steps-output approach with the env var setup-python sets automatically, removing the need to assign each step an id.
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
Swatinem/rust-cachekey didn't include Python's patch version, so when the GitHub runner image bumped Python (e.g. 3.14.4 → 3.14.5) the restored build artifacts kept absoluteLIBPATHentries pointing at the prior install dir and the link step failed withLNK1181: cannot open input file 'python3.lib'(observed on Windows in run 26251630920).setup-pythonto run beforerust-cachein each workflow and appendenv.pythonLocation(the full install path, which includes the patch version) to the cache key. Applied to all fourrust-cacheuses inci.ymlplusbuild-binaries.ymlandrun-bench.yml.Test plan
build-lint-testjob no longer references a stale Python path in its linker invocation.