set -euo pipefail
export CI="true"
sysinfo() {
echo "System information:"
uname -a
rustc --version
cargo --version
echo "CARGO_HOME=${CARGO_HOME}"
echo "---"
echo "Environment variables:"
printenv | sort
}
install_test_deps() {
echo "Initialising test dependencies"
apt-get update -yq
apt-get install -yq --no-install-recommends wireguard-tools
}
lint() {
echo "Linting"
rustup component add clippy
cargo clippy --all-features -- --deny warnings
}
tests() {
echo "Testing"
install_test_deps
cargo test
cargo test -- --ignored }
build() {
cargo build
}
main() {
sysinfo
build
lint
tests
}
main "$@"