summaryrefslogtreecommitdiff
path: root/.github/workflows/test.yml
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows/test.yml')
-rw-r--r--.github/workflows/test.yml39
1 files changed, 37 insertions, 2 deletions
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 6c7093bc1..2099e1d42 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -19,6 +19,7 @@ jobs:
- build-nix
- build-macos
- build-macos-matrix
+ - build-snap
- build-windows
- test
- test-gtk
@@ -118,7 +119,41 @@ jobs:
run: |
nix develop -c \
zig build \
- -Dflatpak=true
+ -Dflatpak
+
+ build-snap:
+ strategy:
+ fail-fast: false
+ 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@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
+
+ - name: Setup Cache
+ uses: namespacelabs/nscloud-cache-action@a289cf5d2fcd6874376aa92f0ef7f99dc923592a # v1.2.17
+ with:
+ path: |
+ /nix
+ /zig
+
+ # Install Nix and use that to run our tests so our environment matches exactly.
+ - uses: cachix/install-nix-action@7be5dee1421f63d07e71ce6e0a9f8a4b07c2a487 # v31.6.1
+ with:
+ nix_path: nixpkgs=channel:nixos-unstable
+ - uses: cachix/cachix-action@0fc020193b5a1fa3ac4575aa3a7d3aa6a35435ad # v16
+ with:
+ name: ghostty
+ authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
+
+ - name: Build with Snap
+ run: |
+ nix develop -c \
+ zig build \
+ -Dsnap
build-linux:
strategy:
@@ -275,7 +310,7 @@ jobs:
trigger-snap:
if: github.event_name != 'pull_request'
runs-on: namespace-profile-ghostty-xsm
- needs: build-dist
+ needs: [build-dist, build-snap]
steps:
- name: Checkout code
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0