CI: lint, licence, cache and dependency-update checks #265

Open
opened 2026-11-26 04:18:03 +00:00 by github-bot · 4 comments
Owner

@⁠sombraSoft on GitHub · 2026-11-23 22:07 UTC · original

CI today (.github/workflows/ci.yml) builds the workspace and runs the tests on a Windows runner. It does not check lints, licences or dependency updates, and its cache has a couple of gaps. I'd like to send a few small, independent PRs for this. Each one is a draft until its CI run on my fork is green, each can be merged or dropped on its own, and none of them touches crates/xcl/src.

Measured on main (9ab7d76), Rust 1.97.1:

Today Proposal
Dependency updates No .github/dependabot.yml Dependabot for github-actions and cargo, weekly, minor/patch grouped, at most 5 open PRs. PR checks skips Dependabot's PRs, because they cannot fill in the description template.
Cache actions/cache keyed on Cargo.lock + Cargo.toml, not on the rustc version, so after each stable release every dependency is rebuilt on every run until Cargo.lock changes. Every PR that changes a Cargo.toml stores its own ~280 MB cache. Swatinem/rust-cache@v2, which keys on the compiler. Only main saves caches; PRs restore from them.
rustc warnings cargo build --workspace has 0 warnings, but nothing enforces it RUSTFLAGS=-D warnings in the CI job only. Local builds are unchanged.
Licences CONTRIBUTING requires GPL-2.0-compatible dependencies, but nothing checks it cargo-deny (licences, bans, sources) as a CI job on Ubuntu. Advisories run daily and when Cargo.lock changes, so a new RUSTSEC entry does not turn unrelated PRs red.
Clippy Not run. ~630 warnings with --all-targets on rustc 1.100 (310 of them missing_safety_doc) A clippy job that only warns: the warnings are listed in its log and never block a merge.
Script test scripts/test-native-stderr.tests.ps1 is never run in CI A small job runs it under both Windows PowerShell 5.1 and pwsh
Action versions actions/checkout@v4 and actions/cache@v4 run on Node 20, which GitHub now flags as deprecated Bump to the current majors (Dependabot keeps them current afterwards)
Path filters Every PR runs the full Windows build and tests, including docs-only PRs A small changes job decides which jobs a PR needs (for example, docs-only PRs skip the Rust build). The workflow itself always runs, so required checks still report (a workflow-level paths: filter would leave them stuck on "Expected"). Skipped jobs count as passing, and pushes to main always run everything.

The new checks run as separate parallel jobs, so CI does not get slower.

PRs (filled in as they open):

  • Dependabot: #272
  • rust-cache: #274
  • rustc warnings deny: #275
  • cargo-deny: #276
  • clippy (warnings only): #277
  • script test in CI: #279
  • action version bump: #286
  • path filters: #287

AI use: the measurements and this write-up were made with Claude Code (Claude Opus 5.5); I checked the numbers.

**@⁠sombraSoft** on GitHub · 2026-11-23 22:07 UTC · [original](https://github.com/xcl-dev/xcl/issues/265) CI today (`.github/workflows/ci.yml`) builds the workspace and runs the tests on a Windows runner. It does not check lints, licences or dependency updates, and its cache has a couple of gaps. I'd like to send a few small, independent PRs for this. Each one is a draft until its CI run on my fork is green, each can be merged or dropped on its own, and none of them touches `crates/xcl/src`. Measured on `main` (9ab7d76), Rust 1.97.1: | | Today | Proposal | |---|---|---| | Dependency updates | No `.github/dependabot.yml` | Dependabot for `github-actions` and `cargo`, weekly, minor/patch grouped, at most 5 open PRs. `PR checks` skips Dependabot's PRs, because they cannot fill in the description template. | | Cache | `actions/cache` keyed on `Cargo.lock` + `Cargo.toml`, not on the rustc version, so after each stable release every dependency is rebuilt on every run until `Cargo.lock` changes. Every PR that changes a `Cargo.toml` stores its own ~280 MB cache. | `Swatinem/rust-cache@v2`, which keys on the compiler. Only `main` saves caches; PRs restore from them. | | rustc warnings | `cargo build --workspace` has 0 warnings, but nothing enforces it | `RUSTFLAGS=-D warnings` in the CI job only. Local builds are unchanged. | | Licences | CONTRIBUTING requires GPL-2.0-compatible dependencies, but nothing checks it | `cargo-deny` (licences, bans, sources) as a CI job on Ubuntu. Advisories run daily and when `Cargo.lock` changes, so a new RUSTSEC entry does not turn unrelated PRs red. | | Clippy | Not run. ~630 warnings with `--all-targets` on rustc 1.100 (310 of them `missing_safety_doc`) | A clippy job that only warns: the warnings are listed in its log and never block a merge. | | Script test | `scripts/test-native-stderr.tests.ps1` is never run in CI | A small job runs it under both Windows PowerShell 5.1 and `pwsh` | | Action versions | `actions/checkout@v4` and `actions/cache@v4` run on Node 20, which GitHub now flags as deprecated | Bump to the current majors (Dependabot keeps them current afterwards) | | Path filters | Every PR runs the full Windows build and tests, including docs-only PRs | A small `changes` job decides which jobs a PR needs (for example, docs-only PRs skip the Rust build). The workflow itself always runs, so required checks still report (a workflow-level `paths:` filter would leave them stuck on "Expected"). Skipped jobs count as passing, and pushes to `main` always run everything. | The new checks run as separate parallel jobs, so CI does not get slower. PRs (filled in as they open): - [ ] Dependabot: #272 - [ ] rust-cache: #274 - [ ] rustc warnings deny: #275 - [ ] cargo-deny: #276 - [ ] clippy (warnings only): #277 - [ ] script test in CI: #279 - [ ] action version bump: #286 - [ ] path filters: #287 AI use: the measurements and this write-up were made with Claude Code (Claude Opus 5.5); I checked the numbers.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:18:03 +00:00
Author
Owner

@⁠sombraSoft on GitHub · 2026-11-23 22:27 UTC · original

@⁠ivall are these changes welcome? this will guarantee quality is maintained at main especially now with all the new contributors.

**@⁠sombraSoft** on GitHub · 2026-11-23 22:27 UTC · [original](https://github.com/xcl-dev/xcl/issues/265#issuecomment-7115777018) @⁠ivall are these changes welcome? this will guarantee quality is maintained at main especially now with all the new contributors.
Author
Owner

@⁠ivall on GitHub · 2026-11-23 22:42 UTC · original

Yes, please - small independent PRs as you describe. Two conditions: clippy only warns (the tree is not lint-clean, so a failing lint must not block merges until it is), and no cargo fmt --check - the tree is not rustfmt-formatted and reformatting it is not wanted. Dependabot for github-actions and cargo weekly with grouped minor/patch updates is fine; PR checks exempting Dependabot's PRs is fine too. Each PR should say how much it adds to CI time.

**@⁠ivall** on GitHub · 2026-11-23 22:42 UTC · [original](https://github.com/xcl-dev/xcl/issues/265#issuecomment-7116082757) Yes, please - small independent PRs as you describe. Two conditions: **clippy only warns** (the tree is not lint-clean, so a failing lint must not block merges until it is), and **no `cargo fmt --check`** - the tree is not rustfmt-formatted and reformatting it is not wanted. Dependabot for `github-actions` and `cargo` weekly with grouped minor/patch updates is fine; `PR checks` exempting Dependabot's PRs is fine too. Each PR should say how much it adds to CI time.
Author
Owner

@⁠sombraSoft on GitHub · 2026-11-23 22:49 UTC · original

Thanks! Updated to match:

  • Clippy only warns (#277): the job runs cargo clippy --workspace --all-targets and never fails; the warnings are in its log. The allow-list and the -D warnings are gone, and so are the Cargo.toml changes.
  • No cargo fmt --check: the rustfmt proposal is removed from this issue; nothing formats or checks formatting.
  • CI time: every PR now has a CI time section. In short, nothing adds wall time except #287's ~5–7 s changes job (which skips the whole build on docs-only PRs). The new jobs run in parallel and finish before the build: cargo-deny 19 s, scripts 16 s, clippy ~70 s.
  • One ordering note: #275 (-D warnings) changes RUSTFLAGS, which invalidates the current cache. It is best merged after or together with #274 (rust-cache), otherwise every run rebuilds the dependencies until Cargo.lock changes.

All eight PRs are independent, but they touch the same ci.yml header comment, so I'll rebase the rest as they land.

**@⁠sombraSoft** on GitHub · 2026-11-23 22:49 UTC · [original](https://github.com/xcl-dev/xcl/issues/265#issuecomment-7116222698) Thanks! Updated to match: - **Clippy only warns** (#277): the job runs `cargo clippy --workspace --all-targets` and never fails; the warnings are in its log. The allow-list and the `-D warnings` are gone, and so are the `Cargo.toml` changes. - **No `cargo fmt --check`**: the rustfmt proposal is removed from this issue; nothing formats or checks formatting. - **CI time**: every PR now has a **CI time** section. In short, nothing adds wall time except #287's ~5–7 s `changes` job (which skips the whole build on docs-only PRs). The new jobs run in parallel and finish before the build: cargo-deny 19 s, scripts 16 s, clippy ~70 s. - One ordering note: #275 (`-D warnings`) changes `RUSTFLAGS`, which invalidates the current cache. It is best merged after or together with #274 (rust-cache), otherwise every run rebuilds the dependencies until `Cargo.lock` changes. All eight PRs are independent, but they touch the same `ci.yml` header comment, so I'll rebase the rest as they land.
Author
Owner

@⁠sombraSoft on GitHub · 2026-11-23 23:34 UTC · original

@⁠ivall all eight PRs are rebased on current main and their PR checks pass. Their CI runs are waiting for approval, since this is my first contribution here (Actions shows "approval required" on each): #272, #274, #275, #276, #277, #279, #286, #287. Could you approve them when you have a moment?

(The earlier PR description failures came from the switch to pull_request_target: the job reads scripts/pr_check.py at the PR's recorded base commit, which was older than that file until the PRs got a new push. A rebase fixes it; other PRs opened before 0e946cf will hit the same thing.)

**@⁠sombraSoft** on GitHub · 2026-11-23 23:34 UTC · [original](https://github.com/xcl-dev/xcl/issues/265#issuecomment-7117119600) @⁠ivall all eight PRs are rebased on current `main` and their `PR checks` pass. Their `CI` runs are waiting for approval, since this is my first contribution here (Actions shows "approval required" on each): #272, #274, #275, #276, #277, #279, #286, #287. Could you approve them when you have a moment? (The earlier `PR description` failures came from the switch to `pull_request_target`: the job reads `scripts/pr_check.py` at the PR's recorded base commit, which was older than that file until the PRs got a new push. A rebase fixes it; other PRs opened before 0e946cf will hit the same thing.)
This discussion has been locked. Commenting is limited to contributors.
No description provided.