enable magic nix cache to improve build times

This commit is contained in:
Jeffrey C. Ollie
2023-12-22 14:28:27 -06:00
parent a995b6dbb0
commit d8e1aebfcd
3 changed files with 39 additions and 0 deletions

View File

@ -10,6 +10,11 @@ jobs:
uses: cachix/install-nix-action@v24 uses: cachix/install-nix-action@v24
with: with:
nix_path: nixpkgs=channel:nixos-unstable nix_path: nixpkgs=channel:nixos-unstable
# Use cache to minimize build times.
- name: Setup Nix cache
uses: DeterminateSystems/magic-nix-cache-action@main
with:
diagnostic-endpoint: "" # disable telemetry
- name: Check Zig cache hash - name: Check Zig cache hash
run: nix develop -c ./nix/build-support/check-zig-cache-hash.sh run: nix develop -c ./nix/build-support/check-zig-cache-hash.sh
# #

View File

@ -48,6 +48,12 @@ jobs:
with: with:
nix_path: nixpkgs=channel:nixos-unstable nix_path: nixpkgs=channel:nixos-unstable
# Use cache to minimize build times.
- name: Setup Nix cache
uses: DeterminateSystems/magic-nix-cache-action@main
with:
diagnostic-endpoint: "" # disable telemetry
# Setup Sparkle # Setup Sparkle
- name: Setup Sparkle - name: Setup Sparkle
env: env:

View File

@ -31,6 +31,12 @@ jobs:
with: with:
nix_path: nixpkgs=channel:nixos-unstable nix_path: nixpkgs=channel:nixos-unstable
# Use cache to minimize build times.
- name: Setup Nix cache
uses: DeterminateSystems/magic-nix-cache-action@main
with:
diagnostic-endpoint: "" # disable telemetry
# Cross-compile the binary. We always use static building for this # Cross-compile the binary. We always use static building for this
# because its the only way to access the headers. # because its the only way to access the headers.
- name: Test Build - name: Test Build
@ -51,6 +57,12 @@ jobs:
with: with:
nix_path: nixpkgs=channel:nixos-unstable nix_path: nixpkgs=channel:nixos-unstable
# Use cache to minimize build times.
- name: Setup Nix cache
uses: DeterminateSystems/magic-nix-cache-action@main
with:
diagnostic-endpoint: "" # disable telemetry
# GhosttyKit is the framework that is built from Zig for our native # GhosttyKit is the framework that is built from Zig for our native
# Mac app to access. # Mac app to access.
- name: Build GhosttyKit - name: Build GhosttyKit
@ -126,6 +138,12 @@ jobs:
with: with:
nix_path: nixpkgs=channel:nixos-unstable nix_path: nixpkgs=channel:nixos-unstable
# Use cache to minimize build times.
- name: Setup Nix cache
uses: DeterminateSystems/magic-nix-cache-action@main
with:
diagnostic-endpoint: "" # disable telemetry
- name: test - name: test
run: nix develop -c zig build -Dapp-runtime=none test run: nix develop -c zig build -Dapp-runtime=none test
@ -148,6 +166,11 @@ jobs:
- uses: cachix/install-nix-action@v24 - uses: cachix/install-nix-action@v24
with: with:
nix_path: nixpkgs=channel:nixos-unstable nix_path: nixpkgs=channel:nixos-unstable
# Use cache to minimize build times.
- name: Setup Nix cache
uses: DeterminateSystems/magic-nix-cache-action@main
with:
diagnostic-endpoint: "" # disable telemetry
- name: prettier check - name: prettier check
run: nix develop -c prettier --check . run: nix develop -c prettier --check .
@ -158,5 +181,10 @@ jobs:
- uses: cachix/install-nix-action@v24 - uses: cachix/install-nix-action@v24
with: with:
nix_path: nixpkgs=channel:nixos-unstable nix_path: nixpkgs=channel:nixos-unstable
# Use cache to minimize build times.
- name: Setup Nix cache
uses: DeterminateSystems/magic-nix-cache-action@main
with:
diagnostic-endpoint: "" # disable telemetry
- name: alejandra check - name: alejandra check
run: nix develop -c alejandra --check . run: nix develop -c alejandra --check .