From be0b4602bdfe8363b8a1edbf9d6921a5d725ea63 Mon Sep 17 00:00:00 2001 From: Nico Ritschel Date: Sun, 1 Mar 2026 12:46:24 -0800 Subject: [PATCH 1/7] Re-apply CI fixes for GitHub-hosted runners after upstream merge The upstream merge overwrote our previous CI customizations (commits 2b89649, f932354, 6f61cfd, 197e953). This re-applies the same fixes: - Replace all namespace-profile-ghostty-* runners with ubuntu-24.04/macos-latest - Remove ghostty-org/ghostty repository guards from job conditions - Use workspace-relative Zig cache dirs instead of Namespace Cloud paths - Strip namespacelabs/nscloud-cache-action steps (30 instances) - Revert test-debian-13 from Namespace Buildx to plain docker build --- .github/workflows/test.yml | 414 ++++++++++--------------------------- 1 file changed, 111 insertions(+), 303 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3ad52541855..199ab8a7fc8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,8 +15,7 @@ jobs: # are other fast skip conditions, and add it as an output. Then modify # other tests `needs/if` to check them. Document the outputs. skip: - if: github.repository == 'ghostty-org/ghostty' - runs-on: namespace-profile-ghostty-xsm + runs-on: ubuntu-24.04 outputs: # 'true' when all changed files are non-code (e.g. only VOUCHED.td), # signaling that all other jobs can be skipped entirely. @@ -80,7 +79,7 @@ jobs: required: name: "Required Checks: Test" if: always() - runs-on: namespace-profile-ghostty-xsm + runs-on: ubuntu-24.04 needs: - skip - build-bench @@ -138,21 +137,15 @@ jobs: build-bench: # We build benchmarks on large because it uses ReleaseFast - runs-on: namespace-profile-ghostty-lg + runs-on: ubuntu-24.04 needs: test env: - ZIG_LOCAL_CACHE_DIR: /zig/local-cache - ZIG_GLOBAL_CACHE_DIR: /zig/global-cache + ZIG_LOCAL_CACHE_DIR: ${{ github.workspace }}/.zig-cache/local + ZIG_GLOBAL_CACHE_DIR: ${{ github.workspace }}/.zig-cache/global 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 @@ -181,21 +174,15 @@ jobs: zig-vt-stream, ] name: Example ${{ matrix.dir }} - runs-on: namespace-profile-ghostty-sm + runs-on: ubuntu-24.04 needs: test env: - ZIG_LOCAL_CACHE_DIR: /zig/local-cache - ZIG_GLOBAL_CACHE_DIR: /zig/global-cache + ZIG_LOCAL_CACHE_DIR: ${{ github.workspace }}/.zig-cache/local + ZIG_GLOBAL_CACHE_DIR: ${{ github.workspace }}/.zig-cache/global 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 @@ -214,21 +201,15 @@ jobs: build-flatpak: strategy: fail-fast: false - runs-on: namespace-profile-ghostty-sm + runs-on: ubuntu-24.04 needs: test env: - ZIG_LOCAL_CACHE_DIR: /zig/local-cache - ZIG_GLOBAL_CACHE_DIR: /zig/global-cache + ZIG_LOCAL_CACHE_DIR: ${{ github.workspace }}/.zig-cache/local + ZIG_GLOBAL_CACHE_DIR: ${{ github.workspace }}/.zig-cache/global 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 @@ -248,21 +229,15 @@ jobs: build-snap: strategy: fail-fast: false - runs-on: namespace-profile-ghostty-sm + runs-on: ubuntu-24.04 needs: test env: - ZIG_LOCAL_CACHE_DIR: /zig/local-cache - ZIG_GLOBAL_CACHE_DIR: /zig/global-cache + ZIG_LOCAL_CACHE_DIR: ${{ github.workspace }}/.zig-cache/local + ZIG_GLOBAL_CACHE_DIR: ${{ github.workspace }}/.zig-cache/global 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 @@ -292,21 +267,15 @@ jobs: x86_64-windows, wasm32-freestanding, ] - runs-on: namespace-profile-ghostty-sm + runs-on: ubuntu-24.04 needs: test env: - ZIG_LOCAL_CACHE_DIR: /zig/local-cache - ZIG_GLOBAL_CACHE_DIR: /zig/global-cache + ZIG_LOCAL_CACHE_DIR: ${{ github.workspace }}/.zig-cache/local + ZIG_GLOBAL_CACHE_DIR: ${{ github.workspace }}/.zig-cache/global 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 @@ -328,22 +297,15 @@ jobs: strategy: matrix: target: [aarch64-macos, x86_64-macos, aarch64-ios] - runs-on: namespace-profile-ghostty-macos-tahoe + runs-on: macos-latest needs: test env: - ZIG_LOCAL_CACHE_DIR: /Users/runner/zig/local-cache - ZIG_GLOBAL_CACHE_DIR: /Users/runner/zig/global-cache + ZIG_LOCAL_CACHE_DIR: ${{ github.workspace }}/.zig-cache/local + ZIG_GLOBAL_CACHE_DIR: ${{ github.workspace }}/.zig-cache/global steps: - name: Checkout code uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - name: Setup Cache - uses: namespacelabs/nscloud-cache-action@a90bb5d4b27522ce881c6e98eebd7d7e6d1653f9 # v1.4.2 - with: - cache: | - xcode - path: | - /Users/runner/zig # TODO(tahoe): https://github.com/NixOS/nix/issues/13342 - uses: DeterminateSystems/nix-installer-action@main @@ -368,22 +330,16 @@ jobs: matrix: target: [aarch64-linux-android, x86_64-linux-android, arm-linux-androideabi] - runs-on: namespace-profile-ghostty-sm + runs-on: ubuntu-24.04 needs: test env: - ZIG_LOCAL_CACHE_DIR: /zig/local-cache - ZIG_GLOBAL_CACHE_DIR: /zig/global-cache + ZIG_LOCAL_CACHE_DIR: ${{ github.workspace }}/.zig-cache/local + ZIG_GLOBAL_CACHE_DIR: ${{ github.workspace }}/.zig-cache/global ANDROID_NDK_VERSION: r29 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 @@ -414,22 +370,16 @@ jobs: strategy: fail-fast: false matrix: - os: [namespace-profile-ghostty-md, namespace-profile-ghostty-md-arm64] + os: [ubuntu-24.04] runs-on: ${{ matrix.os }} needs: test env: - ZIG_LOCAL_CACHE_DIR: /zig/local-cache - ZIG_GLOBAL_CACHE_DIR: /zig/global-cache + ZIG_LOCAL_CACHE_DIR: ${{ github.workspace }}/.zig-cache/local + ZIG_GLOBAL_CACHE_DIR: ${{ github.workspace }}/.zig-cache/global 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 @@ -444,21 +394,15 @@ jobs: run: nix develop -c zig build build-linux-libghostty: - runs-on: namespace-profile-ghostty-md + runs-on: ubuntu-24.04 needs: test env: - ZIG_LOCAL_CACHE_DIR: /zig/local-cache - ZIG_GLOBAL_CACHE_DIR: /zig/global-cache + ZIG_LOCAL_CACHE_DIR: ${{ github.workspace }}/.zig-cache/local + ZIG_GLOBAL_CACHE_DIR: ${{ github.workspace }}/.zig-cache/global 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 @@ -476,22 +420,16 @@ jobs: strategy: fail-fast: false matrix: - os: [namespace-profile-ghostty-md, namespace-profile-ghostty-md-arm64] + os: [ubuntu-24.04] runs-on: ${{ matrix.os }} needs: test env: - ZIG_LOCAL_CACHE_DIR: /zig/local-cache - ZIG_GLOBAL_CACHE_DIR: /zig/global-cache + ZIG_LOCAL_CACHE_DIR: ${{ github.workspace }}/.zig-cache/local + ZIG_GLOBAL_CACHE_DIR: ${{ github.workspace }}/.zig-cache/global 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 @@ -521,23 +459,17 @@ jobs: run: nm result/bin/.ghostty-wrapped 2>&1 | grep -q 'main_ghostty.main' build-dist: - runs-on: namespace-profile-ghostty-md + runs-on: ubuntu-24.04 needs: test outputs: artifact-id: ${{ steps.upload-artifact.outputs.artifact-id }} env: - ZIG_LOCAL_CACHE_DIR: /zig/local-cache - ZIG_GLOBAL_CACHE_DIR: /zig/global-cache + ZIG_LOCAL_CACHE_DIR: ${{ github.workspace }}/.zig-cache/local + ZIG_GLOBAL_CACHE_DIR: ${{ github.workspace }}/.zig-cache/global 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 @@ -564,7 +496,7 @@ jobs: trigger-snap: if: github.event_name != 'pull_request' - runs-on: namespace-profile-ghostty-xsm + runs-on: ubuntu-24.04 needs: [build-dist, build-snap] steps: - name: Checkout code @@ -582,7 +514,7 @@ jobs: trigger-flatpak: if: github.event_name != 'pull_request' - runs-on: namespace-profile-ghostty-xsm + runs-on: ubuntu-24.04 needs: [build-dist, build-flatpak] steps: - name: Checkout code @@ -599,22 +531,15 @@ jobs: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} build-macos: - runs-on: namespace-profile-ghostty-macos-tahoe + runs-on: macos-latest needs: test env: - ZIG_LOCAL_CACHE_DIR: /Users/runner/zig/local-cache - ZIG_GLOBAL_CACHE_DIR: /Users/runner/zig/global-cache + ZIG_LOCAL_CACHE_DIR: ${{ github.workspace }}/.zig-cache/local + ZIG_GLOBAL_CACHE_DIR: ${{ github.workspace }}/.zig-cache/global steps: - name: Checkout code uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - name: Setup Cache - uses: namespacelabs/nscloud-cache-action@a90bb5d4b27522ce881c6e98eebd7d7e6d1653f9 # v1.4.2 - with: - cache: | - xcode - path: | - /Users/runner/zig # TODO(tahoe): https://github.com/NixOS/nix/issues/13342 - uses: DeterminateSystems/nix-installer-action@main @@ -659,22 +584,15 @@ jobs: COMPILATION_CACHE_KEEP_CAS_DIRECTORY=YES build-macos-freetype: - runs-on: namespace-profile-ghostty-macos-tahoe + runs-on: macos-latest needs: test env: - ZIG_LOCAL_CACHE_DIR: /Users/runner/zig/local-cache - ZIG_GLOBAL_CACHE_DIR: /Users/runner/zig/global-cache + ZIG_LOCAL_CACHE_DIR: ${{ github.workspace }}/.zig-cache/local + ZIG_GLOBAL_CACHE_DIR: ${{ github.workspace }}/.zig-cache/global steps: - name: Checkout code uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - name: Setup Cache - uses: namespacelabs/nscloud-cache-action@a90bb5d4b27522ce881c6e98eebd7d7e6d1653f9 # v1.4.2 - with: - cache: | - xcode - path: | - /Users/runner/zig # TODO(tahoe): https://github.com/NixOS/nix/issues/13342 - uses: DeterminateSystems/nix-installer-action@main @@ -773,14 +691,14 @@ jobs: run: Get-Content -Path ".\build.log" test: - if: github.repository == 'ghostty-org/ghostty' && needs.skip.outputs.skip != 'true' + if: needs.skip.outputs.skip != 'true' needs: skip - runs-on: namespace-profile-ghostty-md + runs-on: ubuntu-24.04 outputs: zig_version: ${{ steps.zig.outputs.version }} env: - ZIG_LOCAL_CACHE_DIR: /zig/local-cache - ZIG_GLOBAL_CACHE_DIR: /zig/global-cache + ZIG_LOCAL_CACHE_DIR: ${{ github.workspace }}/.zig-cache/local + ZIG_GLOBAL_CACHE_DIR: ${{ github.workspace }}/.zig-cache/global steps: - name: Checkout code uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 @@ -790,12 +708,6 @@ jobs: run: | echo "version=$(sed -n -E 's/^\s*\.?minimum_zig_version\s*=\s*"([^"]+)".*/\1/p' build.zig.zon)" >> $GITHUB_OUTPUT - - 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 @@ -823,21 +735,15 @@ jobs: x11: ["true", "false"] wayland: ["true", "false"] name: GTK x11=${{ matrix.x11 }} wayland=${{ matrix.wayland }} - runs-on: namespace-profile-ghostty-sm + runs-on: ubuntu-24.04 needs: test env: - ZIG_LOCAL_CACHE_DIR: /zig/local-cache - ZIG_GLOBAL_CACHE_DIR: /zig/global-cache + ZIG_LOCAL_CACHE_DIR: ${{ github.workspace }}/.zig-cache/local + ZIG_GLOBAL_CACHE_DIR: ${{ github.workspace }}/.zig-cache/global 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 @@ -871,21 +777,15 @@ jobs: matrix: simd: ["true", "false"] name: Build -Dsimd=${{ matrix.simd }} - runs-on: namespace-profile-ghostty-sm + runs-on: ubuntu-24.04 needs: test env: - ZIG_LOCAL_CACHE_DIR: /zig/local-cache - ZIG_GLOBAL_CACHE_DIR: /zig/global-cache + ZIG_LOCAL_CACHE_DIR: ${{ github.workspace }}/.zig-cache/local + ZIG_GLOBAL_CACHE_DIR: ${{ github.workspace }}/.zig-cache/global 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 @@ -906,21 +806,15 @@ jobs: matrix: sentry: ["true", "false"] name: Build -Dsentry=${{ matrix.sentry }} - runs-on: namespace-profile-ghostty-sm + runs-on: ubuntu-24.04 needs: test env: - ZIG_LOCAL_CACHE_DIR: /zig/local-cache - ZIG_GLOBAL_CACHE_DIR: /zig/global-cache + ZIG_LOCAL_CACHE_DIR: ${{ github.workspace }}/.zig-cache/local + ZIG_GLOBAL_CACHE_DIR: ${{ github.workspace }}/.zig-cache/global 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 @@ -936,22 +830,15 @@ jobs: nix develop -c zig build -Dsentry=${{ matrix.sentry }} test-macos: - runs-on: namespace-profile-ghostty-macos-tahoe + runs-on: macos-latest needs: test env: - ZIG_LOCAL_CACHE_DIR: /Users/runner/zig/local-cache - ZIG_GLOBAL_CACHE_DIR: /Users/runner/zig/global-cache + ZIG_LOCAL_CACHE_DIR: ${{ github.workspace }}/.zig-cache/local + ZIG_GLOBAL_CACHE_DIR: ${{ github.workspace }}/.zig-cache/global steps: - name: Checkout code uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - name: Setup Cache - uses: namespacelabs/nscloud-cache-action@a90bb5d4b27522ce881c6e98eebd7d7e6d1653f9 # v1.4.2 - with: - cache: | - xcode - path: | - /Users/runner/zig # TODO(tahoe): https://github.com/NixOS/nix/issues/13342 - uses: DeterminateSystems/nix-installer-action@main @@ -981,21 +868,15 @@ jobs: matrix: i18n: ["true", "false"] name: Build -Di18n=${{ matrix.i18n }} - runs-on: namespace-profile-ghostty-sm + runs-on: ubuntu-24.04 needs: test env: - ZIG_LOCAL_CACHE_DIR: /zig/local-cache - ZIG_GLOBAL_CACHE_DIR: /zig/global-cache + ZIG_LOCAL_CACHE_DIR: ${{ github.workspace }}/.zig-cache/local + ZIG_GLOBAL_CACHE_DIR: ${{ github.workspace }}/.zig-cache/global 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 @@ -1011,21 +892,15 @@ jobs: nix develop -c zig build -Di18n=${{ matrix.i18n }} zig-fmt: - if: github.repository == 'ghostty-org/ghostty' && needs.skip.outputs.skip != 'true' && needs.skip.outputs.zig == 'true' + if: needs.skip.outputs.skip != 'true' && needs.skip.outputs.zig == 'true' needs: skip - runs-on: namespace-profile-ghostty-xsm + runs-on: ubuntu-24.04 timeout-minutes: 60 env: - ZIG_LOCAL_CACHE_DIR: /zig/local-cache - ZIG_GLOBAL_CACHE_DIR: /zig/global-cache + ZIG_LOCAL_CACHE_DIR: ${{ github.workspace }}/.zig-cache/local + ZIG_GLOBAL_CACHE_DIR: ${{ github.workspace }}/.zig-cache/global steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - name: Setup Cache - uses: namespacelabs/nscloud-cache-action@a90bb5d4b27522ce881c6e98eebd7d7e6d1653f9 # v1.4.2 - with: - path: | - /nix - /zig - uses: cachix/install-nix-action@2126ae7fc54c9df00dd18f7f18754393182c73cd # v31.9.1 with: nix_path: nixpkgs=channel:nixos-unstable @@ -1040,23 +915,17 @@ jobs: pinact: name: "GitHub Actions Pins" - if: github.repository == 'ghostty-org/ghostty' && needs.skip.outputs.skip != 'true' && needs.skip.outputs.actions_pins == 'true' + if: needs.skip.outputs.skip != 'true' && needs.skip.outputs.actions_pins == 'true' needs: skip - runs-on: namespace-profile-ghostty-xsm + runs-on: ubuntu-24.04 timeout-minutes: 60 permissions: contents: read env: - ZIG_LOCAL_CACHE_DIR: /zig/local-cache - ZIG_GLOBAL_CACHE_DIR: /zig/global-cache + ZIG_LOCAL_CACHE_DIR: ${{ github.workspace }}/.zig-cache/local + ZIG_GLOBAL_CACHE_DIR: ${{ github.workspace }}/.zig-cache/global steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - name: Setup Cache - uses: namespacelabs/nscloud-cache-action@a90bb5d4b27522ce881c6e98eebd7d7e6d1653f9 # v1.4.2 - with: - path: | - /nix - /zig - uses: cachix/install-nix-action@2126ae7fc54c9df00dd18f7f18754393182c73cd # v31.9.1 with: nix_path: nixpkgs=channel:nixos-unstable @@ -1072,21 +941,15 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} prettier: - if: github.repository == 'ghostty-org/ghostty' && needs.skip.outputs.skip != 'true' + if: needs.skip.outputs.skip != 'true' needs: skip - runs-on: namespace-profile-ghostty-xsm + runs-on: ubuntu-24.04 timeout-minutes: 60 env: - ZIG_LOCAL_CACHE_DIR: /zig/local-cache - ZIG_GLOBAL_CACHE_DIR: /zig/global-cache + ZIG_LOCAL_CACHE_DIR: ${{ github.workspace }}/.zig-cache/local + ZIG_GLOBAL_CACHE_DIR: ${{ github.workspace }}/.zig-cache/global steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - name: Setup Cache - uses: namespacelabs/nscloud-cache-action@a90bb5d4b27522ce881c6e98eebd7d7e6d1653f9 # v1.4.2 - with: - path: | - /nix - /zig - uses: cachix/install-nix-action@2126ae7fc54c9df00dd18f7f18754393182c73cd # v31.9.1 with: nix_path: nixpkgs=channel:nixos-unstable @@ -1100,20 +963,13 @@ jobs: run: nix develop -c prettier --check . swiftlint: - if: github.repository == 'ghostty-org/ghostty' && needs.skip.outputs.skip != 'true' && needs.skip.outputs.macos == 'true' - runs-on: namespace-profile-ghostty-macos-tahoe + if: needs.skip.outputs.skip != 'true' && needs.skip.outputs.macos == 'true' + runs-on: macos-latest needs: skip timeout-minutes: 60 steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - name: Setup Cache - uses: namespacelabs/nscloud-cache-action@a90bb5d4b27522ce881c6e98eebd7d7e6d1653f9 # v1.4.2 - with: - cache: | - xcode - path: | - /Users/runner/zig # TODO(tahoe): https://github.com/NixOS/nix/issues/13342 - uses: DeterminateSystems/nix-installer-action@main @@ -1130,21 +986,15 @@ jobs: run: nix develop -c swiftlint lint --strict alejandra: - if: github.repository == 'ghostty-org/ghostty' && needs.skip.outputs.skip != 'true' && needs.skip.outputs.nix == 'true' + if: needs.skip.outputs.skip != 'true' && needs.skip.outputs.nix == 'true' needs: skip - runs-on: namespace-profile-ghostty-xsm + runs-on: ubuntu-24.04 timeout-minutes: 60 env: - ZIG_LOCAL_CACHE_DIR: /zig/local-cache - ZIG_GLOBAL_CACHE_DIR: /zig/global-cache + ZIG_LOCAL_CACHE_DIR: ${{ github.workspace }}/.zig-cache/local + ZIG_GLOBAL_CACHE_DIR: ${{ github.workspace }}/.zig-cache/global steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - name: Setup Cache - uses: namespacelabs/nscloud-cache-action@a90bb5d4b27522ce881c6e98eebd7d7e6d1653f9 # v1.4.2 - with: - path: | - /nix - /zig - uses: cachix/install-nix-action@2126ae7fc54c9df00dd18f7f18754393182c73cd # v31.9.1 with: nix_path: nixpkgs=channel:nixos-unstable @@ -1158,21 +1008,15 @@ jobs: run: nix develop -c alejandra --check . typos: - if: github.repository == 'ghostty-org/ghostty' && needs.skip.outputs.skip != 'true' + if: needs.skip.outputs.skip != 'true' needs: skip - runs-on: namespace-profile-ghostty-xsm + runs-on: ubuntu-24.04 timeout-minutes: 60 env: - ZIG_LOCAL_CACHE_DIR: /zig/local-cache - ZIG_GLOBAL_CACHE_DIR: /zig/global-cache + ZIG_LOCAL_CACHE_DIR: ${{ github.workspace }}/.zig-cache/local + ZIG_GLOBAL_CACHE_DIR: ${{ github.workspace }}/.zig-cache/global steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - name: Setup Cache - uses: namespacelabs/nscloud-cache-action@a90bb5d4b27522ce881c6e98eebd7d7e6d1653f9 # v1.4.2 - with: - path: | - /nix - /zig - uses: cachix/install-nix-action@2126ae7fc54c9df00dd18f7f18754393182c73cd # v31.9.1 with: nix_path: nixpkgs=channel:nixos-unstable @@ -1186,21 +1030,15 @@ jobs: run: nix develop -c typos shellcheck: - if: github.repository == 'ghostty-org/ghostty' && needs.skip.outputs.skip != 'true' && needs.skip.outputs.shell == 'true' + if: needs.skip.outputs.skip != 'true' && needs.skip.outputs.shell == 'true' needs: skip - runs-on: namespace-profile-ghostty-xsm + runs-on: ubuntu-24.04 timeout-minutes: 60 env: - ZIG_LOCAL_CACHE_DIR: /zig/local-cache - ZIG_GLOBAL_CACHE_DIR: /zig/global-cache + ZIG_LOCAL_CACHE_DIR: ${{ github.workspace }}/.zig-cache/local + ZIG_GLOBAL_CACHE_DIR: ${{ github.workspace }}/.zig-cache/global steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - name: Setup Cache - uses: namespacelabs/nscloud-cache-action@a90bb5d4b27522ce881c6e98eebd7d7e6d1653f9 # v1.4.2 - with: - path: | - /nix - /zig - uses: cachix/install-nix-action@2126ae7fc54c9df00dd18f7f18754393182c73cd # v31.9.1 with: nix_path: nixpkgs=channel:nixos-unstable @@ -1219,21 +1057,15 @@ jobs: $(find . \( -name "*.sh" -o -name "*.bash" \) -type f ! -path "./zig-out/*" ! -path "./macos/build/*" ! -path "./.git/*" | sort) translations: - if: github.repository == 'ghostty-org/ghostty' && needs.skip.outputs.skip != 'true' + if: needs.skip.outputs.skip != 'true' needs: skip - runs-on: namespace-profile-ghostty-xsm + runs-on: ubuntu-24.04 timeout-minutes: 60 env: - ZIG_LOCAL_CACHE_DIR: /zig/local-cache - ZIG_GLOBAL_CACHE_DIR: /zig/global-cache + ZIG_LOCAL_CACHE_DIR: ${{ github.workspace }}/.zig-cache/local + ZIG_GLOBAL_CACHE_DIR: ${{ github.workspace }}/.zig-cache/global steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - name: Setup Cache - uses: namespacelabs/nscloud-cache-action@a90bb5d4b27522ce881c6e98eebd7d7e6d1653f9 # v1.4.2 - with: - path: | - /nix - /zig - uses: cachix/install-nix-action@2126ae7fc54c9df00dd18f7f18754393182c73cd # v31.9.1 with: nix_path: nixpkgs=channel:nixos-unstable @@ -1247,21 +1079,15 @@ jobs: run: nix develop -c .github/scripts/check-translations.sh blueprint-compiler: - if: github.repository == 'ghostty-org/ghostty' && needs.skip.outputs.skip != 'true' && needs.skip.outputs.blueprints == 'true' + if: needs.skip.outputs.skip != 'true' && needs.skip.outputs.blueprints == 'true' needs: skip - runs-on: namespace-profile-ghostty-xsm + runs-on: ubuntu-24.04 timeout-minutes: 60 env: - ZIG_LOCAL_CACHE_DIR: /zig/local-cache - ZIG_GLOBAL_CACHE_DIR: /zig/global-cache + ZIG_LOCAL_CACHE_DIR: ${{ github.workspace }}/.zig-cache/local + ZIG_GLOBAL_CACHE_DIR: ${{ github.workspace }}/.zig-cache/global steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - name: Setup Cache - uses: namespacelabs/nscloud-cache-action@a90bb5d4b27522ce881c6e98eebd7d7e6d1653f9 # v1.4.2 - with: - path: | - /nix - /zig - uses: cachix/install-nix-action@2126ae7fc54c9df00dd18f7f18754393182c73cd # v31.9.1 with: nix_path: nixpkgs=channel:nixos-unstable @@ -1282,21 +1108,15 @@ jobs: matrix: pkg: ["wuffs"] name: Test pkg/${{ matrix.pkg }} - runs-on: namespace-profile-ghostty-sm + runs-on: ubuntu-24.04 needs: test env: - ZIG_LOCAL_CACHE_DIR: /zig/local-cache - ZIG_GLOBAL_CACHE_DIR: /zig/global-cache + ZIG_LOCAL_CACHE_DIR: ${{ github.workspace }}/.zig-cache/local + ZIG_GLOBAL_CACHE_DIR: ${{ github.workspace }}/.zig-cache/global 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 @@ -1313,16 +1133,12 @@ jobs: test-debian-13: name: Test build on Debian 13 - runs-on: namespace-profile-ghostty-sm + runs-on: ubuntu-24.04 timeout-minutes: 10 needs: [test, build-dist] + permissions: + contents: read steps: - - name: Install and configure Namespace CLI - uses: namespacelabs/nscloud-setup@f378676225212387f1283f4da878712af2c4cd60 # v0.0.11 - - - name: Configure Namespace powered Buildx - uses: namespacelabs/nscloud-setup-buildx-action@f5814dcf37a16cce0624d5bec2ab879654294aa0 # v0.0.22 - - name: Download Source Tarball Artifacts uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0 with: @@ -1333,32 +1149,24 @@ jobs: mkdir dist tar --verbose --extract --strip-components 1 --directory dist --file ghostty-source.tar.gz - - name: Build and push - uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6.19.2 - with: - context: dist - file: dist/src/build/docker/debian/Dockerfile - build-args: | - DISTRO_VERSION=13 + - name: Build Debian 13 container + run: | + docker build \ + --file dist/src/build/docker/debian/Dockerfile \ + --build-arg DISTRO_VERSION=13 \ + dist valgrind: - if: github.repository == 'ghostty-org/ghostty' - runs-on: namespace-profile-ghostty-lg + runs-on: ubuntu-24.04 timeout-minutes: 30 needs: test env: - ZIG_LOCAL_CACHE_DIR: /zig/local-cache - ZIG_GLOBAL_CACHE_DIR: /zig/global-cache + ZIG_LOCAL_CACHE_DIR: ${{ github.workspace }}/.zig-cache/local + ZIG_GLOBAL_CACHE_DIR: ${{ github.workspace }}/.zig-cache/global 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 From a2e69bd758848afdd35b1be3191469b8035edbe0 Mon Sep 17 00:00:00 2001 From: Nico Ritschel Date: Sun, 1 Mar 2026 13:01:36 -0800 Subject: [PATCH 2/7] Guard trigger-snap and trigger-flatpak with upstream repo check These jobs dispatch snap.yml and flatpak.yml which still use namespace runners. Without the guard, every push to the fork spawns unschedulable workflow runs. --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 199ab8a7fc8..88f297c2535 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -495,7 +495,7 @@ jobs: ghostty-source.tar.gz trigger-snap: - if: github.event_name != 'pull_request' + if: github.repository == 'ghostty-org/ghostty' && github.event_name != 'pull_request' runs-on: ubuntu-24.04 needs: [build-dist, build-snap] steps: @@ -513,7 +513,7 @@ jobs: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} trigger-flatpak: - if: github.event_name != 'pull_request' + if: github.repository == 'ghostty-org/ghostty' && github.event_name != 'pull_request' runs-on: ubuntu-24.04 needs: [build-dist, build-flatpak] steps: From 4a7e47ce5c579f362a6c3279c7cc789c799c66d1 Mon Sep 17 00:00:00 2001 From: Nico Ritschel Date: Sun, 1 Mar 2026 13:54:10 -0800 Subject: [PATCH 3/7] Fix prettier formatting and exclude GitDiff from iOS target test.yml had formatting issues caught by prettier check. GitDiff feature files import AppKit (macOS-only) but were being compiled for the Ghostty-iOS target via the file system synchronized group. Add all GitDiff files to the iOS membershipExceptions list, matching the pattern used for other macOS-only features. --- .github/workflows/test.yml | 22 ---------------------- macos/Ghostty.xcodeproj/project.pbxproj | 11 +++++++++++ 2 files changed, 11 insertions(+), 22 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 88f297c2535..9fcc6eb3386 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -146,7 +146,6 @@ jobs: - name: Checkout code uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - # Install Nix and use that to run our tests so our environment matches exactly. - uses: cachix/install-nix-action@2126ae7fc54c9df00dd18f7f18754393182c73cd # v31.9.1 with: @@ -183,7 +182,6 @@ jobs: - name: Checkout code uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - # Install Nix and use that to run our tests so our environment matches exactly. - uses: cachix/install-nix-action@2126ae7fc54c9df00dd18f7f18754393182c73cd # v31.9.1 with: @@ -210,7 +208,6 @@ jobs: - name: Checkout code uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - # Install Nix and use that to run our tests so our environment matches exactly. - uses: cachix/install-nix-action@2126ae7fc54c9df00dd18f7f18754393182c73cd # v31.9.1 with: @@ -238,7 +235,6 @@ jobs: - name: Checkout code uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - # Install Nix and use that to run our tests so our environment matches exactly. - uses: cachix/install-nix-action@2126ae7fc54c9df00dd18f7f18754393182c73cd # v31.9.1 with: @@ -276,7 +272,6 @@ jobs: - name: Checkout code uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - # Install Nix and use that to run our tests so our environment matches exactly. - uses: cachix/install-nix-action@2126ae7fc54c9df00dd18f7f18754393182c73cd # v31.9.1 with: @@ -306,7 +301,6 @@ jobs: - name: Checkout code uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - # TODO(tahoe): https://github.com/NixOS/nix/issues/13342 - uses: DeterminateSystems/nix-installer-action@main with: @@ -340,7 +334,6 @@ jobs: - name: Checkout code uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - # Install Nix and use that to run our tests so our environment matches exactly. - uses: cachix/install-nix-action@2126ae7fc54c9df00dd18f7f18754393182c73cd # v31.9.1 with: @@ -380,7 +373,6 @@ jobs: - name: Checkout code uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - # Install Nix and use that to run our tests so our environment matches exactly. - uses: cachix/install-nix-action@2126ae7fc54c9df00dd18f7f18754393182c73cd # v31.9.1 with: @@ -403,7 +395,6 @@ jobs: - name: Checkout code uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - # Install Nix and use that to run our tests so our environment matches exactly. - uses: cachix/install-nix-action@2126ae7fc54c9df00dd18f7f18754393182c73cd # v31.9.1 with: @@ -430,7 +421,6 @@ jobs: - name: Checkout code uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - # Install Nix and use that to run our tests so our environment matches exactly. - uses: cachix/install-nix-action@2126ae7fc54c9df00dd18f7f18754393182c73cd # v31.9.1 with: @@ -470,7 +460,6 @@ jobs: - name: Checkout code uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - # Install Nix and use that to run our tests so our environment matches exactly. - uses: cachix/install-nix-action@2126ae7fc54c9df00dd18f7f18754393182c73cd # v31.9.1 with: @@ -540,7 +529,6 @@ jobs: - name: Checkout code uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - # TODO(tahoe): https://github.com/NixOS/nix/issues/13342 - uses: DeterminateSystems/nix-installer-action@main with: @@ -593,7 +581,6 @@ jobs: - name: Checkout code uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - # TODO(tahoe): https://github.com/NixOS/nix/issues/13342 - uses: DeterminateSystems/nix-installer-action@main with: @@ -708,7 +695,6 @@ jobs: run: | echo "version=$(sed -n -E 's/^\s*\.?minimum_zig_version\s*=\s*"([^"]+)".*/\1/p' build.zig.zon)" >> $GITHUB_OUTPUT - # Install Nix and use that to run our tests so our environment matches exactly. - uses: cachix/install-nix-action@2126ae7fc54c9df00dd18f7f18754393182c73cd # v31.9.1 with: @@ -744,7 +730,6 @@ jobs: - name: Checkout code uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - # Install Nix and use that to run our tests so our environment matches exactly. - uses: cachix/install-nix-action@2126ae7fc54c9df00dd18f7f18754393182c73cd # v31.9.1 with: @@ -786,7 +771,6 @@ jobs: - name: Checkout code uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - # Install Nix and use that to run our tests so our environment matches exactly. - uses: cachix/install-nix-action@2126ae7fc54c9df00dd18f7f18754393182c73cd # v31.9.1 with: @@ -815,7 +799,6 @@ jobs: - name: Checkout code uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - # Install Nix and use that to run our tests so our environment matches exactly. - uses: cachix/install-nix-action@2126ae7fc54c9df00dd18f7f18754393182c73cd # v31.9.1 with: @@ -839,7 +822,6 @@ jobs: - name: Checkout code uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - # TODO(tahoe): https://github.com/NixOS/nix/issues/13342 - uses: DeterminateSystems/nix-installer-action@main with: @@ -877,7 +859,6 @@ jobs: - name: Checkout code uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - # Install Nix and use that to run our tests so our environment matches exactly. - uses: cachix/install-nix-action@2126ae7fc54c9df00dd18f7f18754393182c73cd # v31.9.1 with: @@ -970,7 +951,6 @@ jobs: steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - # TODO(tahoe): https://github.com/NixOS/nix/issues/13342 - uses: DeterminateSystems/nix-installer-action@main with: @@ -1117,7 +1097,6 @@ jobs: - name: Checkout code uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - # Install Nix and use that to run our tests so our environment matches exactly. - uses: cachix/install-nix-action@2126ae7fc54c9df00dd18f7f18754393182c73cd # v31.9.1 with: @@ -1167,7 +1146,6 @@ jobs: - name: Checkout code uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - # Install Nix and use that to run our tests so our environment matches exactly. - uses: cachix/install-nix-action@2126ae7fc54c9df00dd18f7f18754393182c73cd # v31.9.1 with: diff --git a/macos/Ghostty.xcodeproj/project.pbxproj b/macos/Ghostty.xcodeproj/project.pbxproj index ad953e4d855..7b57b54398e 100644 --- a/macos/Ghostty.xcodeproj/project.pbxproj +++ b/macos/Ghostty.xcodeproj/project.pbxproj @@ -144,6 +144,17 @@ "Features/Custom App Icon/Extensions/Notification+AppIcon.swift", "Features/Custom App Icon/Extensions/UserDefaults+AppIcon.swift", "Features/Global Keybinds/GlobalEventTap.swift", + Features/GitDiff/DiffModels.swift, + Features/GitDiff/DiffParser.swift, + Features/GitDiff/DiffReviewDraft.swift, + Features/GitDiff/DiffReviewDraftStore.swift, + Features/GitDiff/DiffSyntaxHighlighter.swift, + Features/GitDiff/GitDiffBadges.swift, + Features/GitDiff/GitDiffMainView.swift, + Features/GitDiff/GitDiffSidebarState.swift, + Features/GitDiff/GitDiffSidebarView.swift, + Features/GitDiff/GitDiffStore.swift, + Features/GitDiff/GitDiffTerminalViewModel.swift, Features/QuickTerminal/QuickTerminal.xib, Features/QuickTerminal/QuickTerminalController.swift, Features/QuickTerminal/QuickTerminalPosition.swift, From 40e1a206297d12566d1afa812999b7ecf0423d90 Mon Sep 17 00:00:00 2001 From: Nico Ritschel Date: Sun, 1 Mar 2026 14:20:08 -0800 Subject: [PATCH 4/7] Fix swiftlint violations surfaced by CI running with --strict 9 for_where violations: convert for/if to for/where clauses. 2 large_tuple violations: suppress with inline disable comments. These are pre-existing in Ghostree code but now caught because the repo guard preventing CI from running was removed. --- .../Features/GitDiff/GitDiffSidebarView.swift | 1 + .../Features/GitDiff/GitDiffStore.swift | 15 +++++---- .../Terminal/TerminalController.swift | 15 +++++---- .../Features/Update/UpdateController.swift | 6 ++-- .../Features/Worktrunk/GitHub/GHClient.swift | 7 ++--- .../Worktrunk/GitHub/GitHubModels.swift | 1 + .../Features/Worktrunk/WorktrunkClient.swift | 7 ++--- .../Worktrunk/WorktrunkSidebarView.swift | 6 ++-- .../Features/Worktrunk/WorktrunkStore.swift | 31 ++++++++----------- 9 files changed, 39 insertions(+), 50 deletions(-) diff --git a/macos/Sources/Features/GitDiff/GitDiffSidebarView.swift b/macos/Sources/Features/GitDiff/GitDiffSidebarView.swift index c88ddfa83f8..db54fdc4e57 100644 --- a/macos/Sources/Features/GitDiff/GitDiffSidebarView.swift +++ b/macos/Sources/Features/GitDiff/GitDiffSidebarView.swift @@ -210,6 +210,7 @@ struct GitDiffSidebarView: View { } } + // swiftlint:disable:next large_tuple private var diffSummary: (files: Int, additions: Int, deletions: Int, unresolved: Int)? { guard let doc = state.document else { return nil } let adds = doc.files.reduce(0) { $0 + $1.additions } diff --git a/macos/Sources/Features/GitDiff/GitDiffStore.swift b/macos/Sources/Features/GitDiff/GitDiffStore.swift index 0ca2cb1bf67..8f7bfd40a4a 100644 --- a/macos/Sources/Features/GitDiff/GitDiffStore.swift +++ b/macos/Sources/Features/GitDiff/GitDiffStore.swift @@ -295,14 +295,13 @@ final class GitDiffStore { } } - for path in ["/opt/homebrew/bin/git", "/usr/local/bin/git", "/usr/bin/git"] { - if FileManager.default.isExecutableFile(atPath: path) { - return GitInvocation( - executableURL: URL(fileURLWithPath: path), - arguments: args, - environment: env - ) - } + for path in ["/opt/homebrew/bin/git", "/usr/local/bin/git", "/usr/bin/git"] + where FileManager.default.isExecutableFile(atPath: path) { + return GitInvocation( + executableURL: URL(fileURLWithPath: path), + arguments: args, + environment: env + ) } let envURL = URL(fileURLWithPath: "/usr/bin/env") diff --git a/macos/Sources/Features/Terminal/TerminalController.swift b/macos/Sources/Features/Terminal/TerminalController.swift index f3dbcb56d86..84f7495198b 100644 --- a/macos/Sources/Features/Terminal/TerminalController.swift +++ b/macos/Sources/Features/Terminal/TerminalController.swift @@ -1659,14 +1659,13 @@ class TerminalController: BaseTerminalController, TabGroupCloseCoordinator.Contr let appDelegate = NSApp.delegate as? AppDelegate else { return } let store = appDelegate.worktrunkStore - for repo in store.repositories { - if store.worktrees(for: repo.id).contains(where: { $0.path == rootPath }) { - let newSelection = SidebarSelection.worktree(repoID: repo.id, path: rootPath) - guard worktrunkSidebarState.selection != newSelection else { return } - applySyncedWorktrunkSidebarSelection(newSelection) - syncWorktrunkSidebarSelectionToTabGroup(newSelection) - return - } + for repo in store.repositories + where store.worktrees(for: repo.id).contains(where: { $0.path == rootPath }) { + let newSelection = SidebarSelection.worktree(repoID: repo.id, path: rootPath) + guard worktrunkSidebarState.selection != newSelection else { return } + applySyncedWorktrunkSidebarSelection(newSelection) + syncWorktrunkSidebarSelectionToTabGroup(newSelection) + return } } diff --git a/macos/Sources/Features/Update/UpdateController.swift b/macos/Sources/Features/Update/UpdateController.swift index 5ba5569b8ee..552f11dc3b5 100644 --- a/macos/Sources/Features/Update/UpdateController.swift +++ b/macos/Sources/Features/Update/UpdateController.swift @@ -158,10 +158,8 @@ enum InstallChannel { "/opt/homebrew/Caskroom/ghostree", "/usr/local/Caskroom/ghostree", ] - for path in caskroomPaths { - if FileManager.default.fileExists(atPath: path) { - return .homebrew - } + for path in caskroomPaths where FileManager.default.fileExists(atPath: path) { + return .homebrew } return .manual diff --git a/macos/Sources/Features/Worktrunk/GitHub/GHClient.swift b/macos/Sources/Features/Worktrunk/GitHub/GHClient.swift index 26125870df0..cd32ac73c6d 100644 --- a/macos/Sources/Features/Worktrunk/GitHub/GHClient.swift +++ b/macos/Sources/Features/Worktrunk/GitHub/GHClient.swift @@ -239,10 +239,9 @@ struct GHClient { } // Find gh executable - for path in ["/opt/homebrew/bin/gh", "/usr/local/bin/gh", "/usr/bin/gh"] { - if FileManager.default.isExecutableFile(atPath: path) { - return Invocation(executableURL: URL(fileURLWithPath: path), arguments: args, environment: env) - } + for path in ["/opt/homebrew/bin/gh", "/usr/local/bin/gh", "/usr/bin/gh"] + where FileManager.default.isExecutableFile(atPath: path) { + return Invocation(executableURL: URL(fileURLWithPath: path), arguments: args, environment: env) } // Fall back to PATH resolution diff --git a/macos/Sources/Features/Worktrunk/GitHub/GitHubModels.swift b/macos/Sources/Features/Worktrunk/GitHub/GitHubModels.swift index e86bf1a974c..7398dee131c 100644 --- a/macos/Sources/Features/Worktrunk/GitHub/GitHubModels.swift +++ b/macos/Sources/Features/Worktrunk/GitHub/GitHubModels.swift @@ -76,6 +76,7 @@ struct PRStatus: Identifiable, Equatable { return .pending } + // swiftlint:disable:next large_tuple var checkCounts: (passed: Int, failed: Int, pending: Int, skipped: Int) { var passed = 0, failed = 0, pending = 0, skipped = 0 for check in checks { diff --git a/macos/Sources/Features/Worktrunk/WorktrunkClient.swift b/macos/Sources/Features/Worktrunk/WorktrunkClient.swift index f933322f7a7..7a8691e4080 100644 --- a/macos/Sources/Features/Worktrunk/WorktrunkClient.swift +++ b/macos/Sources/Features/Worktrunk/WorktrunkClient.swift @@ -98,10 +98,9 @@ struct WorktrunkClient { return Invocation(executableURL: url, arguments: args, environment: env) } - for path in wtExecutableCandidatePaths() { - if FileManager.default.isExecutableFile(atPath: path) { - return Invocation(executableURL: URL(fileURLWithPath: path), arguments: args, environment: env) - } + for path in wtExecutableCandidatePaths() + where FileManager.default.isExecutableFile(atPath: path) { + return Invocation(executableURL: URL(fileURLWithPath: path), arguments: args, environment: env) } // Last resort: rely on PATH resolution. diff --git a/macos/Sources/Features/Worktrunk/WorktrunkSidebarView.swift b/macos/Sources/Features/Worktrunk/WorktrunkSidebarView.swift index f759686a870..59d7fa59b99 100644 --- a/macos/Sources/Features/Worktrunk/WorktrunkSidebarView.swift +++ b/macos/Sources/Features/Worktrunk/WorktrunkSidebarView.swift @@ -312,10 +312,8 @@ struct WorktrunkSidebarView: View { private func findWorktree(forWorktreeRootPath rootPath: String) -> WorktrunkStore.Worktree? { let root = standardizedPath(rootPath) for repo in store.repositories { - for wt in store.worktrees(for: repo.id) { - if standardizedPath(wt.path) == root { - return wt - } + for wt in store.worktrees(for: repo.id) where standardizedPath(wt.path) == root { + return wt } } return nil diff --git a/macos/Sources/Features/Worktrunk/WorktrunkStore.swift b/macos/Sources/Features/Worktrunk/WorktrunkStore.swift index f37405c678d..6aaa8e57059 100644 --- a/macos/Sources/Features/Worktrunk/WorktrunkStore.swift +++ b/macos/Sources/Features/Worktrunk/WorktrunkStore.swift @@ -650,11 +650,9 @@ final class WorktrunkStore: ObservableObject { if result.hadExistingList, !added.isEmpty { let now = Date() - for path in added { - if firstSeenAtByWorktreePath[path] == nil { - firstSeenAtByWorktreePath[path] = now - didChangeFirstSeen = true - } + for path in added where firstSeenAtByWorktreePath[path] == nil { + firstSeenAtByWorktreePath[path] = now + didChangeFirstSeen = true } } @@ -713,11 +711,9 @@ final class WorktrunkStore: ObservableObject { if hadExistingList, !addedPaths.isEmpty { let now = Date() var didChange = false - for path in addedPaths { - if firstSeenAtByWorktreePath[path] == nil { - firstSeenAtByWorktreePath[path] = now - didChange = true - } + for path in addedPaths where firstSeenAtByWorktreePath[path] == nil { + firstSeenAtByWorktreePath[path] = now + didChange = true } if didChange { saveFirstSeenAt() @@ -1079,14 +1075,13 @@ final class WorktrunkStore: ObservableObject { } } - for path in ["/opt/homebrew/bin/git", "/usr/local/bin/git", "/usr/bin/git"] { - if FileManager.default.isExecutableFile(atPath: path) { - return GitInvocation( - executableURL: URL(fileURLWithPath: path), - arguments: args, - environment: env - ) - } + for path in ["/opt/homebrew/bin/git", "/usr/local/bin/git", "/usr/bin/git"] + where FileManager.default.isExecutableFile(atPath: path) { + return GitInvocation( + executableURL: URL(fileURLWithPath: path), + arguments: args, + environment: env + ) } let envURL = URL(fileURLWithPath: "/usr/bin/env") From 779f516dc67b0e3c74ab860d128d3736abcc3473 Mon Sep 17 00:00:00 2001 From: Nico Ritschel Date: Sun, 1 Mar 2026 15:36:05 -0800 Subject: [PATCH 5/7] Exclude SidebarListScrollPreserver and WorktrunkOpenTabsModel from iOS target Both files import AppKit and were missing from the iOS target's membershipExceptions list, causing the Ghostty-iOS build to fail. --- macos/Ghostty.xcodeproj/project.pbxproj | 2 ++ 1 file changed, 2 insertions(+) diff --git a/macos/Ghostty.xcodeproj/project.pbxproj b/macos/Ghostty.xcodeproj/project.pbxproj index 7b57b54398e..8b0c2de5392 100644 --- a/macos/Ghostty.xcodeproj/project.pbxproj +++ b/macos/Ghostty.xcodeproj/project.pbxproj @@ -215,8 +215,10 @@ Features/Worktrunk/StatusRing/StatusRingTooltipOverlay.swift, Features/Worktrunk/StatusRing/StatusRingTooltipState.swift, Features/Worktrunk/StatusRing/StatusRingView.swift, + Features/Worktrunk/SidebarListScrollPreserver.swift, Features/Worktrunk/WorktrunkClient.swift, Features/Worktrunk/WorktrunkInstaller.swift, + Features/Worktrunk/WorktrunkOpenTabsModel.swift, Features/Worktrunk/WorktrunkPreferences.swift, Features/Worktrunk/WorktrunkSettingsView.swift, Features/Worktrunk/WorktrunkSidebarView.swift, From 29df11e1cd76b810f9a43826977ae576bb617e4c Mon Sep 17 00:00:00 2001 From: Nico Ritschel Date: Sun, 1 Mar 2026 16:46:19 -0800 Subject: [PATCH 6/7] Exclude TerminalAgentHooks from iOS target References AgentHookInstaller and AgentStatusPaths which are defined in Worktrunk files already excluded from iOS. --- macos/Ghostty.xcodeproj/project.pbxproj | 1 + 1 file changed, 1 insertion(+) diff --git a/macos/Ghostty.xcodeproj/project.pbxproj b/macos/Ghostty.xcodeproj/project.pbxproj index 8b0c2de5392..195572e2cf4 100644 --- a/macos/Ghostty.xcodeproj/project.pbxproj +++ b/macos/Ghostty.xcodeproj/project.pbxproj @@ -176,6 +176,7 @@ Features/Splits/SplitView.Divider.swift, Features/Splits/SplitView.swift, Features/Splits/TerminalSplitTreeView.swift, + Features/Terminal/AgentStatus/TerminalAgentHooks.swift, Features/Terminal/BaseTerminalController.swift, Features/Terminal/ErrorView.swift, Features/Terminal/TerminalController.swift, From b73f0236c8c6eb42c6494e8049e76e1fa06b24be Mon Sep 17 00:00:00 2001 From: Nico Ritschel Date: Sun, 1 Mar 2026 17:33:06 -0800 Subject: [PATCH 7/7] Add iOS app icon entry to Ghostty icon set The icon set only had mac idiom entries, causing the iOS build to fail with "did not have any applicable content". Add a universal iOS entry reusing the 1024x1024 icon (512x512@2x). --- macos/Assets.xcassets/Ghostty.appiconset/Contents.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/macos/Assets.xcassets/Ghostty.appiconset/Contents.json b/macos/Assets.xcassets/Ghostty.appiconset/Contents.json index 993f6a8d3c8..2305c1d01fe 100644 --- a/macos/Assets.xcassets/Ghostty.appiconset/Contents.json +++ b/macos/Assets.xcassets/Ghostty.appiconset/Contents.json @@ -59,6 +59,12 @@ "size": "512x512", "scale": "2x", "filename": "icon_512x512@2x.png" + }, + { + "idiom": "universal", + "platform": "ios", + "size": "1024x1024", + "filename": "icon_512x512@2x.png" } ], "info": {