Skip to content

Commit 87670a6

Browse files
committed
Bump cargo-diet and run it slightly more cleanly
Changes: - Bump the version of `cargo-diet` used in the `lint` job from 1.2.4 to 1.2.7. - Use the version tag not just as an operand to `--tag`, but also as the ref from which the installation script itself is obtained. (The rationale is that the effect of skew here would probably be unintuitive, and also that we had been specifying `master` but the default branch of the `cargo-diet` repository is now `main`.) - Instead of using `|| true` on the step that runs `just check-size` (which needs cargo-diet), split installing and running into separate steps, and mark the running step `continue-on-error`.
1 parent eba50ae commit 87670a6

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -180,14 +180,17 @@ jobs:
180180
run: just doc
181181
- name: Run cargo fmt
182182
run: cargo fmt --all -- --check
183-
- name: Run cargo diet
183+
- name: Install cargo diet
184+
env:
185+
CARGO_DIET_TAG: v1.2.7
184186
run: |
185-
curl -LSfs https://raw.githubusercontent.com/the-lean-crate/cargo-diet/master/ci/install.sh |
186-
sh -s -- --git the-lean-crate/cargo-diet --target x86_64-unknown-linux-musl --tag v1.2.4
187-
188-
# Let's not fail CI for this, it will fail locally often enough, and a crate a little bigger
189-
# than allows is no problem either if it comes to that.
190-
just check-size || true
187+
curl -LSfs "https://raw.githubusercontent.com/the-lean-crate/cargo-diet/refs/tags/$CARGO_DIET_TAG/ci/install.sh" |
188+
sh -s -- --git the-lean-crate/cargo-diet --target x86_64-unknown-linux-musl --tag "$CARGO_DIET_TAG"
189+
- name: Run cargo diet
190+
run: just check-size
191+
# Let's not fail CI for this, it will fail locally often enough, and a crate a little bigger
192+
# than allows is no problem either if it comes to that.
193+
continue-on-error: true
191194

192195
cargo-deny:
193196
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)