fix: Improve CI reliability and minor code cleanup#17
Open
hobostay wants to merge 1 commit into
Open
Conversation
- Add `rust-toolchain.toml` to pin Rust 1.85+ (required for edition 2024) - Add `dtolnay/rust-toolchain` action to CI workflows for consistent toolchain - Add `Swatinem/rust-cache` action to CI workflows for faster builds - Remove redundant `cargo test` step in Windows workflow (already run by `Invoke-Build Build,Test`) - Add `.DS_Store` to `.gitignore` - Simplify `provenance.path_commit.clone().unwrap_or_else(...)` to `as_deref().unwrap_or(...)` in planner.rs to avoid unnecessary allocation Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Owner
|
Hey, |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR aims to make CI runs more deterministic and faster by pinning the Rust toolchain and adding standard Rust setup/caching steps, alongside a small runtime allocation cleanup in the planner and a macOS .gitignore tweak.
Changes:
- Added
rust-toolchain.tomlto pin Rust to 1.85 (aligning withedition = "2024"). - Updated both Linux and Windows GitHub Actions workflows to install the Rust toolchain and enable Cargo dependency caching; removed a redundant Windows test step.
- Minor cleanup: avoid an unnecessary allocation when formatting
Source-Path-Commit, and ignore.DS_Storefiles.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
src/planner.rs |
Reduces allocation when formatting optional provenance commit information. |
rust-toolchain.toml |
Pins the Rust toolchain version for consistent local/CI builds. |
.gitignore |
Ignores macOS .DS_Store files. |
.github/workflows/build-windows.yml |
Adds Rust toolchain setup + caching; removes redundant cargo test step. |
.github/workflows/build-linux.yml |
Adds Rust toolchain setup + caching for consistent builds. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
165
to
171
| format!( | ||
| "Source-Path-Commit: {}", | ||
| provenance | ||
| .path_commit | ||
| .clone() | ||
| .unwrap_or_else(|| "(none)".to_string()) | ||
| .as_deref() | ||
| .unwrap_or("(none)") | ||
| ), |
Copilot AI
added a commit
that referenced
this pull request
May 13, 2026
…copilot-review-instructions Agent-Logs-Url: https://github.com/mwallner/mergetopus/sessions/97054294-dd96-4aac-b561-7c510fad2be6 Co-authored-by: mwallner <5354972+mwallner@users.noreply.github.com>
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
rust-toolchain.tomlto pin minimum Rust version (1.85, required foredition = "2024")dtolnay/rust-toolchain@stableaction to both CI workflows for consistent Rust version across runnersSwatinem/rust-cache@v2action to both CI workflows for faster builds via dependency cachingcargo teststep in Windows workflow (tests already run byInvoke-Build Build,Test).DS_Storeto.gitignorefor macOS contributorsprovenance.path_commit.clone().unwrap_or_else(|| "(none)".to_string())toas_deref().unwrap_or("(none)")to avoid an unnecessary heap allocationDetails
rust-toolchain.tomlwithchannel = "1.85"dtolnay/rust-toolchain@stablestepSwatinem/rust-cache@v2stepbuild-windows.ymlcargo test(already inInvoke-Build Build,Test).DS_Storeignore.gitignore.DS_Store.clone()src/planner.rs:169as_deref().unwrap_or()insteadTest plan
cargo buildcargo test🤖 Generated with Claude Code