mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-08-27 17:41:40 +00:00
nix: add GitHub Actions workflow
This adds a nix workflow that does the following: * Checks to see if the Zig cache fixed derivation needs its hash updated. It does this by downloading a new cache, calculating the hash, and comparing it against what has already been set. If the hash is different, the workflow fails. * Runs a Nix build if the hash is OK, testing the build of packages.ghostty (using "nix build .") The cache workflow we use in the build job comes from: https://github.com/DeterminateSystems/magic-nix-cache-action/ Fixes #937.
This commit is contained in:
30
.github/workflows/nix.yml
vendored
Normal file
30
.github/workflows/nix.yml
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
on: [push, pull_request]
|
||||
name: Nix
|
||||
jobs:
|
||||
check-zig-cache-hash:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
- name: Setup Nix
|
||||
uses: cachix/install-nix-action@v23
|
||||
with:
|
||||
nix_path: nixpkgs=channel:nixos-unstable
|
||||
- name: Check Zig cache hash
|
||||
run: nix develop -c ./nix/build-support/check-zig-cache-hash.sh
|
||||
build:
|
||||
needs: check-zig-cache-hash
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
- name: Setup Nix
|
||||
uses: cachix/install-nix-action@v23
|
||||
with:
|
||||
nix_path: nixpkgs=channel:nixos-unstable
|
||||
- name: Setup Nix cache
|
||||
uses: DeterminateSystems/magic-nix-cache-action@main
|
||||
with:
|
||||
diagnostic-endpoint: "" # disable telemetry
|
||||
- name: Run build
|
||||
run: nix build .
|
||||
Reference in New Issue
Block a user