-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBUILD.sh
executable file
·40 lines (27 loc) · 1.36 KB
/
BUILD.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
#!env /bin/bash
set -e
RED='\033[0;31m'
BLUE='\033[0;34m'
NORMAL='\033[0m'
GREEN='\033[0;32m'
echo -e "${BLUE}Downloading...${NORMAL}"
./data/download.sh || (echo -e "$RED [Download failed] $NORMAL" && exit 1)
./models/download.sh || (echo -e "$RED [Download failed] $NORMAL" && exit 1)
echo -e "${BLUE}Testing...${NORMAL}"
cargo test --all --all-features || (echo -e "$RED [Tests failed] $NORMAL" && exit 1)
echo -e "${BLUE}Building...${NORMAL}"
cargo build --all --all-features || (echo -e "$RED [Build failed] $NORMAL" && exit 1)
echo -e "${BLUE}Checking...${NORMAL}"
cargo check --all --all-features --tests --benches --examples || (echo -e "$RED [Check failed] $NORMAL" && exit 1)
echo -e "${BLUE}Clippying...${NORMAL}"
cargo clippy --all --all-features --tests --benches --examples -- -D clippy::all || (echo -e "$RED [Clippy failed] $NORMAL" && exit 1)
echo -e "${BLUE}Formatting...${NORMAL}"
cargo +nightly fmt --all -- --check || (echo -e "$RED [Format failed] $NORMAL" && exit 1)
echo -e "${BLUE}Licensing...${NORMAL}"
cargo deny check || (echo -e "$RED [License check failed] $NORMAL" && exit 1)
# echo -e "${BLUE}Udeps...${NORMAL}"
# cargo +nightly udeps || (echo -e "$RED [Udep failed] $NORMAL" && exit 1)
#echo -e "${BLUE}Benchmarking...${NORMAL}"
#cargo criterion --all --features=unstable
#open target/criterion/reports/index.html
echo -e "$GREEN === OK === $NORMAL"