From 629ace010391f2e720f8f3b0133951514f003106 Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Wed, 7 Feb 2024 21:52:38 +0100 Subject: [PATCH] ci: Replace actions cache for macos build job with smart cachix lookup --- .github/workflows/build.yaml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 3816dc6f5..3ba7b6d88 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -67,10 +67,19 @@ jobs: uses: ./.github/actions/setup-nix with: authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' + - name: Install gnu sed + run: brew install gnu-sed - name: Build everything run: | - nix-build + # The --dry-run will give us a list of derivations to download from cachix and + # derivations to build. We only take those that would have to be built and then build + # those explicitly. This has the advantage that pure verification will not include + # a download anymore, making it much faster. If something needs to be built, only + # the dependencies required to do so will be downloaded, but not everything. + nix-build --dry-run 2>&1 \ + | gsed -e '1,/derivations will be built:$/d' -e '/paths will be fetched/Q' \ + | xargs nix-build stack: