-
-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathtest-msrv.sh
executable file
·61 lines (43 loc) · 1.36 KB
/
test-msrv.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
#!/usr/bin/env bash
set -euo pipefail
. "$(dirname "${BASH_SOURCE[0]}")/util/lib.sh"
# If not on CI - create temp dir
if [[ ! -v CI ]]; then
trap cleanup SIGINT SIGTERM ERR EXIT
temp_dir=$(mktemp -d)
function cleanup {
# Unset the trap to prevent an infinite loop
trap - SIGINT SIGTERM ERR EXIT
step rm -rf "$temp_dir"
}
step cp -r README.md bon bon-macros "$temp_dir"
with_log pushd "$temp_dir"
info "Running in a temp dir $(pwd)"
fi
step echo '1.59.0' > rust-toolchain
step cargo --version --verbose
with_log cd bon
step echo '[workspace]' >> Cargo.toml
step cargo update -p syn --precise 2.0.56
step cargo update -p tokio --precise 1.29.1
step cargo update -p expect-test --precise 1.4.1
step cargo update -p windows-sys --precise 0.52.0
export RUSTFLAGS="${RUSTFLAGS:-} --allow unknown-lints"
step cargo clippy --all-features --all-targets --locked
test_args=(
--all-features
--locked
--lib
--tests
--examples
--bins
--benches
# We intentionally don't include doc tests, because they use
# the syntax from the newest versions and that's fine because
# doc tests are the face of this library.
--
# Don't run trybuild tests. We know they will fail because
# Rust compiler error messages change from version to version.
--skip ui::ui
)
step cargo test "${test_args[@]}"