https://blueflare.gitea.bluefla.re/alkane-toolkit/ is built from this repo (gh-pages) after every main run: overview, manual, a quality dashboard and the benchmark history, which no longer goes to alkane-benchmarks. The quality grade is now Clippy/rustfmt plus the line-coverage band (the coverage badge's own colour bands), not only the Clippy result, and main CI publishes the full measurement (per-crate and per-file coverage, LOC per crate) as quality.json for the dashboard. README badges link to their pages. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
36 lines
1.4 KiB
Bash
36 lines
1.4 KiB
Bash
#!/usr/bin/env bash
|
|
# SPDX-License-Identifier: MIT
|
|
# Use the preinstalled CI image or install missing packages on older runners.
|
|
set -euo pipefail
|
|
|
|
mode="${1:?usage: ensure-build-deps.sh base|ui|all|ssh|windows|pages}"
|
|
case "$mode" in
|
|
base) packages=(libssl-dev pkg-config ca-certificates) ;;
|
|
ui) packages=(xvfb xauth dbus-x11 fonts-dejavu-core) ;;
|
|
ssh) packages=(openssh-client) ;;
|
|
pages) packages=(python3-markdown) ;;
|
|
all) packages=(libssl-dev pkg-config ca-certificates openssh-client
|
|
xvfb xauth dbus-x11 fonts-dejavu-core) ;;
|
|
# Windows cross build (mingw-w64, posix threads) + Wine for its tests.
|
|
windows) packages=(libssl-dev pkg-config ca-certificates
|
|
gcc-mingw-w64-x86-64-posix g++-mingw-w64-x86-64-posix
|
|
binutils-mingw-w64-x86-64 mingw-w64-x86-64-dev wine wine64 xvfb xauth
|
|
openjdk-21-jre-headless) ;;
|
|
*) echo "unknown dependency set: $mode" >&2; exit 2 ;;
|
|
esac
|
|
|
|
installed="$(dpkg-query -W -f='${Package} ${Status}\n' "${packages[@]}" 2>/dev/null || true)"
|
|
missing=()
|
|
for package in "${packages[@]}"; do
|
|
if ! grep -Fxq "$package install ok installed" <<< "$installed"; then
|
|
missing+=("$package")
|
|
fi
|
|
done
|
|
if [ "${#missing[@]}" -eq 0 ]; then
|
|
printf 'Build packages already installed: %s\n' "$mode"
|
|
exit 0
|
|
fi
|
|
printf 'Installing %s missing build packages\n' "${#missing[@]}"
|
|
apt-get update -qq
|
|
DEBIAN_FRONTEND=noninteractive apt-get install -y -qq --no-install-recommends "${packages[@]}"
|