Skip to content

GitHub actions workflow optimization#101

Open
gloskull wants to merge 2 commits into
Utility-Protocol:mainfrom
gloskull:GitHub-Actions-Workflow-Optimization
Open

GitHub actions workflow optimization#101
gloskull wants to merge 2 commits into
Utility-Protocol:mainfrom
gloskull:GitHub-Actions-Workflow-Optimization

Conversation

@gloskull

Copy link
Copy Markdown
Contributor

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

@JerryIdoko

Copy link
Copy Markdown
Contributor

resolve conflicts @gloskull

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GitHub Actions Workflow Optimization and Parallelization

2 participants