Skip to content

Commit 1d24e26

Browse files
committed
ci: ensure cache directories exist before caching operations
Add proactive directory creation steps to prevent cache path errors in the CI workflow. This includes creating the pnpm store directory and cargo/sccache cache directories before they are used by subsequent caching actions.
1 parent a291fce commit 1d24e26

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,23 @@ jobs:
4848
node -v
4949
pnpm -v
5050
51+
- name: Ensure pnpm store exists (avoid cache path errors)
52+
run: |
53+
STORE=$(pnpm store path --silent || echo "")
54+
if [ -n "$STORE" ]; then
55+
mkdir -p "$STORE"
56+
fi
57+
5158
- name: Install Rust (stable)
5259
uses: dtolnay/rust-toolchain@stable
5360
with:
5461
targets: wasm32-wasip2
5562

63+
- name: Ensure cache directories exist
64+
run: |
65+
mkdir -p "$SCCACHE_DIR" || true
66+
mkdir -p ~/.cargo/registry ~/.cargo/git target || true
67+
5668
- name: Cache sccache
5769
uses: actions/cache@v4
5870
with:

0 commit comments

Comments
 (0)