refactor(ci): Consolidate Rust checks and add reusable build actions #934

Merged
tcpipuk merged 2 commits from tom/rust-checks into main 2025-08-28 19:25:04 +00:00

2 commits

Author SHA1 Message Date
37248a4f68
chore: Add reasons for test skips
Some checks failed
Documentation / Build and Deploy Documentation (pull_request) Successful in 58s
Release Docker Image / define-variables (push) Successful in 4s
Documentation / Build and Deploy Documentation (push) Successful in 55s
Checks / Prek / Pre-commit & Formatting (push) Successful in 1m23s
Checks / Prek / Clippy and Cargo Tests (push) Failing after 4m50s
Release Docker Image / merge (push) Has been cancelled
Release Docker Image / build-image (linux/arm64, release, linux-arm64, base) (push) Successful in 14m28s
Release Docker Image / build-image (linux/amd64, release, linux-amd64, base) (push) Has been cancelled
2025-08-28 20:10:05 +01:00
dd22325ea2 refactor(ci): Consolidate Rust checks with optimised toolchain setup
Some checks failed
Release Docker Image / define-variables (push) Successful in 3s
Documentation / Build and Deploy Documentation (pull_request) Successful in 42s
Checks / Prek / Pre-commit & Formatting (push) Successful in 1m19s
Release Docker Image / build-image (linux/amd64, release, linux-amd64, base) (push) Successful in 16m26s
Release Docker Image / build-image (linux/arm64, release, linux-arm64, base) (push) Successful in 18m53s
Release Docker Image / merge (push) Successful in 27s
Checks / Prek / Clippy and Cargo Tests (push) Failing after 2m10s
Merge rust-checks.yml into prek-checks.yml for a unified workflow that
runs formatting and clippy/test checks in parallel jobs.

Add reusable composite actions:
- setup-rust: Smart Rust toolchain management with caching
  * Uses cargo-binstall for pre-built binary downloads
  * Integrates Mozilla sccache-action for compilation caching
  * Workspace-relative paths for better cache control
  * GitHub token support for improved rate limits
- setup-llvm-with-apt: LLVM installation with native dependencies
- detect-runner-os: Consistent OS detection for cache keys

Key improvements:
- Install prek via cargo-binstall --git (crates.io outdated at v0.0.1)
- Download timelord-cli from cargo-quickinstall
- Set BINSTALL_MAXIMUM_RESOLUTION_TIMEOUT=10 to avoid rate limit delays
- Default Rust version 1.87.0 with override support
- Remove redundant sccache stats (handled by Mozilla action)

Significantly reduces CI runtime through binary downloads instead of
compilation while maintaining all existing quality checks.
2025-08-28 19:20:14 +01:00