Merge pull request #722 from vicrodh/feature/internal/qt-ci-workflows

ci: make test-crates green on the Qt tree (wayland dev lib, SafeArea guard, shader gate toolchain)
This commit is contained in:
Victor RH authored and GitHub committed 2026-08-27 14:21:21 -06:00
commit 2772b7486f
5 files changed
+57 -13

No files matched your search

+1 -1
View File
@@ -90,7 +90,7 @@ jobs:
sudo apt-get install -y --no-install-recommends \ sudo apt-get install -y --no-install-recommends \
build-essential pkg-config cmake clang libclang-dev nasm \ build-essential pkg-config cmake clang libclang-dev nasm \
libasound2-dev libjack-jackd2-dev libdbus-1-dev libssl-dev \ libasound2-dev libjack-jackd2-dev libdbus-1-dev libssl-dev \
libgl1-mesa-dev libegl1-mesa-dev libxkbcommon-dev \ libgl1-mesa-dev libegl1-mesa-dev libxkbcommon-dev libwayland-dev \
libxkbcommon-x11-0 libxcb-cursor0 libxcb-icccm4 libxcb-image0 \ libxkbcommon-x11-0 libxcb-cursor0 libxcb-icccm4 libxcb-image0 \
libxcb-keysyms1 libxcb-render-util0 libxcb-xinerama0 libxcb-xkb1 \ libxcb-keysyms1 libxcb-render-util0 libxcb-xinerama0 libxcb-xkb1 \
libxcb-shape0 libxcb-randr0 libxcb-sync1 libxcb-xfixes0 libxcb-glx0 \ libxcb-shape0 libxcb-randr0 libxcb-sync1 libxcb-xfixes0 libxcb-glx0 \
+10 -5
View File
@@ -90,18 +90,23 @@ jobs:
./scripts/cargo-test.sh ./scripts/cargo-test.sh
echo "cargo test wall time: $(( $(date +%s) - START ))s" echo "cargo test wall time: $(( $(date +%s) - START ))s"
# Every shader must bake with the pinned qsb. Separate job so qsb is never # Every shader must bake. Separate job so qsb is never on PATH while cargo
# on PATH while cargo runs (see qt-gate). # runs (see qt-gate). The BAKE toolchain is pinned apart from the runtime
# floor: the committed .qsb need qsb >= 6.9 (plasma/ambient's uint hash
# constants vs the GLSL 1.20 variant, which desktop GL <= 3.1 selects at
# runtime, so it must stay in the pack) — see shader_bake_gate.sh.
shader-gate: shader-gate:
name: shader bake gate name: shader bake gate
runs-on: ubuntu-24.04 runs-on: ubuntu-24.04
timeout-minutes: 15 timeout-minutes: 15
env:
QT_SHADERTOOLS_VERSION: ${{ vars.QT_VERSION_SHADERTOOLS || '6.9.3' }}
steps: steps:
- uses: actions/checkout@v7 - uses: actions/checkout@v7
- name: Install Qt ${{ env.QT_VERSION }} + shader tools - name: Install Qt ${{ env.QT_SHADERTOOLS_VERSION }} + shader tools
uses: jurplel/install-qt-action@v4 uses: jurplel/install-qt-action@v4
with: with:
version: ${{ env.QT_VERSION }} version: ${{ env.QT_SHADERTOOLS_VERSION }}
host: linux host: linux
target: desktop target: desktop
arch: linux_gcc_64 arch: linux_gcc_64
@@ -124,7 +129,7 @@ jobs:
sudo apt-get install -y --no-install-recommends \ sudo apt-get install -y --no-install-recommends \
build-essential pkg-config cmake clang libclang-dev nasm dbus \ build-essential pkg-config cmake clang libclang-dev nasm dbus \
libasound2-dev libjack-jackd2-dev libdbus-1-dev libssl-dev \ libasound2-dev libjack-jackd2-dev libdbus-1-dev libssl-dev \
libgl1-mesa-dev libegl1-mesa-dev libxkbcommon-dev libgl1-mesa-dev libegl1-mesa-dev libxkbcommon-dev libwayland-dev
# No qtshadertools here ON PURPOSE: with qsb on PATH build.rs re-bakes # No qtshadertools here ON PURPOSE: with qsb on PATH build.rs re-bakes
# shaders by mtime, which makes a fresh checkout nondeterministic. The # shaders by mtime, which makes a fresh checkout nondeterministic. The
+18 -4
View File
@@ -167,10 +167,24 @@ ApplicationWindow {
// takes the safe area over from Qt entirely. `HeaderBar.chromeLeftInset` // takes the safe area over from Qt entirely. `HeaderBar.chromeLeftInset`
// is where that responsibility is discharged: it reads // is where that responsibility is discharged: it reads
// `SafeArea.margins.left` to clear the traffic lights. // `SafeArea.margins.left` to clear the traffic lights.
topPadding: 0 // The four Window paddings are Qt 6.9 API (SafeArea landed in 6.9). The
bottomPadding: 0 // Linux pin is Qt 6.8 LTS, where declaring them here refuses the whole
leftPadding: 0 // component ("Cannot assign to non-existent property") — measured on the
rightPadding: 0 // CI VM, 2026-08-25. They only matter on macOS, so they are set there,
// imperatively, from a Loader that never instantiates elsewhere.
Loader {
active: QbzShell.isMacos
sourceComponent: Component {
Item {
Component.onCompleted: {
window.topPadding = 0
window.bottomPadding = 0
window.leftPadding = 0
window.rightPadding = 0
}
}
}
}
color: "#1a1a1a" color: "#1a1a1a"
// Phase 23: every domain singleton boots (registers its Qt-thread // Phase 23: every domain singleton boots (registers its Qt-thread
+13 -1
View File
@@ -100,9 +100,21 @@ Rectangle {
// than the reference's estimate. The 78 stays only as the floor for the // than the reference's estimate. The 78 stays only as the floor for the
// case where the margin reads 0 (nothing to lose, and it is the number // case where the margin reads 0 (nothing to lose, and it is the number
// the Slint build has used all along). // the Slint build has used all along).
// `SafeArea` is Qt 6.9 API; the Linux pin is 6.8. The attached read lives
// in a macOS-only Loader so the binding never names the type elsewhere.
property real macSafeLeft: 0
Loader {
active: QbzShell.isMacos
sourceComponent: Component {
Item {
Component.onCompleted:
root.macSafeLeft = Qt.binding(function() { return root.SafeArea.margins.left })
}
}
}
readonly property int chromeLeftInset: readonly property int chromeLeftInset:
QbzShell.isMacos && !QbzShell.systemTitleBar QbzShell.isMacos && !QbzShell.systemTitleBar
? Math.max(root.SafeArea.margins.left, 78) ? Math.max(root.macSafeLeft, 78)
: (root.chromeControls && root.wcOnLeft ? root.wcClusterWidth + 6 : 0) : (root.chromeControls && root.wcOnLeft ? root.wcClusterWidth + 6 : 0)
// The section-nav dropdown (catalog + panel + open/close behaviour). // The section-nav dropdown (catalog + panel + open/close behaviour).
+15 -2
View File
@@ -14,6 +14,15 @@
# The release/test builds themselves run WITHOUT qsb on PATH so they ship the # The release/test builds themselves run WITHOUT qsb on PATH so they ship the
# committed .qsb deterministically; this gate is where shader health is judged. # committed .qsb deterministically; this gate is where shader health is judged.
# #
# WHICH qsb: the committed .qsb are baked with qsb >= 6.9. plasma.frag and
# ambient.frag hash with 32-bit uint constants that qsb 6.8 refuses to lower
# for the GLSL 1.20 variant ("Tried to convert uint literal into int") while
# 6.9+ lowers them fine — and that 1.20 variant MUST exist: Qt's OpenGL RHI
# selects 120/130/140 on desktop GL <= 3.1 and the app's renderer tier does
# not exclude that hardware (reviewed 2026-08-27). So the bake toolchain is
# pinned separately from the runtime floor: runtime Qt 6.8 loads these packs,
# baking them needs 6.9+. CI passes its own qsb; locally use any >= 6.9.
#
# Usage: scripts/qml-audits/shader_bake_gate.sh [path/to/qsb] # Usage: scripts/qml-audits/shader_bake_gate.sh [path/to/qsb]
set -euo pipefail set -euo pipefail
cd "$(dirname "$0")/../.." cd "$(dirname "$0")/../.."
@@ -25,13 +34,17 @@ glsl_noes="$(grep -oE 'const SHADER_GLSL_NO_ES100: &str = "[^"]+"' $CRATE/build.
hlsl="$(grep -oE 'const SHADER_HLSL: &str = "[^"]+"' $CRATE/build.rs | sed 's/.*= "//; s/"$//')" hlsl="$(grep -oE 'const SHADER_HLSL: &str = "[^"]+"' $CRATE/build.rs | sed 's/.*= "//; s/"$//')"
msl="$(grep -oE 'const SHADER_MSL: &str = "[^"]+"' $CRATE/build.rs | sed 's/.*= "//; s/"$//')" msl="$(grep -oE 'const SHADER_MSL: &str = "[^"]+"' $CRATE/build.rs | sed 's/.*= "//; s/"$//')"
marker="$(grep -oE 'const NO_ES100_MARKER: &str = "[^"]+"' $CRATE/build.rs | sed 's/.*= "//; s/"$//')" marker="$(grep -oE 'const NO_ES100_MARKER: &str = "[^"]+"' $CRATE/build.rs | sed 's/.*= "//; s/"$//')"
[[ -n "$glsl_all" && -n "$glsl_noes" && -n "$hlsl" && -n "$msl" && -n "$marker" ]] || { echo "shader_bake_gate: could not read the target lists from $CRATE/build.rs"; exit 2; } nobatch="$(grep -oE 'const NO_BATCH_MARKER: &str = "[^"]+"' $CRATE/build.rs | sed 's/.*= "//; s/"$//')"
[[ -n "$glsl_all" && -n "$glsl_noes" && -n "$hlsl" && -n "$msl" && -n "$marker" && -n "$nobatch" ]] || { echo "shader_bake_gate: could not read the target lists from $CRATE/build.rs"; exit 2; }
tmp="$(mktemp -d)"; trap 'rm -rf "$tmp"' EXIT tmp="$(mktemp -d)"; trap 'rm -rf "$tmp"' EXIT
fail=0; n=0 fail=0; n=0
for src in $CRATE/qml/assets/shaders/*.frag $CRATE/qml/assets/shaders/*.vert; do for src in $CRATE/qml/assets/shaders/*.frag $CRATE/qml/assets/shaders/*.vert; do
n=$((n+1)) n=$((n+1))
if grep -q "$marker" "$src"; then glsl="$glsl_noes"; else glsl="$glsl_all"; fi if grep -q "$marker" "$src"; then glsl="$glsl_noes"; else glsl="$glsl_all"; fi
if ! "$QSB" --glsl "$glsl" --hlsl "$hlsl" --msl "$msl" -b -o "$tmp/$(basename "$src").qsb" "$src" > "$tmp/err" 2>&1; then # build.rs passes the batching rewrite (-b) to VERTEX shaders only, unless
# they carry the no-batch marker (custom QQuickRhiItem vertex layouts).
batch=(); [[ "$src" == *.vert ]] && ! grep -q "$nobatch" "$src" && batch=(-b)
if ! "$QSB" --glsl "$glsl" --hlsl "$hlsl" --msl "$msl" "${batch[@]}" -o "$tmp/$(basename "$src").qsb" "$src" > "$tmp/err" 2>&1; then
echo "FAIL $src [glsl: $glsl]"; sed 's/^/ /' "$tmp/err" | head -3; fail=$((fail+1)) echo "FAIL $src [glsl: $glsl]"; sed 's/^/ /' "$tmp/err" | head -3; fail=$((fail+1))
fi fi
done done