ci: test libghostty fuzzer build

This commit is contained in:
Mitchell Hashimoto
2026-03-01 06:53:30 -08:00
parent e8f861f561
commit 41870c14ad

View File

@@ -102,6 +102,7 @@ jobs:
- test-gtk
- test-sentry-linux
- test-i18n
- test-fuzz-libghostty
- test-macos
- pinact
- prettier
@@ -1010,6 +1011,51 @@ jobs:
run: |
nix develop -c zig build -Di18n=${{ matrix.i18n }}
test-fuzz-libghostty:
name: Build test/fuzz-libghostty
runs-on: namespace-profile-ghostty-sm
needs: test
env:
ZIG_LOCAL_CACHE_DIR: /zig/local-cache
ZIG_GLOBAL_CACHE_DIR: /zig/global-cache
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Setup Cache
uses: namespacelabs/nscloud-cache-action@a90bb5d4b27522ce881c6e98eebd7d7e6d1653f9 # v1.4.2
with:
path: |
/nix
/zig
# Install Nix and use that to run our tests so our environment matches exactly.
- uses: cachix/install-nix-action@2126ae7fc54c9df00dd18f7f18754393182c73cd # v31.9.1
with:
nix_path: nixpkgs=channel:nixos-unstable
- uses: cachix/cachix-action@3ba601ff5bbb07c7220846facfa2cd81eeee15a1 # v16
with:
name: ghostty
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- name: Install AFL++ and LLVM
run: |
sudo apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y afl++ llvm
- name: Verify AFL++ and LLVM are available
run: |
afl-cc --version
if command -v llvm-config >/dev/null 2>&1; then
llvm-config --version
else
llvm-config-18 --version
fi
- name: Build fuzzer harness
run: |
nix develop -c sh -c 'cd test/fuzz-libghostty && zig build'
zig-fmt:
if: github.repository == 'ghostty-org/ghostty' && needs.skip.outputs.skip != 'true' && needs.skip.outputs.zig == 'true'
needs: skip