Skip to content

Commit 63845cc

Browse files
committed
Use cargo-machete in CI
1 parent 05af3f8 commit 63845cc

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

.github/workflows/full-ci.yml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ env:
3535
GDRUST_FEATURES: "gdnative/async,gdnative/serde,gdnative_bindings_generator/debug"
3636
CARGO_DENY_VERSION: "0.11.4"
3737
CARGO_DINGHY_VERSION: "0.4.71"
38+
CARGO_MACHETE_VERSION: "0.3"
3839

3940
on:
4041
push:
@@ -80,21 +81,33 @@ jobs:
8081
- name: "Check clippy"
8182
run: cargo clippy --workspace --features ${GDRUST_FEATURES} -- -D clippy::style -D clippy::complexity -D clippy::perf -D clippy::dbg_macro -D clippy::todo -D clippy::unimplemented
8283

83-
cargo-deny:
84+
cargo-deny-machete:
8485
runs-on: ubuntu-latest
8586
needs: rustfmt
8687
steps:
8788
- uses: actions/checkout@v2
89+
90+
# Deny
8891
# Note: manually downloading is ~30s faster than https://github.com/EmbarkStudios/cargo-deny-action
8992
- name: "Install cargo-deny"
9093
run: |
9194
wget --no-verbose https://github.com/EmbarkStudios/cargo-deny/releases/download/$CARGO_DENY_VERSION/cargo-deny-$CARGO_DENY_VERSION-x86_64-unknown-linux-musl.tar.gz -O cargo-deny.tar.gz
9295
tar -zxvf cargo-deny.tar.gz
9396
mkdir -p $HOME/.cargo/bin
9497
mv cargo-deny-$CARGO_DENY_VERSION-x86_64-unknown-linux-musl/cargo-deny $HOME/.cargo/bin
95-
- name: "Check cargo-deny"
98+
- name: "Deny non-conforming dependencies"
9699
run: cargo deny check --config tools/deny.toml
97100

101+
# Machete
102+
- name: "Install cargo-machete"
103+
uses: baptiste0928/cargo-install@v1
104+
with:
105+
crate: cargo-machete
106+
version: ${{ env.CARGO_MACHETE_VERSION }}
107+
- name: "Use machete to cut down dependencies"
108+
run: cargo machete
109+
110+
98111
test:
99112
name: test-${{ matrix.os.name }}${{ matrix.rust.postfix }}
100113
needs: rustfmt
@@ -285,7 +298,7 @@ jobs:
285298
needs:
286299
#- rustfmt
287300
- clippy
288-
- cargo-deny
301+
- cargo-deny-machete
289302
- test
290303
- integration-test-godot
291304
- build-release

0 commit comments

Comments
 (0)