Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .anvil.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version = 1
tool = "anvil"
tool_version = "0.6.0"
catalog_checksum = "sha256:b1b94e5783dbe34fbf8f9c69a5e14cec3ece374e58876358ef4cd151f3f94e68"
catalog_checksum = "sha256:3415a24c3e1b7216ecfd37ecfda02b4e6039851b70f07e45a676597254874191"

[[file]]
path = ".anvil/container/Dockerfile.dockerignore"
Expand All @@ -21,7 +21,7 @@ checksum = "sha256:d564a0ce424cda58c8f5b2476cf0c8b36e759afbdf8227608bd1f3fc74913

[[file]]
path = ".github/actions/anvil-setup/action.yml"
checksum = "sha256:e1029f7ff95a5966184b4c04ccbed04ee8ba93bfc93bc9ac307d3dcef31374fb"
checksum = "sha256:a8e3cb37301ef39783721603b5145ab73dc79b7b4897c06b43b03db1f224a8a8"

[[file]]
path = ".github/actions/anvil-setup/just-problem-matcher.json"
Expand All @@ -33,15 +33,15 @@ checksum = "sha256:7c43a36153ec346427892dca414fe971da616f99827fb5241167b1cf58a97

[[file]]
path = ".github/workflows/anvil-pr-impl.yml"
checksum = "sha256:70c77226f9efe7252047d9ea4be93a1ac328708e72f4665214cb0c13e06b5c80"
checksum = "sha256:6368d048bf4921279b4f67306b22125cd48778e9d299508af1cb34f67f1de1a5"

[[file]]
path = ".github/workflows/anvil-pr.yml"
checksum = "sha256:0c2530d9a38e6a74e0a7fd4f999b4a1790f97de30b58b68c6c2344600da196f2"

[[file]]
path = ".github/workflows/anvil-scheduled-impl.yml"
checksum = "sha256:ee1261dc018f6bdf3252890b57f0bc9510810c69505a64d3aef6d26315b824a3"
checksum = "sha256:5550d9e336bff247a92cbea1698b38dde7b0f97ae811928f23e023fd773e3652"

[[file]]
path = ".github/workflows/anvil-scheduled.yml"
Expand Down Expand Up @@ -141,7 +141,7 @@ checksum = "sha256:9e9d0cbfef1e1e1586c2af4e9c387719c2f017ea1203d326baacc3ae25df8

[[file]]
path = "justfiles/anvil/checks/msrv-test.just"
checksum = "sha256:9c25b140dcaa4b38db7701fd627dd9a2d5ad5f9bb83d4490c146058bf4328cc8"
checksum = "sha256:3f8690b4b8ec60b1b1aa3f35b32797f7b81eb64b347080ba9ee8b21e1b55ecce"

[[file]]
path = "justfiles/anvil/checks/mutants-diff.just"
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/anvil-setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ runs:

# cargo-binstall keeps the cold bootstrap path fast.
- name: Install cargo-binstall
uses: cargo-bins/cargo-binstall@v1.21.0 # immutable release, the tag cannot be moved
uses: cargo-bins/cargo-binstall@v1.21.0 # pinned by tag: this release is an immutable release (GitHub locks the tag to a commit)

- name: Install just
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ runs:

- name: Install Cargo Tools
if: inputs.cargo-tools != ''
uses: taiki-e/install-action@v2.81.8 # immutable release, the tag cannot be moved
uses: taiki-e/install-action@v2.81.8 # pinned by tag: this release is an immutable release (GitHub locks the tag to a commit)
with:
tool: ${{ steps.expand.outputs.cargo_tools }}

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/anvil-pr-impl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,13 +154,13 @@ jobs:
# write tokens).
- name: Upsert anvil-semver advisory
if: always() && github.event_name == 'pull_request' && matrix.os == 'linux' && github.event.pull_request.head.repo.full_name == github.repository && hashFiles('target/anvil/comments/semver.md') != ''
uses: marocchino/sticky-pull-request-comment@v3.0.5 # immutable release, the tag cannot be moved
uses: marocchino/sticky-pull-request-comment@v3.0.5 # pinned by tag: this release is an immutable release (GitHub locks the tag to a commit)
with:
header: anvil-semver
path: target/anvil/comments/semver.md
- name: Clear anvil-semver advisory
if: always() && github.event_name == 'pull_request' && matrix.os == 'linux' && github.event.pull_request.head.repo.full_name == github.repository && hashFiles('target/anvil/comments/semver.md') == ''
uses: marocchino/sticky-pull-request-comment@v3.0.5 # immutable release, the tag cannot be moved
uses: marocchino/sticky-pull-request-comment@v3.0.5 # pinned by tag: this release is an immutable release (GitHub locks the tag to a commit)
with:
header: anvil-semver
delete: true
Expand Down Expand Up @@ -216,7 +216,7 @@ jobs:
# fails. The separate hashFiles predicates require both feature
# configurations; one multi-pattern call would accept a partial pair.
if: always() && matrix.os != 'windows-arm' && hashFiles('target/coverage/lcov-all-features.info') != '' && hashFiles('target/coverage/lcov-no-default.info') != ''
uses: codecov/codecov-action@v7.0.0 # immutable release, the tag cannot be moved
uses: codecov/codecov-action@v7.0.0 # pinned by tag: this release is an immutable release (GitHub locks the tag to a commit)
with:
files: target/coverage/lcov-all-features.info,target/coverage/lcov-no-default.info
flags: ${{ matrix.os }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/anvil-scheduled-impl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
# the Codecov UI can distinguish PR-tier uploads from scheduled
# uploads while still tracking each platform separately.
if: always() && matrix.os != 'windows-arm' && hashFiles('target/coverage/lcov-all-features.info') != '' && hashFiles('target/coverage/lcov-no-default.info') != ''
uses: codecov/codecov-action@v7.0.0 # immutable release, the tag cannot be moved
uses: codecov/codecov-action@v7.0.0 # pinned by tag: this release is an immutable release (GitHub locks the tag to a commit)
with:
files: target/coverage/lcov-all-features.info,target/coverage/lcov-no-default.info
flags: scheduled,${{ matrix.os }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v4.37.7 # immutable release, the tag cannot be moved
uses: github/codeql-action/init@v4.37.7 # pinned by tag: this release is an immutable release (GitHub locks the tag to a commit)
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
Expand Down Expand Up @@ -98,6 +98,6 @@ jobs:
exit 1

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4.37.7 # immutable release, the tag cannot be moved
uses: github/codeql-action/analyze@v4.37.7 # pinned by tag: this release is an immutable release (GitHub locks the tag to a commit)
with:
category: "/language:${{matrix.language}}"
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,14 +154,14 @@ jobs:

- name: Post Semver Failure Comment
if: steps.semver.outcome == 'failure' && github.event.pull_request.head.repo.full_name == github.repository
uses: marocchino/sticky-pull-request-comment@v3.0.5 # immutable release, the tag cannot be moved
uses: marocchino/sticky-pull-request-comment@v3.0.5 # pinned by tag: this release is an immutable release (GitHub locks the tag to a commit)
with:
header: semver-check
path: semver-comment.txt

- name: Remove Semver Comment on Success
if: steps.semver.outcome == 'success' && github.event.pull_request.head.repo.full_name == github.repository
uses: marocchino/sticky-pull-request-comment@v3.0.5 # immutable release, the tag cannot be moved
uses: marocchino/sticky-pull-request-comment@v3.0.5 # pinned by tag: this release is an immutable release (GitHub locks the tag to a commit)
with:
header: semver-check
delete: true
Expand Down Expand Up @@ -262,7 +262,7 @@ jobs:
- name: Generate Coverage (no-default-features)
run: cargo +${{ env.RUST_NIGHTLY }} llvm-cov --no-default-features --workspace --lcov --output-path lcov-no-def.info
- name: Upload Coverage to Codecov
uses: codecov/codecov-action@v7.0.0 # immutable release, the tag cannot be moved
uses: codecov/codecov-action@v7.0.0 # pinned by tag: this release is an immutable release (GitHub locks the tag to a commit)
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: lcov-all.info,lcov-no-def.info
Expand Down
4 changes: 2 additions & 2 deletions crates/cargo-anvil/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ both locally and in cloud workflows. `pr-fast` is one job, while the
<tr><td rowspan="9"><code>pr-slow</code></td><td rowspan="3"><code>pr-test</code></td><td><a href="https://crates.io/crates/cargo-llvm-cov">llvm-cov</a></td><td>dual feature-config; gated by <a href="https://crates.io/crates/cargo-coverage-gate">cargo-coverage-gate</a></td></tr>
<tr><td><a href="https://doc.rust-lang.org/rustdoc/write-documentation/documentation-tests.html">doc-test</a></td><td>runs both feature configs</td></tr>
<tr><td><a href="https://doc.rust-lang.org/cargo/commands/cargo-build.html">examples</a></td><td>compile-only</td></tr>
<tr><td><code>pr-msrv</code></td><td>msrv-test</td><td>dual feature-config, all-target tests under the declared MSRV</td></tr>
<tr><td><code>pr-msrv</code></td><td>msrv-test</td><td>dual feature-config; lib/bin/integration tests under the declared MSRV (benches and examples are not run)</td></tr>
<tr><td rowspan="4"><code>pr-runtime-analysis</code></td><td><a href="https://github.com/rust-lang/miri">miri</a></td><td>libtest, not nextest</td></tr>
<tr><td><a href="https://crates.io/crates/cargo-careful">careful</a></td><td>self-cleans on a toolchain bump</td></tr>
<tr><td><a href="https://crates.io/crates/loom">loom</a></td><td>opt-in targets only</td></tr>
Expand Down Expand Up @@ -491,7 +491,7 @@ And `docs/verification.md` for the continuous-validation strategy.
This crate was developed as part of <a href="../..">The Oxidizer Project</a>. Browse this crate's <a href="https://github.com/microsoft/ox-tools/tree/main/crates/cargo-anvil">source code</a>.
</sub>

[__cargo_doc2readme_dependencies_info]: ggGmYW0CYXZlMC43LjNhdIQbFhzZ8rzWNNYbuRaDSGWynFgbH4PMdoT7GNcbVwNPtPjAhvFhYvRhcoQbLvVGTNtetQUbnp9vX0Ew7_gbkZEyxfXZXyMbltL72AXa-o1hZIGDa2NhcmdvLWFudmlsZTAuNi4wa2NhcmdvX2Fudmls
[__cargo_doc2readme_dependencies_info]: ggGmYW0CYXZlMC43LjNhdIQbFhzZ8rzWNNYbuRaDSGWynFgbH4PMdoT7GNcbVwNPtPjAhvFhYvRhcoQbVqn03OrTnSYblGjeKgXeGVgb6z3iwQiK18Abc5kLxsXto9xhZIGDa2NhcmdvLWFudmlsZTAuNi4wa2NhcmdvX2Fudmls
[__link0]: https://crates.io/crates/cargo-delta
[__link1]: https://docs.rs/cargo-anvil/0.6.0/cargo_anvil/?search=artifacts::container
[__link10]: https://docs.rs/cargo-anvil/0.6.0/cargo_anvil/?search=artifacts
Expand Down
2 changes: 1 addition & 1 deletion crates/cargo-anvil/docs/design/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ update the recipes or cloud-workflow building blocks.
A user with only `cargo` (no `just`, no `cargo-anvil`) can still run the basics:

```sh
cargo test --workspace --all-targets --all-features --locked
cargo test --workspace --tests --all-features --locked
cargo clippy --workspace --all-targets --all-features --locked -- -D warnings
cargo fmt --check
```
Expand Down
2 changes: 1 addition & 1 deletion crates/cargo-anvil/docs/design/ado.md
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ x86_64 jobs and per-OS affected-package impact sets as `pr_test`, and invokes
`anvil-pr-msrv`. The stage consumes the per-OS impact artifact like the other PR
groups; when the root manifest declares no MSRV, the recipe exits successfully
after reporting that it skipped the test. Otherwise it runs affected-package
`cargo test --all-targets` in all-features and default-features configurations.
`cargo test --tests` in all-features and default-features configurations.
Ordinary stable checks honor a caller-provided `RUSTUP_TOOLCHAIN`. The dedicated
MSRV setup ensures the declared root MSRV is available through rustup.

Expand Down
28 changes: 22 additions & 6 deletions crates/cargo-anvil/docs/design/checks.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,20 +211,36 @@ matrix overhead.

#### `pr-msrv` (minimum-version tests)

When the root manifest declares an MSRV, Anvil runs `cargo test --all-targets`
for affected packages under that compiler. Cargo's all-target set covers
library and binary unit tests, integration tests, examples, and benches as test
targets. Anvil runs exactly two feature configurations: `--all-features` and
When the root manifest declares an MSRV, Anvil runs `cargo test --tests`
for affected packages under that compiler. `--tests` selects every target that
carries `test = true` -- library and binary unit tests, and integration tests.
Anvil runs exactly two feature configurations: `--all-features` and
the default features. It does not add a `--no-default-features` pass; such a
Comment thread
Vaiz marked this conversation as resolved.
pass can exercise feature-negative code, but it is outside the current policy.
This is the all-target test execution at the minimum supported compiler;
This is the test execution at the minimum supported compiler;
`pr-test` runs the same affected suite through coverage instrumentation on the
catalog nightly. Other checks that use the selected stable compiler do not execute
this all-target suite, so an MSRV fallback does not make `pr-msrv` a duplicate.
this suite, so an MSRV fallback does not make `pr-msrv` a duplicate.
A selecting toolchain file does not suppress the MSRV run, even when it selects the
same compiler, because the MSRV group is the authoritative minimum-version test
result.

The check deliberately does **not** use `--all-targets`. That flag expands to
`--lib --bins --tests --benches --examples`, which makes `cargo test` build *and
execute* every bench harness. A bench declared `harness = false` delegates its
run to a separate driver binary -- criterion's, or a profiler runner such as
`gungraun-runner` driving Valgrind -- and `anvil-msrv-test-setup` installs only
the MSRV toolchain, so that driver is absent and the group fails on a
prerequisite it never declares. That failure says nothing about the minimum
supported version. It also matches the repository-wide policy that benches and
examples are compiled but never run: `bench` uses `cargo bench --no-run` and
`examples` uses `cargo build --examples`, and both keep that compile coverage on
the selected stable compiler. `--tests` is preferred over the equivalent
`--lib --bins --tests` because `--lib` errors with "no library targets found" on
a bin-only affected package under impact scoping, the same reason `miri` uses it.
No doctest coverage is lost, since `--all-targets` suppresses doctests too and
`doc-test` owns them.

The group uses the same OS/architecture matrix and per-OS impact sets as `pr-test`
so cfg-gated targets and dependencies are exercised under the MSRV. It runs in
parallel with the other PR groups. When no root MSRV exists,
Expand Down
7 changes: 4 additions & 3 deletions crates/cargo-anvil/docs/design/github.md
Original file line number Diff line number Diff line change
Expand Up @@ -990,8 +990,9 @@ the repository is deleted and recreated, and publishing generates a release
attestation covering the tag, commit SHA and assets. The tag is a stable identifier
under those rules, and unlike a SHA it stays readable in the diff when the pin is
bumped. Generated files carry a
`# immutable release, the tag cannot be moved` comment at each such pin, so the reason
a tag appears where a SHA is otherwise expected is visible at the use site.
`# pinned by tag: this release is an immutable release (GitHub locks the tag to a commit)`
comment at each such pin, so the reason a tag appears where a SHA is otherwise
expected is visible at the use site.

Every other action is pinned by commit SHA with the version in a trailing comment, for
example `actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1`.
Expand Down Expand Up @@ -1031,7 +1032,7 @@ The upload step:
```yaml
- name: Upload coverage to Codecov
if: always() && matrix.os != 'windows-arm' && hashFiles('target/coverage/lcov-all-features.info') != '' && hashFiles('target/coverage/lcov-no-default.info') != ''
uses: codecov/codecov-action@v7.0.0 # immutable release, the tag cannot be moved
uses: codecov/codecov-action@v7.0.0 # pinned by tag: this release is an immutable release (GitHub locks the tag to a commit)
with:
files: target/coverage/lcov-all-features.info,target/coverage/lcov-no-default.info
flags: ${{ matrix.os }}
Expand Down
9 changes: 5 additions & 4 deletions crates/cargo-anvil/docs/design/local.md
Original file line number Diff line number Diff line change
Expand Up @@ -439,9 +439,10 @@ compiler. Anvil does not provision a separate tooling compiler; checks that
require nightly continue to use their catalog-pinned nightly.

When the root manifest declares an MSRV, `anvil-msrv-test` runs affected-package
`cargo test --all-targets` in all-features and default-features configurations
under that compiler. This includes library and binary unit tests, integration
tests, examples, and benches as test targets. It does not add a
`cargo test --tests` in all-features and default-features configurations
under that compiler. This covers library and binary unit tests and integration
tests; benches and examples are deliberately excluded, because `cargo test`
would execute bench harnesses. It does not add a
`--no-default-features` pass. A root toolchain file does not suppress this
minimum-version run. Without a root MSRV the recipe is a no-op.

Expand Down Expand Up @@ -690,7 +691,7 @@ exactly the same arguments cloud workflows uses, because cloud workflows invokes
A user with only `cargo` (no `just`, no `cargo-anvil`) can still run the basics:

```sh
cargo test --workspace --all-targets --all-features --locked
cargo test --workspace --tests --all-features --locked
cargo clippy --workspace --all-targets --all-features --locked -- -D warnings
cargo fmt --check
```
Expand Down
2 changes: 1 addition & 1 deletion crates/cargo-anvil/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@
//! <tr><td rowspan="9"><code>pr-slow</code></td><td rowspan="3"><code>pr-test</code></td><td><a href="https://crates.io/crates/cargo-llvm-cov">llvm-cov</a></td><td>dual feature-config; gated by <a href="https://crates.io/crates/cargo-coverage-gate">cargo-coverage-gate</a></td></tr>
//! <tr><td><a href="https://doc.rust-lang.org/rustdoc/write-documentation/documentation-tests.html">doc-test</a></td><td>runs both feature configs</td></tr>
//! <tr><td><a href="https://doc.rust-lang.org/cargo/commands/cargo-build.html">examples</a></td><td>compile-only</td></tr>
//! <tr><td><code>pr-msrv</code></td><td>msrv-test</td><td>dual feature-config, all-target tests under the declared MSRV</td></tr>
//! <tr><td><code>pr-msrv</code></td><td>msrv-test</td><td>dual feature-config; lib/bin/integration tests under the declared MSRV (benches and examples are not run)</td></tr>
//! <tr><td rowspan="4"><code>pr-runtime-analysis</code></td><td><a href="https://github.com/rust-lang/miri">miri</a></td><td>libtest, not nextest</td></tr>
//! <tr><td><a href="https://crates.io/crates/cargo-careful">careful</a></td><td>self-cleans on a toolchain bump</td></tr>
//! <tr><td><a href="https://crates.io/crates/loom">loom</a></td><td>opt-in targets only</td></tr>
Expand Down
6 changes: 3 additions & 3 deletions crates/cargo-anvil/templates/github/pr-impl-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,13 +154,13 @@ jobs:
# write tokens).
- name: Upsert anvil-semver advisory
if: always() && github.event_name == 'pull_request' && matrix.os == 'linux' && github.event.pull_request.head.repo.full_name == github.repository && hashFiles('target/anvil/comments/semver.md') != ''
uses: marocchino/sticky-pull-request-comment@v3.0.5 # immutable release, the tag cannot be moved
uses: marocchino/sticky-pull-request-comment@v3.0.5 # pinned by tag: this release is an immutable release (GitHub locks the tag to a commit)
with:
header: anvil-semver
path: target/anvil/comments/semver.md
- name: Clear anvil-semver advisory
if: always() && github.event_name == 'pull_request' && matrix.os == 'linux' && github.event.pull_request.head.repo.full_name == github.repository && hashFiles('target/anvil/comments/semver.md') == ''
uses: marocchino/sticky-pull-request-comment@v3.0.5 # immutable release, the tag cannot be moved
uses: marocchino/sticky-pull-request-comment@v3.0.5 # pinned by tag: this release is an immutable release (GitHub locks the tag to a commit)
with:
Comment thread
Vaiz marked this conversation as resolved.
header: anvil-semver
delete: true
Expand Down Expand Up @@ -216,7 +216,7 @@ jobs:
# fails. The separate hashFiles predicates require both feature
# configurations; one multi-pattern call would accept a partial pair.
if: always() && matrix.os != 'windows-arm' && hashFiles('target/coverage/lcov-all-features.info') != '' && hashFiles('target/coverage/lcov-no-default.info') != ''
uses: codecov/codecov-action@v7.0.0 # immutable release, the tag cannot be moved
uses: codecov/codecov-action@v7.0.0 # pinned by tag: this release is an immutable release (GitHub locks the tag to a commit)
with:
files: target/coverage/lcov-all-features.info,target/coverage/lcov-no-default.info
flags: ${{ matrix.os }}
Expand Down
Loading
Loading