summary refs log tree commit diff
path: root/src/tools/rustfmt/ci/build_and_test.sh
blob: 207da362fd650babb202b23f5c4462eec03c2d36 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash

set -euo pipefail

export RUSTFLAGS="-D warnings"
export RUSTFMT_CI=1

# Print version information
rustc -Vv
cargo -V

# Build and test main crate
if [ "$CFG_RELEASE_CHANNEL" == "nightly" ]; then
    cargo build --locked --all-features
else
    cargo build --locked
fi
cargo test

# Build and test other crates
cd config_proc_macro
cargo build --locked
cargo test