Skip to content

ci: exclude Go caches from Defender on Windows test job - #87

Merged
bigboateng merged 1 commit into
mainfrom
ci-windows-defender
Jul 23, 2026
Merged

ci: exclude Go caches from Defender on Windows test job#87
bigboateng merged 1 commit into
mainfrom
ci-windows-defender

Conversation

@bigboateng

Copy link
Copy Markdown
Contributor

Why

The Windows leg of the test matrix runs ~10m while Linux/macOS finish in a
couple of minutes. setup-go already caches; the dominant remaining cost is
Microsoft Defender real-time scanning of the many small object/link files the Go
toolchain writes during compile/test.

What

Adds a Windows-only step (before setup-go) that excludes GOCACHE
(%LOCALAPPDATA%\go-build), GOPATH/GOMODCACHE (%USERPROFILE%\go), the
workspace, and RUNNER_TEMP from Defender, plus -ExclusionProcess go.exe.
Wrapped in try/catch so it degrades gracefully if the runner denies it.

This mirrors the shared .github/actions/go-setup action just landed upstream
in operatorstack/intelligence-flow#147, where the equivalent monorepo Windows
job dropped from ~9m25s to ~2m. Only the ci.yml test job changes; no runtime
or sync-contract behavior is affected.

The Windows test matrix spends ~10m almost entirely in Microsoft Defender
real-time scanning of the small files the Go toolchain emits. Add a
Windows-only step that excludes GOCACHE/GOMODCACHE/workspace and go.exe
before setup-go, mirroring the upstream monorepo's shared go-setup action.
@bigboateng
bigboateng merged commit c1c14bf into main Jul 23, 2026
4 checks passed
@bigboateng
bigboateng deleted the ci-windows-defender branch July 23, 2026 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant