Intrepid/Prometeu/Runtime/pipeline/pr-master There was a failure building this commit
25 lines
831 B
Bash
25 lines
831 B
Bash
#!/usr/bin/env bash
|
|
# Validate an already provisioned agent; never install dependencies in Jenkins.
|
|
set -euo pipefail
|
|
|
|
fail() {
|
|
echo "Quality-gate prerequisite missing: $*. Provision the agent image before running this job." >&2
|
|
exit 1
|
|
}
|
|
|
|
for command in rustup cargo rustc python3 jq git make pkg-config; do
|
|
command -v "$command" >/dev/null || fail "$command"
|
|
done
|
|
|
|
components=$(rustup component list --installed)
|
|
for component in rustfmt clippy llvm-tools-preview; do
|
|
if ! grep -Eq "^${component}(-|$)" <<< "$components"; then
|
|
fail "Rust component $component"
|
|
fi
|
|
done
|
|
|
|
[[ "$(cargo llvm-cov --version 2>/dev/null || true)" == 'cargo-llvm-cov 0.8.5' ]] || fail 'cargo-llvm-cov 0.8.5'
|
|
if [[ "$(uname -s)" == Linux ]]; then
|
|
pkg-config --exists alsa || fail 'ALSA development files (libasound2-dev)'
|
|
fi
|