Skip to content

Commit 0d7c320

Browse files
committed
fix: remove workspace-copy to preserve cargo target cache
workspace-copy: true changes GITHUB_WORKSPACE path, which invalidates the oxc-project/setup-rust target directory cache and forces a full Rust rebuild (6min → 18min regression). Fix: keep workspace on C: drive, only put CARGO_HOME and RUSTUP_HOME on the Dev Drive (matching rolldown's approach). Also re-add Defender disable since Dev Drive without workspace-copy doesn't bypass Defender for workspace files.
1 parent bbf5146 commit 0d7c320

File tree

4 files changed

+17
-6
lines changed

4 files changed

+17
-6
lines changed

.github/workflows/ci.yml

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

73-
# Use Dev Drive with ReFS on Windows for faster I/O (bypasses Defender scanning automatically)
73+
# Disable Windows Defender real-time scanning to speed up I/O-heavy builds (~30-50% faster)
74+
- name: Disable Windows Defender
75+
if: runner.os == 'Windows'
76+
shell: powershell
77+
run: Set-MpPreference -DisableRealtimeMonitoring $true
78+
79+
# Use Dev Drive with ReFS for CARGO_HOME/RUSTUP_HOME on Windows
80+
# Only cargo/rustup dirs go on the Dev Drive (no workspace-copy) to preserve target dir cache
7481
- name: Setup Dev Drive
7582
uses: samypr100/setup-dev-drive@30f0f98ae5636b2b6501e181dfb3631b9974818d # v4.0.0
7683
if: runner.os == 'Windows'
7784
with:
78-
workspace-copy: true
79-
drive-size: 12GB
85+
drive-size: 8GB
8086
drive-format: ReFS
8187
env-mapping: |
8288
CARGO_HOME,{{ DEV_DRIVE }}/.cargo
@@ -198,13 +204,18 @@ jobs:
198204
- name: Configure Git for access to vite-task
199205
run: git config --global url."https://x-access-token:${{ secrets.VITE_TASK_TOKEN }}@github.com/".insteadOf "ssh://git@github.com/"
200206

201-
# Use Dev Drive with ReFS on Windows for faster I/O (bypasses Defender scanning automatically)
207+
# Disable Windows Defender real-time scanning to speed up I/O-heavy builds (~30-50% faster)
208+
- name: Disable Windows Defender
209+
if: runner.os == 'Windows'
210+
shell: powershell
211+
run: Set-MpPreference -DisableRealtimeMonitoring $true
212+
213+
# Use Dev Drive with ReFS for CARGO_HOME/RUSTUP_HOME on Windows
202214
- name: Setup Dev Drive
203215
uses: samypr100/setup-dev-drive@30f0f98ae5636b2b6501e181dfb3631b9974818d # v4.0.0
204216
if: runner.os == 'Windows'
205217
with:
206-
workspace-copy: true
207-
drive-size: 12GB
218+
drive-size: 8GB
208219
drive-format: ReFS
209220
env-mapping: |
210221
CARGO_HOME,{{ DEV_DRIVE }}/.cargo

packages/global/bin/vp

4.31 MB
Binary file not shown.
22.5 MB
Binary file not shown.
6.38 MB
Binary file not shown.

0 commit comments

Comments
 (0)