From 8cb26475a646e52c4ee03c816519ef629ba08ba7 Mon Sep 17 00:00:00 2001 From: Hugo Santos Date: Mon, 12 Feb 2024 17:11:49 +0100 Subject: [PATCH] Use Namespace cache volumes to cache /nix. Leads to an overall improvement of 25% in total runtime. --- .github/workflows/test.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1fea26308..724f9b57a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -27,6 +27,10 @@ jobs: uses: actions/checkout@v4 # Install Nix and use that to run our tests so our environment matches exactly. + - name: Setup Nix Cache + uses: namespacelabs/nscloud-cache-action@v1 + with: + path: /nix - uses: cachix/install-nix-action@v24 with: nix_path: nixpkgs=channel:nixos-unstable @@ -49,6 +53,10 @@ jobs: uses: actions/checkout@v4 # Install Nix and use that to run our tests so our environment matches exactly. + - name: Setup Nix Cache + uses: namespacelabs/nscloud-cache-action@v1 + with: + path: /nix - uses: cachix/install-nix-action@v24 with: nix_path: nixpkgs=channel:nixos-unstable @@ -68,6 +76,10 @@ jobs: uses: actions/checkout@v4 # Install Nix and use that to run our tests so our environment matches exactly. + - name: Setup Nix Cache + uses: namespacelabs/nscloud-cache-action@v1 + with: + path: /nix - uses: cachix/install-nix-action@v24 with: nix_path: nixpkgs=channel:nixos-unstable @@ -209,6 +221,10 @@ jobs: uses: actions/checkout@v4 # Install Nix and use that to run our tests so our environment matches exactly. + - name: Setup Nix Cache + uses: namespacelabs/nscloud-cache-action@v1 + with: + path: /nix - uses: cachix/install-nix-action@v24 with: nix_path: nixpkgs=channel:nixos-unstable @@ -234,6 +250,10 @@ jobs: timeout-minutes: 60 steps: - uses: actions/checkout@v4 # Check out repo so we can lint it + - name: Setup Nix Cache + uses: namespacelabs/nscloud-cache-action@v1 + with: + path: /nix - uses: cachix/install-nix-action@v24 with: nix_path: nixpkgs=channel:nixos-unstable @@ -251,6 +271,10 @@ jobs: timeout-minutes: 60 steps: - uses: actions/checkout@v4 # Check out repo so we can lint it + - name: Setup Nix Cache + uses: namespacelabs/nscloud-cache-action@v1 + with: + path: /nix - uses: cachix/install-nix-action@v24 with: nix_path: nixpkgs=channel:nixos-unstable