From 3c54557810a29e29801d7ceac585d79d744d82b4 Mon Sep 17 00:00:00 2001 From: Graham Christensen Date: Wed, 12 Jun 2024 21:20:43 -0400 Subject: [PATCH] Shrink the chain, rebuild every time --- .github/workflows/check-and-test.yaml | 1 + flake.nix | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check-and-test.yaml b/.github/workflows/check-and-test.yaml index 861338b..3674523 100644 --- a/.github/workflows/check-and-test.yaml +++ b/.github/workflows/check-and-test.yaml @@ -80,4 +80,5 @@ jobs: nix develop --command echo "just testing" - name: Exhaust our GitHub Actions Cache tokens run: | + date >> README.md nix build .#veryLongChain -v diff --git a/flake.nix b/flake.nix index febbd5c..0eb1d20 100644 --- a/flake.nix +++ b/flake.nix @@ -46,12 +46,14 @@ veryLongChain = let + ctx = ./README.md; + # Function to write the current date to a file startFile = pkgs.stdenv.mkDerivation { name = "start-file"; buildCommand = '' - echo ${magic-nix-cache} > $out + cat ${ctx} > $out ''; }; @@ -70,7 +72,7 @@ in # Starting point of the chain - createChain 1000 startFile; + createChain 200 startFile; }); devShells = forEachSupportedSystem ({ pkgs, cranePkgs, lib }: {