From aee9136f1e883cb183534f048d4b591b046fa137 Mon Sep 17 00:00:00 2001 From: Per Stark Date: Tue, 23 Jun 2026 08:01:04 +0200 Subject: [PATCH] ci: cache-nix-action preffered magic cache doesnt work due to size --- .github/workflows/ci.yml | 10 ++++++---- .github/workflows/release.yml | 16 ++++++++++------ 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e7e7934..6286793 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,9 +4,9 @@ permissions: actions: write on: - pull_request: push: branches: [main] + workflow_dispatch: jobs: check: @@ -19,10 +19,12 @@ jobs: submodules: recursive - uses: DeterminateSystems/determinate-nix-action@v3 - with: - determinate: false - - uses: DeterminateSystems/magic-nix-cache-action@main + - uses: nix-community/cache-nix-action@v7 + with: + primary-key: nix-${{ runner.os }}-${{ hashFiles('**/*.nix', '**/flake.lock', 'Cargo.lock') }} + restore-prefixes-first-match: nix-${{ runner.os }}- + gc-max-store-size-linux: 10G - name: Check formatting, clippy lint, unit tests & ort version run: nix flake check --show-trace diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 23d6add..ebbef07 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -27,10 +27,12 @@ jobs: - name: Install Nix uses: DeterminateSystems/determinate-nix-action@v3 - with: - determinate: false - - uses: DeterminateSystems/magic-nix-cache-action@main + - uses: nix-community/cache-nix-action@v7 + with: + primary-key: nix-${{ runner.os }}-${{ hashFiles('**/*.nix', '**/flake.lock', 'Cargo.lock') }} + restore-prefixes-first-match: nix-${{ runner.os }}- + gc-max-store-size-linux: 10G - name: Read ORT version from flake id: ort_version @@ -207,10 +209,12 @@ jobs: - name: Install Nix uses: DeterminateSystems/determinate-nix-action@v3 - with: - determinate: false - - uses: DeterminateSystems/magic-nix-cache-action@main + - uses: nix-community/cache-nix-action@v7 + with: + primary-key: nix-${{ runner.os }}-${{ hashFiles('**/*.nix', '**/flake.lock', 'Cargo.lock') }} + restore-prefixes-first-match: nix-${{ runner.os }}- + gc-max-store-size-linux: 10G - name: Build Docker image with Nix run: nix build .#dockerImage -L --show-trace