Skip to content

Commit b1102a1

Browse files
authored
chore(ci): speed up Windows CI with Dev Drive (#872)
## Summary - Replace "Disable Windows Defender" steps with `samypr100/setup-dev-drive@v4` in `test` and `cli-e2e-test` jobs - Creates a 12GB ReFS Dev Drive with `CARGO_HOME` and `RUSTUP_HOME` mapped onto it, giving ~25% I/O improvement - ReFS Dev Drive is already excluded from Defender scanning, making the explicit disable redundant - Adds `target-dir` to `setup-rust` so Rust compilation output also lands on the Dev Drive 🤖 Generated with [Claude Code](https://claude.com/claude-code)
1 parent d8e268d commit b1102a1

1 file changed

Lines changed: 18 additions & 8 deletions

File tree

.github/workflows/ci.yml

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -70,16 +70,21 @@ jobs:
7070
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
7171
- uses: ./.github/actions/clone
7272

73-
# Disable Windows Defender real-time scanning to speed up I/O-heavy builds (~30-50% faster)
74-
- name: Disable Windows Defender
73+
- name: Setup Dev Drive
7574
if: runner.os == 'Windows'
76-
shell: powershell
77-
run: Set-MpPreference -DisableRealtimeMonitoring $true
75+
uses: samypr100/setup-dev-drive@30f0f98ae5636b2b6501e181dfb3631b9974818d # v4.0.0
76+
with:
77+
drive-size: 12GB
78+
drive-format: ReFS
79+
env-mapping: |
80+
CARGO_HOME,{{ DEV_DRIVE }}/.cargo
81+
RUSTUP_HOME,{{ DEV_DRIVE }}/.rustup
7882
7983
- uses: oxc-project/setup-rust@d286d43bc1f606abbd98096666ff8be68c8d5f57 # v1.0.0
8084
with:
8185
save-cache: ${{ github.ref_name == 'main' }}
8286
cache-key: test
87+
target-dir: ${{ runner.os == 'Windows' && format('{0}/target', env.DEV_DRIVE) || '' }}
8388

8489
- run: rustup target add x86_64-unknown-linux-musl
8590
if: ${{ matrix.os == 'ubuntu-latest' }}
@@ -181,16 +186,21 @@ jobs:
181186
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
182187
- uses: ./.github/actions/clone
183188

184-
# Disable Windows Defender real-time scanning to speed up I/O-heavy builds (~30-50% faster)
185-
- name: Disable Windows Defender
189+
- name: Setup Dev Drive
186190
if: runner.os == 'Windows'
187-
shell: powershell
188-
run: Set-MpPreference -DisableRealtimeMonitoring $true
191+
uses: samypr100/setup-dev-drive@30f0f98ae5636b2b6501e181dfb3631b9974818d # v4.0.0
192+
with:
193+
drive-size: 12GB
194+
drive-format: ReFS
195+
env-mapping: |
196+
CARGO_HOME,{{ DEV_DRIVE }}/.cargo
197+
RUSTUP_HOME,{{ DEV_DRIVE }}/.rustup
189198
190199
- uses: oxc-project/setup-rust@d286d43bc1f606abbd98096666ff8be68c8d5f57 # v1.0.0
191200
with:
192201
save-cache: ${{ github.ref_name == 'main' }}
193202
cache-key: cli-e2e-test
203+
target-dir: ${{ runner.os == 'Windows' && format('{0}/target', env.DEV_DRIVE) || '' }}
194204

195205
- uses: oxc-project/setup-node@fdbf0dfd334c4e6d56ceeb77d91c76339c2a0885 # v1.0.4
196206

0 commit comments

Comments
 (0)