From b273375e6c2eab100e0f8a959d4932d0a6e50cad Mon Sep 17 00:00:00 2001 From: Daniel Thwaites Date: Wed, 26 Feb 2025 15:49:42 +0000 Subject: [PATCH] ci: add Cachix cache (#919) This will improve CI performance, and may also be used locally, although this is not officially documented at this time. I tested the required amount of space by building a `pkgs.linkFarm` containing all testbeds, then manually pushing this to an empty Cachix cache. The total space used was 274 MiB of the 5 GiB free allowance, so Cachix is good enough to cache at least 20 commits of history, assuming the worst case scenario of every commit changing every derivation we build. Fixes #880 --- .github/workflows/check.yml | 10 ++++++++++ .github/workflows/docs.yml | 7 +++++++ 2 files changed, 17 insertions(+) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 0859f460..dbe3e15b 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -18,6 +18,11 @@ jobs: steps: - uses: DeterminateSystems/nix-installer-action@v16 + - uses: cachix/cachix-action@v15 + with: + name: stylix + authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' + - id: get-derivations run: | set -o pipefail @@ -84,6 +89,11 @@ jobs: 'false' }} + - uses: cachix/cachix-action@v15 + with: + name: stylix + authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' + - run: | nix build --no-update-lock-file --print-build-logs \ github:${{ diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 98e33cc5..42ea6af5 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -25,7 +25,14 @@ jobs: steps: - uses: actions/checkout@v4 + - uses: DeterminateSystems/nix-installer-action@v16 + + - uses: cachix/cachix-action@v15 + with: + name: stylix + authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' + - run: nix build .#docs - uses: actions/upload-pages-artifact@v3