From d8e1aebfcda75f5815ea8f7ff6858cc615db7771 Mon Sep 17 00:00:00 2001 From: "Jeffrey C. Ollie" Date: Fri, 22 Dec 2023 14:28:27 -0600 Subject: [PATCH] enable magic nix cache to improve build times --- .github/workflows/nix.yml | 5 +++++ .github/workflows/release-tip.yml | 6 ++++++ .github/workflows/test.yml | 28 ++++++++++++++++++++++++++++ 3 files changed, 39 insertions(+) diff --git a/.github/workflows/nix.yml b/.github/workflows/nix.yml index 804f16bf0..cbc764baa 100644 --- a/.github/workflows/nix.yml +++ b/.github/workflows/nix.yml @@ -10,6 +10,11 @@ jobs: uses: cachix/install-nix-action@v24 with: 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 run: nix develop -c ./nix/build-support/check-zig-cache-hash.sh # diff --git a/.github/workflows/release-tip.yml b/.github/workflows/release-tip.yml index 590fd8a5a..23bc2431d 100644 --- a/.github/workflows/release-tip.yml +++ b/.github/workflows/release-tip.yml @@ -48,6 +48,12 @@ jobs: with: 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 - name: Setup Sparkle env: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0fef0a803..b981d0a36 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -31,6 +31,12 @@ jobs: with: 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 # because its the only way to access the headers. - name: Test Build @@ -51,6 +57,12 @@ jobs: with: 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 # Mac app to access. - name: Build GhosttyKit @@ -126,6 +138,12 @@ jobs: with: 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 run: nix develop -c zig build -Dapp-runtime=none test @@ -148,6 +166,11 @@ jobs: - uses: cachix/install-nix-action@v24 with: 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 run: nix develop -c prettier --check . @@ -158,5 +181,10 @@ jobs: - uses: cachix/install-nix-action@v24 with: 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 run: nix develop -c alejandra --check .