-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcheck.sh
executable file
·40 lines (33 loc) · 1.42 KB
/
check.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/env bash
if [ -z "$RUSTUP_TOOLCHAIN" ]; then
export RUSTUP_TOOLCHAIN="stable" # "stable" or "nightly"
fi
if [ -z "$RUSTUP_PROFILE" ]; then
export RUSTUP_PROFILE="debug" # "debug" or "release"
fi
# Build Time Autovars
SCRIPT=`realpath "$0"`
SCRIPT_DIR=`dirname "$SCRIPT"`
PROJECT_ROOT=$SCRIPT_DIR
echo "Checking licenses..."
cargo +$RUSTUP_TOOLCHAIN deny --all-features check licenses
echo "Running Cargo Check..."
if [ $RUSTUP_PROFILE == "release" ]; then
cargo +$RUSTUP_TOOLCHAIN check --workspace --all-targets --all-features --bins --tests --benches --examples --release
else
cargo +$RUSTUP_TOOLCHAIN check --workspace --all-targets --all-features --bins --tests --benches --examples
fi
echo "Running Unit Tests..."
if [ $RUSTUP_PROFILE == "release" ]; then
cargo +$RUSTUP_TOOLCHAIN test --workspace --all-targets --all-features --bins --tests --benches --examples --release
else
cargo +$RUSTUP_TOOLCHAIN test --workspace --all-targets --all-features --bins --tests --benches --examples
fi
echo "Running Clippy Tests..."
if [ $RUSTUP_PROFILE == "release" ]; then
cargo +$RUSTUP_TOOLCHAIN clippy --workspace --all-targets --all-features --release
else
cargo +$RUSTUP_TOOLCHAIN clippy --workspace --all-targets --all-features
fi
echo "Running Future Compatibilities Reports..."
cargo +$RUSTUP_TOOLCHAIN report future-incompatibilities --package catgirl-engine || true # `|| true` ignores the exit code