feat(build): optional xvfb-run for Linux GUI builds
Add an --xvfb switch to 'build run' and 'job' that wraps the Linux build command in 'xvfb-run -a sh -c ...', giving GUI toolkits (GTK4/PyGObject) a headless $DISPLAY. Exported env vars precede xvfb-run so they propagate into the virtual-display session. No-op (with a notice) for Windows guests. The local-ci-build composite action exposes it as the 'xvfb' input (default false), forwarded as INPUT_XVFB -> --xvfb, mirroring the use-shared-cache/skip-artifact wiring. Docs: WORKFLOW-AUTHORING.md parameter table + Linux example note; LINUX-TEMPLATE-SETUP.md Step 4a (the template ships python3-gi gir1.2-gtk-4.0 xvfb). Adds build-run unit tests (wrap, plain, Windows no-op). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -229,11 +229,13 @@ Eseguito da Prepare via SSH come `ci_build` con sudo.
|
||||
Header: `#!/usr/bin/env bash` + `set -euo pipefail`
|
||||
Helper `assert_step()`: stampa `[OK] [Step N] desc` su successo, `exit 1` su fallimento.
|
||||
|
||||
- [x] **Step 1 apt update + upgrade** (saltabile con `--skip-update`)
|
||||
- [x] **Step 1 apt update (+ upgrade)**
|
||||
```bash
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt-get update -qq
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt-get upgrade -y -qq
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt-get update -qq # sempre
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt-get upgrade -y -qq # saltato da --skip-update
|
||||
```
|
||||
> `apt-get update` gira **sempre** (l'indice deve essere fresco per trovare i
|
||||
> pacchetti). `--skip-update` salta solo l'`upgrade` (lento).
|
||||
|
||||
- [x] **Step 2 Toolchain build essentials**
|
||||
```bash
|
||||
@@ -257,6 +259,15 @@ Helper `assert_step()`: stampa `[OK] [Step N] desc` su successo, `exit 1` su fal
|
||||
```
|
||||
- assert: `command -v git`, `command -v 7z`
|
||||
|
||||
- [x] **Step 4a GTK4 / GObject + Xvfb** (test GUI headless, es. PyGObject)
|
||||
```bash
|
||||
sudo apt-get install -y -qq python3-gi gir1.2-gtk-4.0 xvfb
|
||||
```
|
||||
- assert: `python3 -c "import gi"`, `command -v Xvfb`
|
||||
- Usato a runtime dai build con il flag `--xvfb` / `-Xvfb` (vedi
|
||||
[WORKFLOW-AUTHORING.md](WORKFLOW-AUTHORING.md) §5): il comando di build gira
|
||||
sotto `xvfb-run` con un `$DISPLAY` virtuale.
|
||||
|
||||
- [x] **Step 4b .NET SDK** (opzionale, flag `--dotnet`)
|
||||
```bash
|
||||
curl -fsSL https://dotnet.microsoft.com/download/dotnet/scripts/v1/dotnet-install.sh \
|
||||
|
||||
Reference in New Issue
Block a user