Skip to content

Commit fec0def

Browse files
authored
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.
2 parents f1300ec + 5287b96 commit fec0def

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

.github/workflows/test.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ jobs:
3636
- blueprint-compiler
3737
- test-pkg-linux
3838
- test-debian-13
39+
- valgrind
3940
- zig-fmt
4041
steps:
4142
- id: status
@@ -1038,3 +1039,42 @@ jobs:
10381039
# cache-key: flatpak-builder-${{ github.sha }}
10391040
# arch: ${{ matrix.variant.arch }}
10401041
# verbose: true
1042+
1043+
valgrind:
1044+
if: github.repository == 'ghostty-org/ghostty'
1045+
runs-on: namespace-profile-ghostty-lg
1046+
needs: test
1047+
env:
1048+
ZIG_LOCAL_CACHE_DIR: /zig/local-cache
1049+
ZIG_GLOBAL_CACHE_DIR: /zig/global-cache
1050+
steps:
1051+
- name: Checkout code
1052+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
1053+
1054+
- name: Setup Cache
1055+
uses: namespacelabs/nscloud-cache-action@305bfa7ea980a858d511af4899414a84847c7991 # v1.2.16
1056+
with:
1057+
path: |
1058+
/nix
1059+
/zig
1060+
1061+
# Install Nix and use that to run our tests so our environment matches exactly.
1062+
- uses: cachix/install-nix-action@fc6e360bedc9ee72d75e701397f0bb30dce77568 # v31.5.2
1063+
with:
1064+
nix_path: nixpkgs=channel:nixos-unstable
1065+
- uses: cachix/cachix-action@0fc020193b5a1fa3ac4575aa3a7d3aa6a35435ad # v16
1066+
with:
1067+
name: ghostty
1068+
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
1069+
1070+
- name: valgrind deps
1071+
run: |
1072+
sudo apt update -y
1073+
sudo apt install -y valgrind libc6-dbg
1074+
1075+
# Currently, the entire Ghostty test suite does not pass Valgrind.
1076+
# As we incrementally add areas that pass, we'll add more filters here.
1077+
# Ultimately, we'll remove the filter and run the full suite.
1078+
- name: valgrind
1079+
run: |
1080+
nix develop -c zig build test-valgrind -Dtest-filter="OSC"

0 commit comments

Comments
 (0)