-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcheck.sh
56 lines (51 loc) · 1.46 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/usr/bin/env bash
set -Eeuox pipefail
FEATURES_SETS=(
""
"--no-default-features"
'--no-default-features --features alloc'
'--no-default-features --features std'
'--no-default-features --features alloc,std'
)
TOOLCHAINS=(
stable
beta
nightly
"1.60.0"
)
cargo +stable fmt --all -- --check
for TOOLCHAIN in "${TOOLCHAINS[@]}"; do
for FEATURES_SET in "${FEATURES_SETS[@]}"; do
cargo +$TOOLCHAIN clippy --all $FEATURES_SET -- -D warnings
cargo +$TOOLCHAIN clippy --all --tests $FEATURES_SET -- -D warnings
cargo +$TOOLCHAIN test --verbose --all $FEATURES_SET
done
(
cd ./tests/no-alloc
cargo +$TOOLCHAIN clippy --all -- -D warnings
cargo +$TOOLCHAIN build --verbose --all
)
(
if [[ $TOOLCHAIN != "1.60.0" ]]; then
cd ./tests/no-std
cargo +$TOOLCHAIN clippy --all -- -D warnings
cargo +$TOOLCHAIN build --verbose --all
fi
)
(
cd ./tests/re-export
cargo +$TOOLCHAIN clippy --all -- -D warnings
cargo +$TOOLCHAIN clippy --all --tests -- -D warnings
cargo +$TOOLCHAIN test --verbose --all
)
(
cd ./tests/use-re-exported
cargo +$TOOLCHAIN clippy --all -- -D warnings
cargo +$TOOLCHAIN clippy --all --tests -- -D warnings
cargo +$TOOLCHAIN test --verbose --all
)
(
cd ./examples/wasm_bindgen
wasm-pack test --node | grep -q succeed
)
done