Files
prometeu-runtime/scripts/provision-quality-gate.sh
T

22 lines
1.0 KiB
Bash

#!/usr/bin/env bash
# Shared CI prerequisites. Run on a disposable Debian/Ubuntu agent with sudo
# (or root), or on an already provisioned macOS development machine.
set -euo pipefail
if [[ "$(uname -s)" == Linux ]]; then
admin=()
if [[ "$EUID" -ne 0 ]]; then admin=(sudo); fi
"${admin[@]}" apt-get update
"${admin[@]}" apt-get install -y --no-install-recommends \
build-essential pkg-config libasound2-dev libudev-dev libxkbcommon-dev \
libwayland-dev libx11-dev libxrandr-dev libxi-dev \
python3 jq ripgrep git curl ca-certificates
fi
for command in rustup cargo python3 jq rg git make pkg-config; do
command -v "$command" >/dev/null || { echo "Missing quality-gate prerequisite: $command" >&2; exit 1; }
done
rustup component add rustfmt clippy llvm-tools-preview
if [[ "$(cargo llvm-cov --version 2>/dev/null || true)" != 'cargo-llvm-cov 0.8.5' ]]; then
cargo install cargo-llvm-cov --version 0.8.5 --locked
fi
if [[ "$(uname -s)" == Linux ]]; then pkg-config --exists alsa; fi