fix(ci): make Windows preflight executable

Teach qmllint about statically registered native QML types and enforce metadata parity. Pin release builds to the MSVC 2022 runner and force Cargo to use the Visual Studio linker instead of Git for Windows link.exe.

cx
This commit is contained in:
vicrodh committed 2026-08-28 09:44:25 -06:00
1 parent fbc8e9fa31
commit bc4e8e6d7a
5 files changed
+195 -2

No files matched your search

+14 -1
View File
@@ -90,6 +90,16 @@ jobs:
with:
arch: x64
# Git for Windows also ships a POSIX `link.exe`; force rustc to use the
# MSVC linker selected above instead of trusting PATH ordering.
- name: Pin MSVC linker
shell: pwsh
run: |
$linker = Join-Path $env:VCToolsInstallDir "bin\Hostx64\x64\link.exe"
if (-not (Test-Path $linker)) { throw "MSVC linker not found at $linker" }
"CARGO_TARGET_X86_64_PC_WINDOWS_MSVC_LINKER=$linker" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
Write-Host "Cargo linker: $linker"
# aws-lc-sys (via rustls) ASSEMBLES on Windows x86_64. Its shipped
# prebuilt objects are used only when nasm is ABSENT, and without either
# the build fails hard with "Missing dependency: nasm" -- after the whole
@@ -119,9 +129,12 @@ jobs:
set -euo pipefail
lint="$QT_ROOT_DIR/bin/qmllint.exe"
[ -x "$lint" ] || { echo "::error::qmllint not found at $lint"; exit 1; }
native_qmldir="scripts/qml-audits/qbz-native-types/qmldir"
python scripts/qml-audits/qml_native_types_audit.py
fail=0
while IFS= read -r f; do
out=$("$lint" -I "$QT_ROOT_DIR/qml" -I crates/qbz-qt/qml "$f" 2>&1 || true)
out=$("$lint" -I "$QT_ROOT_DIR/qml" -I crates/qbz-qt/qml \
-i "$native_qmldir" "$f" 2>&1 || true)
# Only the two findings that are real defects rather than style:
# an unresolved TYPE, and a property that does not exist. The
# bridges have no .qmltypes here, so their members are reported as
+14 -1
View File
@@ -46,7 +46,9 @@ env:
jobs:
build-windows:
runs-on: windows-latest
# Qt's archive below is the MSVC 2022 build. `windows-latest` currently
# resolves to a VS 18 image, so pin the matching toolchain deliberately.
runs-on: windows-2022
timeout-minutes: 150
# No continue-on-error: a red release leg must look red. Pre-flight
# without publishing = dispatch with an empty tag.
@@ -132,6 +134,17 @@ jobs:
with:
arch: x64
# Git for Windows also ships a POSIX `link.exe`. If it wins executable
# lookup, rustc sends MSVC flags to /usr/bin/link and dies immediately.
# Give Cargo the absolute MSVC linker selected by the dev environment.
- name: Pin MSVC linker
shell: pwsh
run: |
$linker = Join-Path $env:VCToolsInstallDir "bin\Hostx64\x64\link.exe"
if (-not (Test-Path $linker)) { throw "MSVC linker not found at $linker" }
"CARGO_TARGET_X86_64_PC_WINDOWS_MSVC_LINKER=$linker" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
Write-Host "Cargo linker: $linker"
# Decision D1: only needed while rustls still pulls aws-lc-sys. Delete
# this step once the ring flip (W8) lands.
- name: NASM (aws-lc-sys)