Use cargo-machete in CI
@@ -35,6 +35,7 @@ env:
GDRUST_FEATURES: "gdnative/async,gdnative/serde,gdnative_bindings_generator/debug"
CARGO_DENY_VERSION: "0.11.4"
CARGO_DINGHY_VERSION: "0.4.71"
+ CARGO_MACHETE_VERSION: "0.3"
on:
push:
@@ -80,11 +81,13 @@ jobs:
- name: "Check clippy"
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
- cargo-deny:
+ cargo-deny-machete:
runs-on: ubuntu-latest
needs: rustfmt
steps:
- uses: actions/checkout@v2
+
+ # Deny
# Note: manually downloading is ~30s faster than https://github.com/EmbarkStudios/cargo-deny-action
- name: "Install cargo-deny"
run: |
@@ -92,9 +95,19 @@ jobs:
tar -zxvf cargo-deny.tar.gz
mkdir -p $HOME/.cargo/bin
mv cargo-deny-$CARGO_DENY_VERSION-x86_64-unknown-linux-musl/cargo-deny $HOME/.cargo/bin
- - name: "Check cargo-deny"
+ - name: "Deny non-conforming dependencies"
run: cargo deny check --config tools/deny.toml
+ # Machete
+ - name: "Install cargo-machete"
+ uses: baptiste0928/cargo-install@v1
+ with:
+ crate: cargo-machete
+ version: ${{ env.CARGO_MACHETE_VERSION }}
+ - name: "Use machete to cut down dependencies"
+ run: cargo machete
+
+
test:
name: test-${{ matrix.os.name }}${{ matrix.rust.postfix }}
needs: rustfmt
@@ -285,7 +298,7 @@ jobs:
needs:
#- rustfmt
- clippy
- - cargo-deny
+ - cargo-deny-machete
- test
- integration-test-godot
- build-release
