Skip to content

Commit 9d6f1a2

Browse files
committed
ci: stop caching node_modules on a sticky disk
Drop the root node_modules sticky disk and the pnpm version resolution that only existed to build its cache key. A warm disk saved roughly twenty seconds of pnpm install, while mounting cost five to forty-five seconds per job (and occasionally failed outright), every job committed a snapshot even when nothing ran pnpm, and the per-GB-billed disk grew to tens of gigabytes despite node_modules holding about 500 MB of files. Installing from the registry on each run is cheaper and simpler. The Nix store sticky disk stays; that one caches multi-gigabyte build closures that are genuinely expensive to recreate.
1 parent 877804c commit 9d6f1a2

1 file changed

Lines changed: 1 addition & 14 deletions

File tree

  • .github/actions/setup-linux-blacksmith-sticky-disk

‎.github/actions/setup-linux-blacksmith-sticky-disk/action.yaml‎

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: Setup Linux Blacksmith sticky disk
2-
description: Mount Blacksmith sticky disks for Linux Nix and root node_modules caches
2+
description: Mount the Blacksmith sticky disk for the Linux Nix store
33
runs:
44
using: composite
55
steps:
@@ -13,12 +13,6 @@ runs:
1313
echo "enabled=false" >> "$GITHUB_OUTPUT"
1414
fi
1515
16-
- name: Resolve pnpm version
17-
id: pnpm
18-
if: steps.blacksmith.outputs.enabled == 'true'
19-
shell: bash
20-
run: echo "version=$(jq -r '.packageManager | ltrimstr("pnpm@")' package.json)" >> "$GITHUB_OUTPUT"
21-
2216
- name: Prepare Nix store mount point
2317
if: steps.blacksmith.outputs.enabled == 'true'
2418
shell: bash
@@ -44,10 +38,3 @@ runs:
4438
sudo chown -R "$USER:$(id -gn)" "$path"
4539
fi
4640
done
47-
48-
- name: Mount root node_modules sticky disk
49-
if: steps.blacksmith.outputs.enabled == 'true'
50-
uses: useblacksmith/stickydisk@2b7a836cbb2b48f4780ae76a7b6fd79d545fb54a # v1.3.0
51-
with:
52-
key: ${{ github.repository }}-node-modules-pnpm-${{ steps.pnpm.outputs.version }}-${{ runner.os }}-${{ runner.arch }}
53-
path: ./node_modules

0 commit comments

Comments
 (0)