fix(ci): use RAM disk for temp/cache only, not workspace

t.Chdir() panics on ImDisk RAM drives. Keep workspace on normal disk
but redirect TEMP/TMP/GOCACHE/GOMODCACHE to RAM disk for I/O speedup.
This commit is contained in:
Steve Yegge
2025-12-13 07:16:14 -08:00
parent 2bd661b46e
commit 5ec2038e5c
+19 -22
View File
@@ -55,21 +55,15 @@ jobs:
name: Test (Windows - cmd) name: Test (Windows - cmd)
runs-on: windows-latest runs-on: windows-latest
continue-on-error: true # Windows filesystem is slow; don't block PRs continue-on-error: true # Windows filesystem is slow; don't block PRs
env:
# Use RAM disk for all I/O - provides ~1750x faster IOPS than C: drive
TEMP: R:\tmp
TMP: R:\tmp
GOCACHE: R:\go-cache
GOMODCACHE: R:\go-mod
steps: steps:
- uses: actions/checkout@v6 - uses: actions/checkout@v6
- name: Setup RAM Disk and copy workspace # RAM disk for temp/cache only (not workspace - t.Chdir breaks on ImDisk)
- name: Setup RAM Disk
uses: chad-golden/setup-ramdisk@v1.0.1 uses: chad-golden/setup-ramdisk@v1.0.1
with: with:
size-in-mb: 4096 size-in-mb: 4096
drive-letter: 'R' drive-letter: 'R'
copy-workspace: true
- name: Prepare RAM disk directories - name: Prepare RAM disk directories
run: New-Item -ItemType Directory -Force -Path R:\tmp, R:\go-cache, R:\go-mod run: New-Item -ItemType Directory -Force -Path R:\tmp, R:\go-cache, R:\go-mod
@@ -84,31 +78,30 @@ jobs:
git config --global user.name "CI Bot" git config --global user.name "CI Bot"
git config --global user.email "ci@beads.test" git config --global user.email "ci@beads.test"
- name: Build and Test cmd package - name: Build
working-directory: R:\workspace run: go build -v ./cmd/bd
run: |
go build -v ./cmd/bd - name: Test cmd package
go test -v -short -timeout=30m -parallel=4 ./cmd/... env:
TEMP: R:\tmp
TMP: R:\tmp
GOCACHE: R:\go-cache
GOMODCACHE: R:\go-mod
run: go test -v -short -timeout=30m -parallel=4 ./cmd/...
test-windows-internal: test-windows-internal:
name: Test (Windows - internal) name: Test (Windows - internal)
runs-on: windows-latest runs-on: windows-latest
continue-on-error: true # Windows filesystem is slow; don't block PRs continue-on-error: true # Windows filesystem is slow; don't block PRs
env:
# Use RAM disk for all I/O - provides ~1750x faster IOPS than C: drive
TEMP: R:\tmp
TMP: R:\tmp
GOCACHE: R:\go-cache
GOMODCACHE: R:\go-mod
steps: steps:
- uses: actions/checkout@v6 - uses: actions/checkout@v6
- name: Setup RAM Disk and copy workspace # RAM disk for temp/cache only (not workspace - t.Chdir breaks on ImDisk)
- name: Setup RAM Disk
uses: chad-golden/setup-ramdisk@v1.0.1 uses: chad-golden/setup-ramdisk@v1.0.1
with: with:
size-in-mb: 4096 size-in-mb: 4096
drive-letter: 'R' drive-letter: 'R'
copy-workspace: true
- name: Prepare RAM disk directories - name: Prepare RAM disk directories
run: New-Item -ItemType Directory -Force -Path R:\tmp, R:\go-cache, R:\go-mod run: New-Item -ItemType Directory -Force -Path R:\tmp, R:\go-cache, R:\go-mod
@@ -124,7 +117,11 @@ jobs:
git config --global user.email "ci@beads.test" git config --global user.email "ci@beads.test"
- name: Test internal packages - name: Test internal packages
working-directory: R:\workspace env:
TEMP: R:\tmp
TMP: R:\tmp
GOCACHE: R:\go-cache
GOMODCACHE: R:\go-mod
run: go test -v -short -timeout=30m -parallel=4 ./internal/... run: go test -v -short -timeout=30m -parallel=4 ./internal/...
lint: lint: