summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMitchell Hashimoto <m@mitchellh.com>2025-08-20 13:30:09 -0700
committerGitHub <noreply@github.com>2025-08-20 13:30:09 -0700
commitfec0defd04773f1cc5b86f20db2fb80d7f278568 (patch)
tree280030ef1b986cb9c8a2f9ee74699fded0fd85ba
parentf1300ec44f030f053013cabda0288ba3e71d3550 (diff)
parent5287b963c9d5b300411f0b103e012068dddccc26 (diff)
ci: run valgrind in CI (#8309)
This runs Valgrind on our unit test suite in CI. Since we're not currently passing Valgrind, this will be incrementally updated with the filters for our passing tests. Ultimately, we'll remove the filters and run the full suite. Valgrind is slow and hungry so this is our first and only job currently on a large instance.
-rw-r--r--.github/workflows/test.yml40
1 files changed, 40 insertions, 0 deletions
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 44e1e30fc..61d0cde42 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -36,6 +36,7 @@ jobs:
- blueprint-compiler
- test-pkg-linux
- test-debian-13
+ - valgrind
- zig-fmt
steps:
- id: status
@@ -1038,3 +1039,42 @@ jobs:
# cache-key: flatpak-builder-${{ github.sha }}
# arch: ${{ matrix.variant.arch }}
# verbose: true
+
+ valgrind:
+ if: github.repository == 'ghostty-org/ghostty'
+ runs-on: namespace-profile-ghostty-lg
+ needs: test
+ env:
+ ZIG_LOCAL_CACHE_DIR: /zig/local-cache
+ ZIG_GLOBAL_CACHE_DIR: /zig/global-cache
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
+
+ - name: Setup Cache
+ uses: namespacelabs/nscloud-cache-action@305bfa7ea980a858d511af4899414a84847c7991 # v1.2.16
+ with:
+ path: |
+ /nix
+ /zig
+
+ # Install Nix and use that to run our tests so our environment matches exactly.
+ - uses: cachix/install-nix-action@fc6e360bedc9ee72d75e701397f0bb30dce77568 # v31.5.2
+ with:
+ nix_path: nixpkgs=channel:nixos-unstable
+ - uses: cachix/cachix-action@0fc020193b5a1fa3ac4575aa3a7d3aa6a35435ad # v16
+ with:
+ name: ghostty
+ authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
+
+ - name: valgrind deps
+ run: |
+ sudo apt update -y
+ sudo apt install -y valgrind libc6-dbg
+
+ # Currently, the entire Ghostty test suite does not pass Valgrind.
+ # As we incrementally add areas that pass, we'll add more filters here.
+ # Ultimately, we'll remove the filter and run the full suite.
+ - name: valgrind
+ run: |
+ nix develop -c zig build test-valgrind -Dtest-filter="OSC"