The self-hosted runner is a bare Arch host, so ruff and the compilation libraries were missing and the first pipeline run stopped at the lint step. The installer only calls pacman for what is absent, so later runs stay unprivileged.
This commit is contained in:
3 files changed
+53
No files matched your search
@@ -26,6 +26,9 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install the build dependencies
|
||||
run: ./packaging/install-ci-deps.sh
|
||||
|
||||
- name: Check the version files agree
|
||||
run: ./packaging/check-version.sh
|
||||
|
||||
|
||||
@@ -31,6 +31,9 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install the build dependencies
|
||||
run: ./packaging/install-ci-deps.sh
|
||||
|
||||
- name: Check the version files agree
|
||||
run: ./packaging/check-version.sh
|
||||
|
||||
@@ -74,6 +77,9 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install the build dependencies
|
||||
run: ./packaging/install-ci-deps.sh
|
||||
|
||||
- name: Read the version file
|
||||
id: version
|
||||
run: echo "version=$(./packaging/check-version.sh)" >> "$GITHUB_OUTPUT"
|
||||
|
||||
Executable
+44
@@ -0,0 +1,44 @@
|
||||
#!/bin/sh
|
||||
# Install on the Arch CI runner everything the linter, ./dev.sh build and
|
||||
# makepkg need. Idempotent: nothing is handed to pacman when it is already
|
||||
# installed, and sudo is only used when something is actually missing.
|
||||
#
|
||||
# The runner user needs passwordless sudo for pacman the first time; once the
|
||||
# packages are there, the script is a no-op and no privilege is required.
|
||||
set -eu
|
||||
|
||||
packages="git go python pkgconf ncurses rsync which file jq curl nodejs ruff \
|
||||
harfbuzz zlib libpng lcms2 xxhash openssl shader-slang pixman cairo freetype2 \
|
||||
fontconfig libcanberra systemd-libs simde libx11 libxcb libxrandr libxinerama \
|
||||
libxcursor libxi libxrender xorgproto libxkbcommon libxkbcommon-x11 mesa dbus \
|
||||
wayland wayland-protocols wayland-utils tar xz kitty-shell-integration \
|
||||
kitty-terminfo"
|
||||
|
||||
missing=""
|
||||
for package in $packages; do
|
||||
if ! pacman -Q "$package" > /dev/null 2>&1; then
|
||||
missing="$missing $package"
|
||||
fi
|
||||
done
|
||||
|
||||
# base-devel is a group, so verbose queries do not report it as a package.
|
||||
for tool in gcc make fakeroot; do
|
||||
if ! command -v "$tool" > /dev/null 2>&1; then
|
||||
missing="$missing base-devel"
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -z "$missing" ]; then
|
||||
echo 'All the build dependencies are already installed.'
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "Installing:$missing"
|
||||
# pacman refuses to run without a terminal prompt for the password when the
|
||||
# runner user has no NOPASSWD rule; fail with the list instead of hanging.
|
||||
if ! sudo -n pacman -S --needed --noconfirm $missing; then
|
||||
echo "::error::could not install:$missing"
|
||||
echo '::error::give the runner user passwordless sudo for pacman or preinstall these packages.'
|
||||
exit 1
|
||||
fi
|
||||
Reference in new issue
Block a user