Skip to content
This repository was archived by the owner on Jan 22, 2025. It is now read-only.

Commit b4f86cc

Browse files
authored
Group showing various rust toolchain versions (#10618)
* Group showing various rust toolchain versions * Fix
1 parent 8bd62d7 commit b4f86cc

File tree

2 files changed

+21
-8
lines changed

2 files changed

+21
-8
lines changed

ci/rust-version.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ export rust_nightly_docker_image=solanalabs/rust-nightly:"$nightly_version"
3838

3939
rustup_install() {
4040
declare toolchain=$1
41-
if ! cargo +"$toolchain" -V; then
41+
if ! cargo +"$toolchain" -V > /dev/null; then
42+
echo "$0: Missing toolchain? Installing...: $toolchain" >&2
4243
rustup install "$toolchain"
4344
cargo +"$toolchain" -V
4445
fi
@@ -58,7 +59,7 @@ export rust_nightly_docker_image=solanalabs/rust-nightly:"$nightly_version"
5859
rustup_install "$rust_nightly"
5960
;;
6061
*)
61-
echo "Note: ignoring unknown argument: $1"
62+
echo "$0: Note: ignoring unknown argument: $1" >&2
6263
;;
6364
esac
6465
)

ci/test-checks.sh

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
#!/usr/bin/env bash
2-
#
3-
# cargo fmt, cargo clippy
4-
#
2+
53
set -e
64

75
cd "$(dirname "$0")/.."
@@ -10,6 +8,23 @@ source ci/_
108
source ci/rust-version.sh stable
119
source ci/rust-version.sh nightly
1210

11+
echo --- build environment
12+
(
13+
set -x
14+
15+
rustup run "$rust_stable" rustc --version --verbose
16+
rustup run "$rust_nightly" rustc --version --verbose
17+
18+
cargo +"$rust_stable" --version --verbose
19+
cargo +"$rust_nightly" --version --verbose
20+
21+
cargo +"$rust_stable" clippy --version --verbose
22+
cargo +"$rust_nightly" clippy --version --verbose
23+
24+
# audit is done only with stable
25+
cargo +"$rust_stable" audit --version
26+
)
27+
1328
export RUST_BACKTRACE=1
1429
export RUSTFLAGS="-D warnings"
1530

@@ -26,10 +41,8 @@ _ ci/order-crates-for-publishing.py
2641
_ cargo +"$rust_stable" fmt --all -- --check
2742

2843
# -Z... is needed because of clippy bug: https://github.com/rust-lang/rust-clippy/issues/4612
29-
_ cargo +"$rust_nightly" clippy -Zunstable-options --version
3044
_ cargo +"$rust_nightly" clippy -Zunstable-options --workspace --all-targets -- --deny=warnings
3145

32-
_ cargo +"$rust_stable" audit --version
3346
_ scripts/cargo-for-all-lock-files.sh +"$rust_stable" audit --ignore RUSTSEC-2020-0002 --ignore RUSTSEC-2020-0008
3447

3548
{
@@ -41,7 +54,6 @@ _ scripts/cargo-for-all-lock-files.sh +"$rust_stable" audit --ignore RUSTSEC-202
4154
cd "$project"
4255
_ cargo +"$rust_stable" fmt -- --check
4356
_ cargo +"$rust_nightly" test
44-
_ cargo +"$rust_nightly" clippy --version
4557
_ cargo +"$rust_nightly" clippy -- --deny=warnings --allow=clippy::missing_safety_doc
4658
)
4759
done

0 commit comments

Comments
 (0)