gtk: fix building on Debian 12

`std.debug.assert(x)` _is not_ the same as `if (!x) unreachable`
because the function call is not `inline`. Since it's not inline the
Zig compiler will try to compile any code that might otherwise be
unreachable.

Also, added a CI test that compiles Ghostty in a Debian 12 container to
ensure that regressions do not happen.
This commit is contained in:
Jeffrey C. Ollie
2025-02-15 16:17:46 -06:00
parent 6d8db4b380
commit 0ce1342263
3 changed files with 79 additions and 3 deletions

View File

@@ -626,3 +626,29 @@ jobs:
- name: Test ${{ matrix.pkg }} Build
run: |
nix develop -c sh -c "cd pkg/${{ matrix.pkg }} ; zig build test"
test-debian-12:
strategy:
fail-fast: false
matrix:
platform: ["linux/amd64", "linux/arm64"]
name: Test build on Debian 12 ${{ matrix.platform }}
runs-on: namespace-profile-ghostty-sm
needs: test
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install and configure Namespace CLI
uses: namespacelabs/nscloud-setup@v0
- name: Configure Namespace powered Buildx
uses: namespacelabs/nscloud-setup-buildx-action@v0
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
file: src/build/docker/debian/Dockerfile
build-args: DISTRO_VERSION=12
platform: ${{ matrix.platform }}