Mitchell Hashimoto 2fb0d99f00 ci: add required checks jobs
This is a hack to make it easier for our GitHub branching rules to
require a single check to pass before merging. This lets us describe the
required checks in code rather than via the GH UI.
2025-01-10 12:57:41 -08:00

39 lines
1.1 KiB
YAML

on: [push, pull_request]
name: Nix
jobs:
required:
name: Required Checks
runs-on: namespace-profile-ghostty-sm
needs:
- check-zig-cache-hash
steps:
- name: Noop
run: echo "Required Checks Met"
check-zig-cache-hash:
if: github.repository == 'ghostty-org/ghostty'
runs-on: namespace-profile-ghostty-sm
env:
ZIG_LOCAL_CACHE_DIR: /zig/local-cache
ZIG_GLOBAL_CACHE_DIR: /zig/global-cache
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Cache
uses: namespacelabs/nscloud-cache-action@v1.2.0
with:
path: |
/nix
/zig
- name: Setup Nix
uses: cachix/install-nix-action@v30
with:
nix_path: nixpkgs=channel:nixos-unstable
- uses: cachix/cachix-action@v15
with:
name: ghostty
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
useDaemon: false # sometimes fails on short jobs
- name: Check Zig cache hash
run: nix develop -c ./nix/build-support/check-zig-cache-hash.sh