Skip to content

ci: add weekly sharded cargo-mutants + in-diff PR gate (follows #593) - #609

Open
Hero-Gamer wants to merge 3 commits into
reardencode:masterfrom
Hero-Gamer:add-nightly-mutants-job
Open

Hero-Gamer wants to merge 3 commits into
reardencode:masterfrom
Hero-Gamer:add-nightly-mutants-job

Conversation

@Hero-Gamer

@Hero-Gamer Hero-Gamer commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Follows up #593 as requested.

Implements nightly mutants job modeled on fuzz.yml (matrix + artifact pattern) and core-functional.yml (cron + workflow_dispatch + warn-not-fail):

  • Weekly Monday 03:00 UTC, 8 shards on rbitcoin-consensus/primitives/mempool, uploads mutants.out/
  • PR fast lane via --in-diff origin/main with baseline=skip (30min)
  • .cargo/mutants.toml minimal excludes

Local check: cargo mutants --list works, --in-diff --list works.


Set full sweep to weekly instead of nightly — happy to switch to nightly if you prefer.

fuzz.yml / core-functional.yml are nightly because they're ~50min and ~20min. cargo mutants is ~500-1000 cargo test runs — even sharded 8x it's ~60-120min per shard.

Upstream rust-bitcoin does the same and calls it cron-weekly-cargo-mutants.yml for that reason.

PR job (--in-diff) still gives fast feedback on every PR, which catches cases like #593.

If you want true nightly, I can change cron to 17 7 * * * (same as fuzz). Just say the word.

Comment thread .github/workflows/mutants.yml Fixed
Comment thread .github/workflows/mutants.yml Fixed
Comment thread .github/workflows/mutants.yml Fixed
Comment thread .github/workflows/mutants.yml Fixed
@Hero-Gamer
Hero-Gamer force-pushed the add-nightly-mutants-job branch from 024cb66 to 507fc6f Compare September 18, 2026 00:06
@Hero-Gamer
Hero-Gamer force-pushed the add-nightly-mutants-job branch from 507fc6f to 6a491d7 Compare September 18, 2026 00:07
@Hero-Gamer

Copy link
Copy Markdown
Contributor Author

I hope all addressed above.

If you want to change to other frequency just lmk. I think my bot was just worried about the cost so it is set to weekly.

reardencode pushed a commit that referenced this pull request Sep 18, 2026
CodeQL unpinned-tag flagged 5 jobs in ci.yml (fmt, clippy, test, etc)
and 1 in codeql.yml. Pin to same SHA already used in
ci.yml:161,181 / macos.yml / windows.yml / release.yml
(a5f673d0ba8626c3977bb416a1612774bc82181b = toolchain: 1.95.0).

Keep toolchain: 1.95.0 explicit, co-bumped with
Cargo.toml / rust-toolchain.toml / nixpkgs 26.05 / crane 0.23.
This closes last unpinned-tag alerts after #609.
with: { toolchain: '1.95' }
- uses: taiki-e/install-action@82cd3e7658a6f96c86c0234aeeda1748937cb0a1 # v2.86.7
with: { tool: cargo-mutants }
- run: cargo mutants --in-diff origin/${{ github.base_ref }} -- --skip core --exclude-re '^(rbitcoin-node|rbitcoin-cli|bench)' -j 2

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why exclude rbitcoin-node?

contents: read
jobs:
mutants-diff:
if: github.event_name == 'pull_request'

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how long is the execution time on a PR?

name: mutants
on:
schedule:
- cron: '0 3 * * 0'

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

our other long jobs run daily - how long is this weekly job expected to run?

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.

3 participants