From 756dc3bb2912f519914cce25f66603bdd4f32718 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Tue, 25 Jul 2023 20:47:36 +0200 Subject: [PATCH] add cargo clippy runs to see if it can build successfully (#143) --- ci/set_rust_version.bash | 2 +- ci/test.bash | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ci/set_rust_version.bash b/ci/set_rust_version.bash index d822cd56..90c41a0e 100755 --- a/ci/set_rust_version.bash +++ b/ci/set_rust_version.bash @@ -1,4 +1,4 @@ #!/usr/bin/env bash set -e rustup default $1 -rustup target add $2 +rustup target add $2 \ No newline at end of file diff --git a/ci/test.bash b/ci/test.bash index f6b60006..0f275461 100755 --- a/ci/test.bash +++ b/ci/test.bash @@ -67,4 +67,10 @@ set -x $CROSS test --features zlib --target $TARGET_TRIPLE $CROSS test --features zlib-default --no-default-features --target $TARGET_TRIPLE $CROSS test --features zlib-ng --no-default-features --target $TARGET_TRIPLE -$CROSS test --features zlib-ng-compat --no-default-features --target $TARGET_TRIPLE \ No newline at end of file +$CROSS test --features zlib-ng-compat --no-default-features --target $TARGET_TRIPLE + +if rustup component list | grep clippy &>/dev/null; then + $CROSS clippy --features zlib-ng --no-default-features --target $TARGET_TRIPLE + $CROSS clippy --features zlib --target $TARGET_TRIPLE + $CROSS clippy --features zlib-default --no-default-features --target $TARGET_TRIPLE +fi