-
Notifications
You must be signed in to change notification settings - Fork 44
Expand file tree
/
Copy pathch.sh
More file actions
57 lines (50 loc) · 810 Bytes
/
ch.sh
File metadata and controls
57 lines (50 loc) · 810 Bytes
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
#
# Runs cargo check on each feature, individually.
#
FEATS=(
advapi
'advapi comctl'
'advapi shell'
comctl
'comctl gdi'
'comctl shell'
dshow
dwm
dxgi
gdi
'gdi mf'
gui
'gui shell'
kernel
mf
ole
oleaut
psapi
shell
taskschd
user
uxtheme
version
wininet
winspool
)
set -e
print_elapsed () {
MIN=$(( ($1 - ($1 % (60 * 1000))) / (1000 * 60) ))
SEC=$(( ($1 - ($MIN * 1000 * 60) - ($1 % 1000)) / 1000 ))
MS=$(( $1 % 1000 ))
PURP='\033[0;35m'
NC='\033[0m'
if (($MIN > 0)); then
printf " ${PURP}Duration${NC} %02d:%02d.%03d min\n" $MIN $SEC $MS
else
printf " ${PURP}Duration${NC} %d.%03d sec\n" $SEC $MS
fi
}
for FEAT in "${FEATS[@]}" ; do
echo "$FEAT..."
T0=$(date +%s%N)
cargo check --features "$FEAT"
TF=$((($(date +%s%N) - $T0)/1000000))
print_elapsed $TF
done