Uploads two reports to Buildkite, one from cargo-cov and one from lcov via grcov. The lcov one is busted on linux and is what we need to bring codecov.io back up again. It works great on macos if you wanted to generate them locally and prefer lcov HTML reports. * Also comment out non-coverage build to speed things up.
36 lines
636 B
Bash
Executable File
36 lines
636 B
Bash
Executable File
#!/bin/bash -e
|
|
|
|
require() {
|
|
declare expectedProgram="$1"
|
|
declare expectedVersion="$2"
|
|
|
|
read -r program version _ < <($expectedProgram -V)
|
|
|
|
declare ok=true
|
|
[[ $program = "$expectedProgram" ]] || ok=false
|
|
[[ $version =~ $expectedVersion ]] || ok=false
|
|
|
|
echo "Found $program $version"
|
|
if ! $ok; then
|
|
echo Error: expected "$expectedProgram $expectedVersion"
|
|
exit 1
|
|
fi
|
|
}
|
|
|
|
case ${1:-stable} in
|
|
nightly)
|
|
require rustc 1.31.[0-9]+-nightly
|
|
require cargo 1.31.[0-9]+-nightly
|
|
;;
|
|
stable)
|
|
require rustc 1.29.[0-9]+
|
|
require cargo 1.29.[0-9]+
|
|
;;
|
|
*)
|
|
echo Error: unknown argument: "$1"
|
|
exit 1
|
|
;;
|
|
esac
|
|
|
|
exit 0
|