GitHub actions workflow optimization#101
Open
gloskull wants to merge 2 commits into
Open
Conversation
…ctions-workflow Optimize and parallelize GitHub Actions CI
Contributor
|
resolve conflicts @gloskull |
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.
Motivation
Reduce CI wall time and improve feedback latency by running independent checks in parallel rather than a single monolithic job.
Enforce least-privilege and reduce wasted runs by adding workflow permissions and concurrency cancellation.
Improve reliability and reproducibility of Rust builds by using a shared Cargo cache and failing explicitly when expected artifacts are missing.
Description
Split the original test-and-lint job into separate parallel jobs: rustfmt, clippy, test, wasm, and fuzz-detection in .github/workflows/ci.yml.
Added permissions: contents: read, concurrency with cancel-in-progress, and per-job timeout-minutes to the workflow.
Restored/standardized caching with Swatinem/rust-cache@v2 using a shared key and adjusted commands to use workspace-aware flags such as cargo clippy --workspace and cargo test --workspace --all-features.
Made WASM upload stricter with if-no-files-found: error and added a dedicated fuzz-infrastructure detection step that verifies contracts/utility_contracts/fuzz.
Added node_modules/ to .gitignore to avoid local dependency noise.
Testing
Verified the workflow YAML parses with ruby -e 'require "psych"; Psych.load_file(".github/workflows/ci.yml")', which succeeded.
Ran cargo fmt --all -- --check, which passed.
Ran cargo test --workspace --all-features, which completed successfully.
Ran cargo clippy --workspace --all-targets --all-features -- -D warnings, which completed successfully.
Closes #83