From 1374178f274fed9c37af698395c79514ceea7094 Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Tue, 7 May 2024 08:12:57 +0200 Subject: [PATCH] ci: Improve performance for nix jobs in CI Defaulting to max-jobs = auto should improve build times by using more cores. Setting always-allow-substitutes to true should cause all nix derivations to be cached on cachix, which should improve performance of the MacOS job dramatically, when no rebuilds need to happen. --- .github/actions/setup-nix/action.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/actions/setup-nix/action.yaml b/.github/actions/setup-nix/action.yaml index d5674352f..6116b90c8 100644 --- a/.github/actions/setup-nix/action.yaml +++ b/.github/actions/setup-nix/action.yaml @@ -12,6 +12,10 @@ runs: using: composite steps: - uses: nixbuild/nix-quick-install-action@60e9c39264d4714139af3cdf15f691b19eec3530 # v28 + with: + nix_conf: |- + always-allow-substitutes = true + max-jobs = auto - uses: cachix/cachix-action@18cf96c7c98e048e10a83abd92116114cd8504be # v14 with: name: postgrest