Conversation
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite. How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
There was a problem hiding this comment.
Pull request overview
This PR adds Rust build caching to multiple CI workflows to reduce repeated dependency downloads and rebuild time across runs.
Changes:
- Add
actions/cache@v4steps caching Cargo registries (~/.cargo/registry,~/.cargo/git) and the workspacetarget/directory in Rust core, ODBC, and JDBC workflows. - Standardize cache step naming and update cache keys for Rust core test lanes (including Windows ARM64).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 7 comments.
| File | Description |
|---|---|
.github/workflows/test-rust-core.yml |
Adds per-job Rust caches for clippy, feature-variant builds, coverage tests, and Windows ARM64 lane. |
.github/workflows/test-odbc.yml |
Adds Rust caches to ODBC unit tests and multi-OS ODBC test matrix jobs. |
.github/workflows/test-jdbc.yml |
Adds a Rust cache to the JDBC full-suite test job. |
You can also share your feedback on Copilot code review. Take the survey.
There was a problem hiding this comment.
Pull request overview
This PR adds GitHub Actions caching to speed up CI by reusing Rust build artifacts (and, for ODBC, C++ test build outputs) across workflow runs.
Changes:
- Added
actions/cache@v4steps to cache Rust Cargo registries (~/.cargo/registry,~/.cargo/git) and build outputs (target) in Rust core, JDBC, and ODBC workflows. - Replaced/standardized existing Rust cache steps in
test-rust-core.ymlwith lane-specific cache keys and restore keys. - Added caching for
odbc_tests/cmake-buildin ODBC test workflows.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
.github/workflows/test-rust-core.yml |
Adds/updates Rust build artifact caching across clippy, build-without-protobuf, core tests, and Windows ARM64 non-FIPS lanes. |
.github/workflows/test-odbc.yml |
Adds Rust build artifact caching to ODBC unit/integration lanes and caches C++ ODBC test build directory. |
.github/workflows/test-jdbc.yml |
Adds Rust build artifact caching for JDBC CI lane. |
You can also share your feedback on Copilot code review. Take the survey.
There was a problem hiding this comment.
Pull request overview
This PR speeds up CI by introducing (and updating) GitHub Actions caching for build artifacts—primarily for Rust workflows—so repeated runs can reuse the Cargo registry and target/ outputs instead of rebuilding everything from scratch.
Changes:
- Added caching of Cargo registry (
~/.cargo/registry,~/.cargo/git) and Rusttarget/outputs in Rust-heavy CI workflows (test-rust-core.yml,test-odbc.yml,test-jdbc.yml) with job-specific cache keys. - Added caching for the C++ ODBC test build directory (
odbc_tests/cmake-build) intest-odbc.yml. - Updated
actions/cacheusage from@v4to@v5in multiple workflows/docs (including Python and pre-commit workflows).
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
doc/woa64/ADR-woa64.md |
Updates the (stale) example snippet to reference actions/cache@v5. |
.github/workflows/test-rust-core.yml |
Adds separate caches for Cargo registry and target/ across Rust core lanes; updates tarpaulin cache action version. |
.github/workflows/test-python.yml |
Updates uv cache restore steps to use actions/cache@v5. |
.github/workflows/test-odbc.yml |
Adds Cargo registry + target/ caching for Rust ODBC builds and caches odbc_tests/cmake-build for C++ ODBC tests. |
.github/workflows/test-jdbc.yml |
Adds Cargo registry + target/ caching ahead of Rust builds for JDBC CI. |
.github/workflows/pre-commit.yml |
Updates Rust and pre-commit hook caching steps to use actions/cache@v5. |
You can also share your feedback on Copilot code review. Take the survey.
a1a8b0d to
9f9f0e4
Compare
9f9f0e4 to
292209c
Compare
7d47d9e to
dea4ea0
Compare
292209c to
11ab824
Compare
dea4ea0 to
7f421af
Compare
b4bf252 to
4ea309a
Compare
01bd26c to
2c5ac81
Compare
f960b42 to
e25b266
Compare
163bac1 to
74cd987
Compare
e25b266 to
3a45dc7
Compare
3a45dc7 to
b2517bb
Compare
74cd987 to
61b43b1
Compare
b2517bb to
0d2fa64
Compare
0d2fa64 to
30e8c94
Compare
There was a problem hiding this comment.
Pull request overview
This PR improves CI performance by adding/standardizing caching for Rust build artifacts in GitHub Actions workflows and by allowing the Python build hook to use a stable Cargo target directory (enabling incremental compilation and CI cache reuse).
Changes:
- Added Cargo registry (
~/.cargo/registry,~/.cargo/git) and Rusttargetdirectory caching to Rust-heavy CI workflows. - Updated multiple workflows/docs to use
actions/cache@v5. - Updated
python/hatch_build.pyto optionally useCORE_CARGO_TARGET_DIRfor a stable Rust build output directory (instead of always using a temporary directory).
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
python/hatch_build.py |
Adds support for stable Cargo target dir (CORE_CARGO_TARGET_DIR) to enable incremental builds/caching. |
doc/woa64/ADR-woa64.md |
Updates cache action reference from @v4 to @v5 in documentation snippet. |
.github/workflows/test-rust-core.yml |
Introduces separate caches for Cargo registry and target across core Rust jobs, using actions/cache@v5. |
.github/workflows/test-python.yml |
Adds a shared sf_core build job and proto/vcpkg caching; also upgrades uv cache steps to actions/cache@v5. |
.github/workflows/test-odbc.yml |
Adds Cargo registry and target caching plus caching for C++ ODBC test build outputs. |
.github/workflows/test-jdbc.yml |
Adds Cargo registry and target caching for JDBC workflow runs. |
.github/workflows/pre-commit.yml |
Upgrades cache steps to actions/cache@v5. |

TL;DR
Upgraded GitHub Actions cache to v5 and added comprehensive Rust build artifact caching across all CI workflows to improve build performance, plus introduced a new
build_sf_corejob to eliminate redundant Rust compilation in Python wheel builds.What changed?
Cache Action Upgrades:
actions/cache@v4toactions/cache@v5across pre-commit.yml, test-python.yml workflows and documentationNew Rust Build Caching:
rust-jdbc-targetkeyrust-odbc-unit-target), integration tests (rust-odbc-target), and C++ ODBC test builds (cpp-odbc-tests)rust-clippy-target), no-protobuf builds (rust-no-protobuf-target), core tests (rust-core-test-target), and ARM64 builds (rust-arm64-nonfips-target)Python Workflow Optimization:
build_sf_corejob that builds the Rust library once per platform and shares it via artifactsbuild_wheeljob to download pre-built sf_core instead of compiling it for each Python versionSKIP_CORE_BUILD=trueenvironment variable and proto generator target cachingCORE_CARGO_TARGET_DIRfor stable target directoriesBuild Script Enhancement:
python/hatch_build.pyto use stable target directories whenCORE_CARGO_TARGET_DIRis set, enabling incremental compilation and CI cachingEach cache configuration stores
~/.cargo/registry,~/.cargo/git, andtargetdirectories with OS-specific keys based onCargo.lockhash and includes fallback restore keys for broader cache reuse.How to test?
Run the existing CI workflows and verify:
build_sf_corejob successfully builds and uploads artifactsWhy make this change?
Caching Rust build artifacts dramatically reduces CI build times by avoiding recompilation of dependencies and previously built code. The new
build_sf_corejob eliminates ~12-17 minutes of redundant Rust compilation per Python version in the build matrix. This leads to faster feedback cycles, reduced resource usage, and improved developer productivity. The upgrade to cache v5 provides better performance and reliability.