mirror of
https://github.com/garrytan/gstack.git
synced 2026-05-18 02:22:04 +08:00
fix: symlink node_modules instead of hardlink (cross-device)
Docker image layers and workspace are on different filesystems, so cp -al (hardlink) fails. Use ln -s (symlink) instead — zero copy overhead. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
4
.github/workflows/evals.yml
vendored
4
.github/workflows/evals.yml
vendored
@@ -95,12 +95,12 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
# Restore pre-installed node_modules from Docker image (~1s vs ~15s install)
|
# Restore pre-installed node_modules from Docker image via symlink (~0s vs ~15s install)
|
||||||
# If package.json changed since image was built, fall back to fresh install
|
# If package.json changed since image was built, fall back to fresh install
|
||||||
- name: Restore deps
|
- name: Restore deps
|
||||||
run: |
|
run: |
|
||||||
if [ -d /opt/node_modules_cache ] && diff -q /opt/node_modules_cache/.package.json package.json >/dev/null 2>&1; then
|
if [ -d /opt/node_modules_cache ] && diff -q /opt/node_modules_cache/.package.json package.json >/dev/null 2>&1; then
|
||||||
cp -al /opt/node_modules_cache node_modules
|
ln -s /opt/node_modules_cache node_modules
|
||||||
else
|
else
|
||||||
bun install
|
bun install
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user