forked from kaspanet/rusty-kaspa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
check
executable file
·66 lines (58 loc) · 1.25 KB
/
check
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
57
58
59
60
61
62
63
64
65
66
#!/bin/bash
cargo fmt --all
cargo clippy --workspace --tests --benches
status=$?
if [ $status -ne 0 ]; then
echo
echo "--> cargo clippy check failed"
echo
exit $status
fi
declare -a crates=(
"kaspa-wasm"
)
for crate in "${crates[@]}"
do
cargo clippy -p $crate --target wasm32-unknown-unknown --tests --benches --features wasm32-sdk
status=$?
if [ $status -ne 0 ]; then
echo
echo "--> wasm32 check of $crate failed"
echo
exit $status
fi
done
declare -a crates=(
"kaspa-wrpc-wasm"
"kaspa-wallet-cli-wasm"
"kaspa-wasm"
"kaspa-cli"
"kaspa-daemon"
)
for crate in "${crates[@]}"
do
cargo clippy -p $crate --target wasm32-unknown-unknown --tests --benches
status=$?
if [ $status -ne 0 ]; then
echo
echo "--> wasm32 check of $crate failed"
echo
exit $status
fi
done
declare -a features=(
"wasm32-rpc"
"wasm32-core"
"wasm32-sdk"
)
for feature in "${features[@]}"
do
cargo clippy -p kaspa-wasm --target wasm32-unknown-unknown --features $feature
status=$?
if [ $status -ne 0 ]; then
echo
echo "--> wasm32 check of kaspa-wasm --features $feature has failed"
echo
exit $status
fi
done