Skip to content

ci: add GitHub Actions workflow (check, build, test, clippy)#23

Merged
sbeardsley merged 1 commit into
squirrelsoft-dev:mainfrom
Maladus:Maladus/CI
Jul 19, 2026
Merged

ci: add GitHub Actions workflow (check, build, test, clippy)#23
sbeardsley merged 1 commit into
squirrelsoft-dev:mainfrom
Maladus:Maladus/CI

Conversation

@Maladus

@Maladus Maladus commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Closes #10.

Adds a single ubuntu-latest job that runs the four commands prescribed
in CONTRIBUTING.md:

cargo check
cargo build
cargo test
cargo clippy

Notes

  • Workflow file: .github/workflows/rust.yml (named per the maintainer
    suggestion in issue CI Pipeline #10).
  • Toolchain: stable + clippy component (no rust-toolchain.toml needed;
    stable ≥ 1.85 covers edition = "2024").
  • Caching: Swatinem/rust-cache@v2 with workspaces: . -> target.
  • Two commits on the branch; happy to squash on merge.

Tested

Validated end-to-end on my fork in Maladus#1 — all four steps
green on ubuntu-latest.

Out of scope

  • macos-latest + --features apple job (optional stretch goal
    per the maintainer note; can be a follow-up).
  • cargo fmt --check (not in CONTRIBUTING.md, not requested).

@gemini-code-assist

Copy link
Copy Markdown

Note

Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported.

@Maladus Maladus mentioned this pull request Jul 19, 2026
@Maladus
Maladus marked this pull request as draft July 19, 2026 07:18
@Maladus
Maladus force-pushed the Maladus/CI branch 3 times, most recently from 0b14e52 to d5cde4a Compare July 19, 2026 07:27
@Maladus
Maladus marked this pull request as ready for review July 19, 2026 07:47
Closes squirrelsoft-dev#10.

Adds a single ubuntu-latest job that runs the four commands prescribed
in CONTRIBUTING.md:

    cargo check
    cargo build
    cargo test
    cargo clippy

- Workflow file: .github/workflows/rust.yml
- Toolchain: stable + clippy component (no rust-toolchain.toml needed;
  stable >= 1.85 covers edition = "2024").
- Caching: Swatinem/rust-cache@v2 with workspaces: . -> target.
- Validated end-to-end on #1 (green on ubuntu-latest).

Out of scope (can be follow-ups):
- macos-latest job with --features apple + protoc.
- cargo fmt --check.

ci: migrate to official setup-rust-toolchain and bump checkout to v7

- Replace dtolnay/rust-toolchain@stable with actions-rust-lang/setup-rust-toolchain@v1
- Drop Swatinem/rust-cache (now bundled in the official action)
- Bump actions/checkout@v4 -> @v7 (Node 20 deprecation)
- Set rustflags: "" to preserve previous cargo clippy behavior (the
  official action defaults RUSTFLAGS to -D warnings)

ci: trigger only on main branch
@Maladus

Maladus commented Jul 19, 2026

Copy link
Copy Markdown
Contributor Author

"Currently, Clippy is generating several warnings. We should treat these warnings as errors so that the workflow fails when they are present."

@sbeardsley
sbeardsley merged commit bd3d712 into squirrelsoft-dev:main Jul 19, 2026
sbeardsley added a commit that referenced this pull request Jul 20, 2026
Addresses the follow-ups from PR #23 tracked in issue #29:

- clippy now runs as `--all-targets -- -D warnings` so lint
  regressions gate the build.
- Adds Swatinem/rust-cache with `workspaces: . -> target`. The
  setup-rust-toolchain action bundles rust-cache internally, so its
  `cache` input is disabled to keep one source of caching.
- Pins all actions to full commit SHAs with version comments, and adds
  the github-actions Dependabot ecosystem to keep the pins current.
  Confirmed actions/checkout@v7 is a real, current major (v7.0.1).
- Adds `cargo fmt --all --check`, now that the workspace is
  rustfmt-clean.
- Adds a macos-latest job building and testing `--features apple` to
  cover the Apple Containers path. Clippy is not enforced there yet
  because crates/apple-container has 8 outstanding lints.

Closes #29
sbeardsley added a commit that referenced this pull request Jul 20, 2026
…ple job (#37)

* fix: resolve clippy lints under -D warnings

Apply cargo clippy --fix across the workspace so CI can enforce
`-D warnings` per issue #29 item 1. Covers collapsible_if,
redundant_closure, needless_lifetimes and related lints.

Refs #29

* style: rustfmt the workspace and clear remaining clippy lints

Formats the workspace so `cargo fmt --check` can gate CI (issue #29
item 4), and clears the last two lints: needless_range_loop in
features.rs and a scoped allow for the 8-arg `dev forward` entry point.

Refs #29

* ci: enforce clippy, add rust-cache, pin actions, fmt check, macOS job

Addresses the follow-ups from PR #23 tracked in issue #29:

- clippy now runs as `--all-targets -- -D warnings` so lint
  regressions gate the build.
- Adds Swatinem/rust-cache with `workspaces: . -> target`. The
  setup-rust-toolchain action bundles rust-cache internally, so its
  `cache` input is disabled to keep one source of caching.
- Pins all actions to full commit SHAs with version comments, and adds
  the github-actions Dependabot ecosystem to keep the pins current.
  Confirmed actions/checkout@v7 is a real, current major (v7.0.1).
- Adds `cargo fmt --all --check`, now that the workspace is
  rustfmt-clean.
- Adds a macos-latest job building and testing `--features apple` to
  cover the Apple Containers path. Clippy is not enforced there yet
  because crates/apple-container has 8 outstanding lints.

Closes #29

* no-mistakes(review): add CI permissions and macOS apple clippy gate

* no-mistakes(review): correct macOS job name and apple-container scope comment

* no-mistakes(document): document new fmt and clippy CI gates in contributor docs

* no-mistakes: apply CI fixes

* no-mistakes(review): add CI concurrency cancellation, drop redundant check, reorder clippy

* no-mistakes(review): exempt main from CI concurrency cancellation

* no-mistakes(document): fix rustfmt drift and document apple feature build flag
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.

CI Pipeline

2 participants