From 3cfc0169e34bbe6fca99e4d2f357004e9275c602 Mon Sep 17 00:00:00 2001 From: Zach Vorhies Date: Mon, 2 Nov 2026 13:55:07 -0800 Subject: [PATCH 1/2] ci(build): build x86_64 Linux natively so pkg-config finds system GTK (#285) --- .github/workflows/_build.yml | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/.github/workflows/_build.yml b/.github/workflows/_build.yml index e107e26e..fcaada0a 100644 --- a/.github/workflows/_build.yml +++ b/.github/workflows/_build.yml @@ -110,15 +110,22 @@ jobs: linker: platform-default toolchain-file: rust-toolchain.ci.toml + # x86_64-unknown-linux-gnu is the runner's own triple, so it builds + # natively, without `--target`. Naming it makes soldr switch to its + # glibc-2.17 catalogue sysroot and point PKG_CONFIG_LIBDIR there, which + # hides Ubuntu's GTK/WebKit from pkg-config, so glib-sys fails (#285). + # The artifact names and wheel plat tag still use inputs.rust-target. - name: Build fastled CLI binary (for wheel bundling) + env: + CARGO_TARGET_TRIPLE: ${{ inputs.rust-target != 'x86_64-unknown-linux-gnu' && inputs.rust-target || '' }} run: | - if [ -n "${{ inputs.rust-target }}" ]; then - soldr cargo build --release --bin fastled --target "${{ inputs.rust-target }}" - case "${{ inputs.rust-target }}" in + if [ -n "$CARGO_TARGET_TRIPLE" ]; then + soldr cargo build --release --bin fastled --target "$CARGO_TARGET_TRIPLE" + case "$CARGO_TARGET_TRIPLE" in *windows*) EXE_NAME="fastled.exe" ;; *) EXE_NAME="fastled" ;; esac - BIN_SRC="target/${{ inputs.rust-target }}/release/${EXE_NAME}" + BIN_SRC="target/$CARGO_TARGET_TRIPLE/release/${EXE_NAME}" else soldr cargo build --release --bin fastled case "$(uname -s)" in @@ -174,7 +181,8 @@ jobs: env: # setup.py rebuilds the bundled binary; keep that rebuild on the # requested target, especially Windows ARM on an x64 runner. - FASTLED_RUST_TARGET: ${{ inputs.rust-target }} + # Native for x86_64 Linux, for the same reason as the build step. + FASTLED_RUST_TARGET: ${{ inputs.rust-target != 'x86_64-unknown-linux-gnu' && inputs.rust-target || '' }} run: | PLAT_NAME="" case "${{ inputs.rust-target }}" in From 29b41abcaccb7f8d20ef0f523a646e70c3011e2a Mon Sep 17 00:00:00 2001 From: Zach Vorhies Date: Mon, 2 Nov 2026 14:09:31 -0800 Subject: [PATCH 2/2] test(ci): pin the native x86_64 Linux build contract (#285) --- tests/unit/test_ci_modes.py | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/tests/unit/test_ci_modes.py b/tests/unit/test_ci_modes.py index ce82543c..cf7555f6 100644 --- a/tests/unit/test_ci_modes.py +++ b/tests/unit/test_ci_modes.py @@ -380,7 +380,25 @@ def test_cross_target_wheel_build_preserves_target_for_setup_py(): wheel_step = build.split(" - name: Build wheel\n", 1)[1].split( " - name: Smoke test", 1 )[0] - assert "FASTLED_RUST_TARGET: ${{ inputs.rust-target }}" in wheel_step + # Cross targets keep their triple; only the runner-native x86_64 Linux + # triple is dropped so soldr does not swap in its glibc-2.17 sysroot (#285). + native = "inputs.rust-target != 'x86_64-unknown-linux-gnu'" + assert ( + f"FASTLED_RUST_TARGET: ${{{{ {native} && inputs.rust-target || '' }}}}" + in wheel_step + ) + + +def test_native_x86_linux_build_omits_target_so_pkg_config_sees_system_gtk(): + build = (WORKFLOWS / "_build.yml").read_text() + step = build.split(" - name: Build fastled CLI binary", 1)[1].split( + " - name: Build wheel", 1 + )[0] + assert ( + "CARGO_TARGET_TRIPLE: ${{ inputs.rust-target != " + "'x86_64-unknown-linux-gnu' && inputs.rust-target || '' }}" + ) in step + assert '--target "$CARGO_TARGET_TRIPLE"' in step def test_release_report_validation_rejects_missing_or_wrong_sha_cells():