Skip to content

ci: exclude mise install dir from Windows Defender#188

Merged
zeitlinger merged 3 commits intomainfrom
ci/win-defender-exclude
Apr 21, 2026
Merged

ci: exclude mise install dir from Windows Defender#188
zeitlinger merged 3 commits intomainfrom
ci/win-defender-exclude

Conversation

@zeitlinger
Copy link
Copy Markdown
Member

Summary

Experiment: add a Win-only step before Setup mise that excludes $env:LOCALAPPDATA\mise from Defender real-time scanning.

Why

PR #176 CI timings:

OS Setup mise Test Total
Linux 10s 39s 1m06s
macOS 37s 57s 2m02s
Windows 86s 71s 3m22s

Win mise-action log (job):

14:15:03  Cache hit (568 MB tzst)
14:15:07  tar -xf … cache.tzst
14:16:27  Cache restored successfully   ← 80s
14:16:27  mise install → "all tools are installed" (0s)

All 80s is tar extract of many-small-files (node_modules, pipx, dotnet SDK). Defender real-time scanning on each CreateFile is the usual suspect on Win hosted runners.

Keeping compression (GH cache limit 10 GB) — not switching archiver. Exclusion is cheapest lever to try.

Test plan

  • CI runs on this PR (Win, Mac, Linux)
  • Compare new Win Setup mise timing against 86s baseline
  • If impact significant (>20s savings), consider filing upstream at jdx/mise-action; otherwise revert

Win `Setup mise` step takes ~86s despite cache hit. Log shows 80s of
that is `tar -xf` extracting the 568 MB cache — Defender real-time
scan on many-small-files (node_modules, pipx, dotnet) dominates.

Adding an exclusion before mise-action runs lets us measure how much
of the gap to Linux (~10s) / Mac (~37s) is Defender vs intrinsic
NTFS/tar overhead. Revert if impact is negligible.
Signed-off-by: Gregor Zeitlinger <[email protected]>
@zeitlinger zeitlinger marked this pull request as ready for review April 17, 2026 09:51
@zeitlinger zeitlinger requested a review from a team as a code owner April 17, 2026 09:51
Copilot AI review requested due to automatic review settings April 17, 2026 09:51
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a Windows-only CI optimization to reduce mise cache restore time by excluding the mise install directory from Windows Defender real-time scanning before jdx/mise-action runs.

Changes:

  • Add a Windows-only PowerShell step that runs Add-MpPreference -ExclusionPath "$env:LOCALAPPDATA\mise" prior to Setup mise.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/test.yml
Comment thread .github/workflows/test.yml Outdated
@zeitlinger zeitlinger merged commit 9e05080 into main Apr 21, 2026
13 checks passed
@zeitlinger zeitlinger deleted the ci/win-defender-exclude branch April 21, 2026 06:12
@github-actions github-actions Bot mentioned this pull request Apr 21, 2026
zeitlinger pushed a commit that referenced this pull request Apr 21, 2026
### Added

- *(registry)* switch shfmt to aqua backend
([#175](#175))

### Fixed

- treat cargo-clippy as a partial fixer
([#197](#197))
- *(registry)* add --tests to cargo-clippy, add test coverage
([#176](#176))

### Other

- *(deps)* update taiki-e/install-action digest to 055f5df
([#180](#180))
- *(deps)* update dependency npm:@biomejs/biome to v2.4.12
([#191](#191))
- *(deps)* update rust crate clap to v4.6.1
([#196](#196))
- *(deps)* update rust crate tokio to v1.52.1
([#192](#192))
- *(deps)* update dependency pipx:ruff to v0.15.11
([#198](#198))
- *(deps)* update node.js to v24.15.0
([#194](#194))
- *(deps)* update dependency npm:prettier to v3.8.3
([#193](#193))
- exclude mise install dir from Windows Defender
([#188](#188))
- *(deps)* update dependency npm:renovate to v43.129.0
([#200](#200))
- restructure README/docs and split registry module
([#187](#187))
- *(deps)* update dependency mise to v2026.4.15
([#199](#199))

> [!IMPORTANT]
> Close and reopen this PR to trigger CI checks.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.

3 participants