File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33set -ex
44
5- CRATES=" bitcoin hashes internals"
5+ CRATES=" bitcoin hashes internals fuzz "
66
77for crate in ${CRATES}
88do
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+
3+ set -ex
4+
5+ FEATURES=" "
6+
7+ cargo --version
8+ rustc --version
9+
10+ # Make all cargo invocations verbose
11+ export CARGO_TERM_VERBOSE=true
12+
13+ # Pin dependencies as required if we are using MSRV toolchain.
14+ if cargo --version | grep " 1\.41" ; then
15+ # 1.0.157 uses syn 2.0 which requires edition 2021
16+ cargo update -p serde --precise 1.0.156
17+ # 1.0.108 uses `matches!` macro so does not work with Rust 1.41.1, bad `syn` no biscuit.
18+ cargo update -p syn --precise 1.0.107
19+ # Half 1.8 uses edition 2021 features
20+ cargo update -p half --precise 1.7.1
21+ fi
22+
23+ if [ " $DO_LINT " = true ]
24+ then
25+ cargo clippy --all-features --all-targets -- -D warnings
26+ fi
27+
28+ # Defaults / sanity checks
29+ cargo build
30+ cargo test
31+
32+ # Address Sanitizer
33+ if [ " $DO_ASAN " = true ]; then
34+ cargo clean
35+ CC=' clang -fsanitize=address -fno-omit-frame-pointer' \
36+ RUSTFLAGS=' -Zsanitizer=address -Clinker=clang -Cforce-frame-pointers=yes' \
37+ ASAN_OPTIONS=' detect_leaks=1 detect_invalid_pointer_pairs=1 detect_stack_use_after_return=1' \
38+ cargo test --lib --no-default-features --features=" $FEATURES " -Zbuild-std --target x86_64-unknown-linux-gnu
39+ cargo clean
40+ CC=' clang -fsanitize=memory -fno-omit-frame-pointer' \
41+ RUSTFLAGS=' -Zsanitizer=memory -Zsanitizer-memory-track-origins -Cforce-frame-pointers=yes' \
42+ cargo test --lib --no-default-features --features=" $FEATURES " -Zbuild-std --target x86_64-unknown-linux-gnu
43+ fi
44+
You can’t perform that action at this time.
0 commit comments