From a02dfac7ef874bd7f71d1343078df74138313631 Mon Sep 17 00:00:00 2001 From: Typas Liao Date: Thu, 30 Apr 2026 13:26:30 +0800 Subject: [PATCH] =?UTF-8?q?revert(ci):=20remove=20nix=20cache=20for=20mac?= =?UTF-8?q?=20=E2=80=94=20no=20acceleration=20observed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit cache-nix-action did not speed up mac CI runs in practice. Reverts: - "ci(mac): fix nix cache config (#24)" (25abdbf) - "ci(mac): cache nix store between runs" (8513617) Restores sourcing nix-daemon.sh before init.sh and removes the GITHUB_PATH additions that were only needed for the cache post-step. Co-Authored-By: Claude --- .github/actions/mac-nix-setup/action.yml | 2 -- .github/workflows/bootstrap.yml | 12 ++++-------- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/.github/actions/mac-nix-setup/action.yml b/.github/actions/mac-nix-setup/action.yml index 8067194..65dae39 100644 --- a/.github/actions/mac-nix-setup/action.yml +++ b/.github/actions/mac-nix-setup/action.yml @@ -29,5 +29,3 @@ runs: for f in /etc/bashrc /etc/zshrc; do test -e "$f" && sudo mv "$f" "$f.before-nix-darwin" done - echo "/nix/var/nix/profiles/default/bin" >> "$GITHUB_PATH" - echo "$HOME/.nix-profile/bin" >> "$GITHUB_PATH" diff --git a/.github/workflows/bootstrap.yml b/.github/workflows/bootstrap.yml index 442ea57..a8dac33 100644 --- a/.github/workflows/bootstrap.yml +++ b/.github/workflows/bootstrap.yml @@ -57,12 +57,8 @@ jobs: - uses: ./.github/actions/mac-nix-setup with: github-token: ${{ secrets.GITHUB_TOKEN }} - - uses: nix-community/cache-nix-action@v7 - with: - primary-key: nix-${{ runner.os }}-${{ hashFiles('flake.lock', 'init.sh') }} - restore-prefixes-first-match: nix-${{ runner.os }}- - paths-macos: | - ~/.cache/nix - gc-max-store-size-macos: 5368709120 - name: bash init.sh - run: bash init.sh + run: | + # shellcheck disable=SC1091 + . /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh + bash init.sh