ci(windows): checkout and run tests entirely on RAM disk

Move everything to RAM disk for maximum I/O speedup:
- Setup RAM disk BEFORE checkout
- Checkout source code directly to R:\work
- Set TEMP/TMP/GOCACHE/GOMODCACHE at job level
- Run build and tests from RAM disk working directory

This ensures ALL file operations happen on RAM, not just temp files.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Steve Yegge
2025-12-13 06:40:50 -08:00
parent ad93f1ec64
commit 24ff319f76

View File

@@ -55,17 +55,26 @@ jobs:
name: Test (Windows - cmd)
runs-on: windows-latest
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:
- uses: actions/checkout@v6
# RAM disk provides ~1750x faster IOPS than Windows C: drive
# This dramatically speeds up SQLite tests and temp file operations
- name: Setup RAM Disk
uses: chad-golden/setup-ramdisk@v1.0.1
with:
size-in-mb: 4096
drive-letter: 'R'
- name: Prepare RAM disk directories
run: New-Item -ItemType Directory -Force -Path R:\tmp, R:\go-cache, R:\go-mod, R:\work
- uses: actions/checkout@v6
with:
path: R:\work
- name: Set up Go
uses: actions/setup-go@v5
with:
@@ -76,35 +85,36 @@ jobs:
git config --global user.name "CI Bot"
git config --global user.email "ci@beads.test"
- name: Build
run: go build -v ./cmd/bd
- name: Test cmd package
env:
TMPDIR: R:\tmp
TEMP: R:\tmp
TMP: R:\tmp
GOCACHE: R:\go-cache
GOMODCACHE: R:\go-mod
- name: Build and Test cmd package
working-directory: R:\work
run: |
New-Item -ItemType Directory -Force -Path R:\tmp, R:\go-cache, R:\go-mod
go build -v ./cmd/bd
go test -v -short -timeout=30m -parallel=4 ./cmd/...
test-windows-internal:
name: Test (Windows - internal)
runs-on: windows-latest
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:
- uses: actions/checkout@v6
# RAM disk provides ~1750x faster IOPS than Windows C: drive
# This dramatically speeds up SQLite tests and temp file operations
- name: Setup RAM Disk
uses: chad-golden/setup-ramdisk@v1.0.1
with:
size-in-mb: 4096
drive-letter: 'R'
- name: Prepare RAM disk directories
run: New-Item -ItemType Directory -Force -Path R:\tmp, R:\go-cache, R:\go-mod, R:\work
- uses: actions/checkout@v6
with:
path: R:\work
- name: Set up Go
uses: actions/setup-go@v5
with:
@@ -116,15 +126,8 @@ jobs:
git config --global user.email "ci@beads.test"
- name: Test internal packages
env:
TMPDIR: R:\tmp
TEMP: R:\tmp
TMP: R:\tmp
GOCACHE: R:\go-cache
GOMODCACHE: R:\go-mod
run: |
New-Item -ItemType Directory -Force -Path R:\tmp, R:\go-cache, R:\go-mod
go test -v -short -timeout=30m -parallel=4 ./internal/...
working-directory: R:\work
run: go test -v -short -timeout=30m -parallel=4 ./internal/...
lint:
name: Lint