Merge pull request 'fix(ci): run apt non-interactively so needrestart cannot hang a runner' (#9) from fix/ci-noninteractive-apt into main
This commit is contained in:
@@ -3,5 +3,13 @@
|
||||
# both need the exact same Linux build dependencies. Edit once, here.
|
||||
set -euo pipefail
|
||||
|
||||
sudo apt-get update -qq
|
||||
sudo apt-get install -y -qq cmake ninja-build libobs-dev libcurl4-openssl-dev
|
||||
# Non-interactive, or a self-hosted Debian runner hangs forever: after an
|
||||
# install, needrestart asks which daemons to restart ("1. postfix.service
|
||||
# 2. none of the above") and waits on a terminal CI does not have. That
|
||||
# stalled the v0.1.2 Linux release job on 2026-10-05. NEEDRESTART_MODE=a
|
||||
# answers it; DEBIAN_FRONTEND covers debconf prompts. Passed through sudo
|
||||
# explicitly, since sudo drops the caller's environment by default.
|
||||
APT=(sudo DEBIAN_FRONTEND=noninteractive NEEDRESTART_MODE=a apt-get)
|
||||
|
||||
"${APT[@]}" update -qq
|
||||
"${APT[@]}" install -y -qq cmake ninja-build libobs-dev libcurl4-openssl-dev
|
||||
|
||||
@@ -41,7 +41,8 @@ jobs:
|
||||
# zip is not guaranteed present on a minimal self-hosted runner
|
||||
# image (unlike GitHub-hosted ubuntu-24.04, which build.yml's
|
||||
# deps script doesn't need to care about).
|
||||
command -v zip >/dev/null || sudo apt-get install -y -qq zip
|
||||
# Non-interactive for the same reason as .gitea/scripts/linux-deps.sh.
|
||||
command -v zip >/dev/null || sudo DEBIAN_FRONTEND=noninteractive NEEDRESTART_MODE=a apt-get install -y -qq zip
|
||||
out="streamer-tools-camera-${GITEA_REF_NAME}-linux-x64.zip"
|
||||
root="$(pwd)"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user