forked from FutureSDR/FutureSDR
-
Notifications
You must be signed in to change notification settings - Fork 0
/
check.sh
executable file
·119 lines (108 loc) · 6.72 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
#!/bin/bash
set -xe
SCRIPT=$(readlink -f $0)
SCRIPTPATH=`dirname $SCRIPT`
###########################################################
# FMT
###########################################################
cd ${SCRIPTPATH} && cargo fmt --check
cd ${SCRIPTPATH}/pmt && cargo fmt --check
cd ${SCRIPTPATH}/frontend && cargo fmt --check
# perf
cd ${SCRIPTPATH}/perf/buffer_rand && cargo fmt --check
cd ${SCRIPTPATH}/perf/buffer_size && cargo fmt --check
cd ${SCRIPTPATH}/perf/fir && cargo fmt --check
cd ${SCRIPTPATH}/perf/fir_latency && cargo fmt --check
cd ${SCRIPTPATH}/perf/msg && cargo fmt --check
cd ${SCRIPTPATH}/perf/null_rand && cargo fmt --check
cd ${SCRIPTPATH}/perf/null_rand_latency && cargo fmt --check
cd ${SCRIPTPATH}/perf/vulkan && cargo fmt --check
cd ${SCRIPTPATH}/perf/wgpu && cargo fmt --check
cd ${SCRIPTPATH}/perf/zynq && cargo fmt --check
# examples
cd ${SCRIPTPATH}/examples/android && cargo fmt --check
cd ${SCRIPTPATH}/examples/android-hw && cargo fmt --check
cd ${SCRIPTPATH}/examples/audio && cargo fmt --check
cd ${SCRIPTPATH}/examples/custom-routes && cargo fmt --check
cd ${SCRIPTPATH}/examples/cw && cargo fmt --check
cd ${SCRIPTPATH}/examples/firdes && cargo fmt --check
cd ${SCRIPTPATH}/examples/fm-receiver && cargo fmt --check
cd ${SCRIPTPATH}/examples/logging && cargo fmt --check
cd ${SCRIPTPATH}/examples/rx-to-file && cargo fmt --check
cd ${SCRIPTPATH}/examples/spectrum && cargo fmt --check
cd ${SCRIPTPATH}/examples/wasm && cargo fmt --check
cd ${SCRIPTPATH}/examples/wlan && cargo fmt --check
cd ${SCRIPTPATH}/examples/wgpu && cargo fmt --check
cd ${SCRIPTPATH}/examples/zeromq && cargo fmt --check
cd ${SCRIPTPATH}/examples/zigbee && cargo fmt --check
###########################################################
# CLIPPY
###########################################################
cd ${SCRIPTPATH} && cargo clippy --all-targets --workspace --features=vulkan,zeromq,audio,flow_scheduler,tpb_scheduler,soapy,lttng,zynq,wgpu -- -D warnings
cd ${SCRIPTPATH} && RUSTFLAGS='--cfg=web_sys_unstable_apis' cargo clippy --lib --workspace --features=audio,wgpu --target=wasm32-unknown-unknown -- -D warnings
cd ${SCRIPTPATH}/pmt && cargo clippy --all-targets -- -D warnings
cd ${SCRIPTPATH}/frontend && cargo clippy --all-targets --target=wasm32-unknown-unknown -- -D warnings
# perf
cd ${SCRIPTPATH}/perf/buffer_rand && cargo clippy --all-targets -- -D warnings
cd ${SCRIPTPATH}/perf/buffer_size && cargo clippy --all-targets -- -D warnings
cd ${SCRIPTPATH}/perf/fir && cargo clippy --all-targets -- -D warnings
cd ${SCRIPTPATH}/perf/fir_latency && cargo clippy --all-targets -- -D warnings
cd ${SCRIPTPATH}/perf/msg && cargo clippy --all-targets -- -D warnings
cd ${SCRIPTPATH}/perf/null_rand && cargo clippy --all-targets -- -D warnings
cd ${SCRIPTPATH}/perf/null_rand_latency && cargo clippy --all-targets -- -D warnings
cd ${SCRIPTPATH}/perf/vulkan && cargo clippy --all-targets -- -D warnings
cd ${SCRIPTPATH}/perf/wgpu && cargo clippy --all-targets -- -D warnings
cd ${SCRIPTPATH}/perf/wgpu && RUSTFLAGS='--cfg=web_sys_unstable_apis' cargo clippy --lib --target=wasm32-unknown-unknown -- -D warnings
cd ${SCRIPTPATH}/perf/zynq && cargo clippy --all-targets -- -D warnings
# examples
cd ${SCRIPTPATH}/examples/android && cargo clippy --all-targets -- -D warnings
cd ${SCRIPTPATH}/examples/android-hw && cargo clippy --all-targets -- -D warnings
cd ${SCRIPTPATH}/examples/audio && cargo clippy --all-targets -- -D warnings
cd ${SCRIPTPATH}/examples/custom-routes && cargo clippy --all-targets -- -D warnings
cd ${SCRIPTPATH}/examples/cw && cargo clippy --all-targets -- -D warnings
cd ${SCRIPTPATH}/examples/cw && cargo clippy --lib --target=wasm32-unknown-unknown -- -D warnings
cd ${SCRIPTPATH}/examples/firdes && cargo clippy --all-targets -- -D warnings
cd ${SCRIPTPATH}/examples/fm-receiver && cargo clippy --all-targets -- -D warnings
cd ${SCRIPTPATH}/examples/logging && cargo clippy --all-targets -- -D warnings
cd ${SCRIPTPATH}/examples/rx-to-file && cargo clippy --all-targets -- -D warnings
cd ${SCRIPTPATH}/examples/spectrum && cargo clippy --all-targets -- -D warnings
cd ${SCRIPTPATH}/examples/spectrum && RUSTFLAGS='--cfg=web_sys_unstable_apis' cargo clippy --lib --target=wasm32-unknown-unknown -- -D warnings
cd ${SCRIPTPATH}/examples/wasm && cargo clippy --all-targets -- -D warnings
cd ${SCRIPTPATH}/examples/wasm && RUSTFLAGS='--cfg=web_sys_unstable_apis' cargo clippy --lib --target=wasm32-unknown-unknown -- -D warnings
cd ${SCRIPTPATH}/examples/wlan && cargo clippy --all-targets -- -D warnings
cd ${SCRIPTPATH}/examples/wgpu && cargo clippy --all-targets -- -D warnings
cd ${SCRIPTPATH}/examples/wgpu && RUSTFLAGS='--cfg=web_sys_unstable_apis' cargo clippy --lib --target=wasm32-unknown-unknown -- -D warnings
cd ${SCRIPTPATH}/examples/zeromq && cargo clippy --all-targets -- -D warnings
cd ${SCRIPTPATH}/examples/zigbee && cargo clippy --all-targets -- -D warnings
cd ${SCRIPTPATH}/examples/zigbee && RUSTFLAGS='--cfg=web_sys_unstable_apis' cargo clippy --lib --target=wasm32-unknown-unknown -- -D warnings
###########################################################
# Test
###########################################################
cd ${SCRIPTPATH} && cargo test --all-targets --workspace --features=vulkan,zeromq,audio,flow_scheduler,tpb_scheduler,soapy,lttng,zynq,wgpu -j 4
# perf
cd ${SCRIPTPATH}/perf/buffer_rand && cargo test --all-targets
cd ${SCRIPTPATH}/perf/buffer_size && cargo test --all-targets
cd ${SCRIPTPATH}/perf/fir && cargo test --all-targets
cd ${SCRIPTPATH}/perf/fir_latency && cargo test --all-targets
cd ${SCRIPTPATH}/perf/msg && cargo test --all-targets
cd ${SCRIPTPATH}/perf/null_rand && cargo test --all-targets
cd ${SCRIPTPATH}/perf/null_rand_latency && cargo test --all-targets
cd ${SCRIPTPATH}/perf/vulkan && cargo test --all-targets
cd ${SCRIPTPATH}/perf/wgpu && cargo test --all-targets
cd ${SCRIPTPATH}/perf/zynq && cargo test --all-targets
# examples
cd ${SCRIPTPATH}/examples/android && cargo test --all-targets
cd ${SCRIPTPATH}/examples/android-hw && cargo test --all-targets
cd ${SCRIPTPATH}/examples/audio && cargo test --all-targets
cd ${SCRIPTPATH}/examples/custom-routes && cargo test --all-targets
cd ${SCRIPTPATH}/examples/cw && cargo test --all-targets
cd ${SCRIPTPATH}/examples/firdes && cargo test --all-targets
cd ${SCRIPTPATH}/examples/fm-receiver && cargo test --all-targets
cd ${SCRIPTPATH}/examples/logging && cargo test --all-targets
cd ${SCRIPTPATH}/examples/rx-to-file && cargo test --all-targets
cd ${SCRIPTPATH}/examples/spectrum && cargo test --all-targets
cd ${SCRIPTPATH}/examples/wasm && cargo test --all-targets
cd ${SCRIPTPATH}/examples/wlan && cargo test --all-targets
cd ${SCRIPTPATH}/examples/wgpu && cargo test --all-targets
cd ${SCRIPTPATH}/examples/zeromq && cargo test --all-targets
cd ${SCRIPTPATH}/examples/zigbee && cargo test --all-targets