ci: shader bake gate; audits find Qt's qmltypes; builds never re-bake

qml_resolution_audit hard-coded /usr/lib64/qt6/qml, so on a runner it
saw zero Qt types and reported every Rectangle as unresolved; it now
takes QBZ_QT_QML_DIR (authoritative), then QT_ROOT_DIR, then the distro
layouts, and fails loudly when none has plugins.qmltypes. test-crates
runs the audits after the Qt install, pointed at it.

build.rs re-bakes a shader only when its .frag is newer than its .qsb,
which makes a fresh checkout nondeterministic whenever qsb is on PATH.
Release and test builds now install Qt without qtshadertools, so the
committed .qsb ship as-is, and a new shader-gate job bakes every shader
to a temp dir with the pinned qsb using build.rs's own target lists
(read from the file, so they cannot drift). It is red today at 6.8.3:
plasma.frag's uint literals do not bake for the GLSL 120 target with
qsb 6.8 (6.9+ accept them) — that is the finding, not a false positive.

cc
This commit is contained in:
vicrodh committed 2026-08-26 19:11:01 -06:00
1 parent c51e004fc2
commit af8d373d2c
5 files changed
+111 -19

No files matched your search

+5 -5
View File
@@ -97,10 +97,11 @@ jobs:
libwayland-client0 libwayland-egl1 libwayland-cursor0 libegl1 libgl1 \
patchelf file binutils
# Official Qt binaries. `qtshadertools` brings `qsb`; the committed .qsb
# files make it optional for the build (build.rs warns), but the
# re-bake keeps shaders honest against the pinned Qt. The arm64 host
# exists in aqt from 6.7 — the first aarch64 dispatch is the proof.
# Official Qt binaries — WITHOUT qtshadertools: with qsb on PATH build.rs
# re-bakes shaders by mtime and a fresh checkout is nondeterministic.
# The build ships the committed .qsb (build.rs warns and keeps them);
# shader health is judged by test-crates.yml's shader-gate. The arm64
# host exists in aqt from 6.7 — the first aarch64 dispatch is the proof.
- name: Install Qt ${{ env.QT_VERSION }}
uses: jurplel/install-qt-action@v4
with:
@@ -108,7 +109,6 @@ jobs:
host: ${{ inputs.arch == 'aarch64' && 'linux_arm64' || 'linux' }}
target: desktop
arch: ${{ inputs.arch == 'aarch64' && 'linux_gcc_arm64' || 'linux_gcc_64' }}
modules: qtshadertools
cache: true
- name: Setup Rust (stable)
+1 -1
View File
@@ -112,6 +112,7 @@ jobs:
exit 1
fi
# Without qtshadertools: the committed .qsb ship (see build-qt-linux.yml).
- name: Install Qt ${{ env.QT_VERSION }} (universal)
uses: jurplel/install-qt-action@v4
with:
@@ -119,7 +120,6 @@ jobs:
host: mac
target: desktop
arch: clang_64
modules: qtshadertools
cache: true
- name: Setup Rust (stable)
+38 -12
View File
@@ -97,6 +97,26 @@ jobs:
echo "::error::qbzd graph resolves Slint crates:"; echo "$hits"; exit 1
fi
# Every shader must bake with the pinned qsb. Separate job so qsb is never
# on PATH while cargo runs (see qt-gate).
shader-gate:
name: shader bake gate
runs-on: ubuntu-24.04
timeout-minutes: 15
steps:
- uses: actions/checkout@v7
- name: Install Qt ${{ env.QT_VERSION }} + shader tools
uses: jurplel/install-qt-action@v4
with:
version: ${{ env.QT_VERSION }}
host: linux
target: desktop
arch: linux_gcc_64
modules: qtshadertools
cache: true
- name: Bake every shader to a temp dir
run: scripts/qml-audits/shader_bake_gate.sh "$QT_ROOT_DIR/bin/qsb"
qt-gate:
name: qt gate (audits, tests, offscreen boot)
runs-on: ubuntu-24.04
@@ -105,17 +125,6 @@ jobs:
- name: Checkout
uses: actions/checkout@v7
# Cheapest gates first. The audits are ~1 s and catch exactly the class
# of mistake nothing else in CI can see.
- name: QML audits
run: |
set -euo pipefail
for a in qml_resolution_audit qml_singleton_xref qml_eager_tab_audit qml_module_registration_audit qml_icon_bake_audit; do
echo "::group::$a"
python3 "scripts/qml-audits/$a.py" "$PWD/crates/qbz-qt"
echo "::endgroup::"
done
- name: Install system dependencies
run: |
sudo apt-get update
@@ -124,6 +133,9 @@ jobs:
libasound2-dev libjack-jackd2-dev libdbus-1-dev libssl-dev \
libgl1-mesa-dev libegl1-mesa-dev libxkbcommon-dev
# No qtshadertools here ON PURPOSE: with qsb on PATH build.rs re-bakes
# shaders by mtime, which makes a fresh checkout nondeterministic. The
# build ships the committed .qsb; shader health is the shader-gate job.
- name: Install Qt ${{ env.QT_VERSION }}
uses: jurplel/install-qt-action@v4
with:
@@ -131,9 +143,23 @@ jobs:
host: linux
target: desktop
arch: linux_gcc_64
modules: qtshadertools
cache: true
# The audits need Qt's own plugins.qmltypes to resolve QtQuick types —
# hence after the Qt install, pointed at it. ~1 s, and the class of
# mistake nothing else in CI can see (a missing component, a bridge
# member that does not exist).
- name: QML audits
env:
QBZ_QT_QML_DIR: ${{ env.QT_ROOT_DIR }}/qml
run: |
set -euo pipefail
for a in qml_resolution_audit qml_singleton_xref qml_eager_tab_audit qml_module_registration_audit qml_icon_bake_audit; do
echo "::group::$a"
python3 "scripts/qml-audits/$a.py" "$PWD/crates/qbz-qt"
echo "::endgroup::"
done
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable