set -euo pipefail
export CI="true"
sysinfo() {
echo "System information:"
uname -a
rustc --version
cargo --version
echo "CARGO_HOME=${CARGO_HOME}"
echo ".cargo/config.toml content:"
echo "---"
cat "${CARGO_HOME}/config.toml"
echo "---"
echo "Environment variables:"
printenv | sort
}
lint() {
echo "Linting"
rustup component add clippy
cargo clippy --all-features -- --deny warnings
}
tests() {
echo "Testing"
cargo test
cargo test -- --ignored }
build() {
cargo build --color always
}
main() {
sysinfo
build
lint
tests
}
main "$@"