ci: build examples in CI

pull/8840/head
Mitchell Hashimoto 2025-09-21 19:54:10 -07:00
parent 3e34009492
commit 645520b502
No known key found for this signature in database
GPG Key ID: 523D5DC389D273BC
1 changed files with 37 additions and 0 deletions

View File

@ -12,6 +12,7 @@ jobs:
needs:
- build-bench
- build-dist
- build-examples
- build-flatpak
- build-freebsd
- build-linux
@ -87,6 +88,42 @@ jobs:
- name: Build Benchmarks
run: nix develop -c zig build -Demit-bench
build-examples:
strategy:
fail-fast: false
matrix:
dir: [zig-vt]
name: Example ${{ matrix.dir }}
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@a809471b5c7c913aa67bec8f459a11a0decc3fce # v31.6.2
with:
nix_path: nixpkgs=channel:nixos-unstable
- uses: cachix/cachix-action@0fc020193b5a1fa3ac4575aa3a7d3aa6a35435ad # v16
with:
name: ghostty
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- name: Build Example
run: |
cd example/${{ matrix.dir }}
nix develop -c zig build -Demit-bench
build-flatpak:
strategy:
fail-fast: false