@@ -60,24 +60,59 @@ jobs:
60
60
run : pipx run ruff check .
61
61
62
62
cargo-clippy :
63
- strategy :
64
- matrix :
65
- include :
66
- - os : " ubuntu"
67
- runner : " ubuntu-latest"
68
- - os : " windows"
69
- runner : " windows-latest-large"
70
- fail-fast : false
71
- runs-on : ["${{ matrix.runner }}"]
72
- name : " cargo clippy | ${{ matrix.os }}"
63
+ runs-on : ubuntu-latest
64
+ name : " cargo clippy | ubuntu"
65
+ steps :
66
+ - uses : actions/checkout@v4
67
+ - name : " Install Rust toolchain"
68
+ run : rustup component add clippy
69
+ - uses : Swatinem/rust-cache@v2
70
+ with :
71
+ save-if : ${{ github.ref == 'refs/heads/main' }}
72
+ - name : " Clippy"
73
+ run : cargo clippy --workspace --all-targets --all-features --locked -- -D warnings
74
+
75
+ cargo-clippy-windows :
76
+ runs-on : windows-latest-large
77
+ name : " cargo clippy | windows"
73
78
steps :
79
+ - name : Create Dev Drive using ReFS
80
+ run : |
81
+ $Volume = New-VHD -Path C:/uv_dev_drive.vhdx -SizeBytes 10GB |
82
+ Mount-VHD -Passthru |
83
+ Initialize-Disk -Passthru |
84
+ New-Partition -AssignDriveLetter -UseMaximumSize |
85
+ Format-Volume -FileSystem ReFS -Confirm:$false -Force
86
+ Write-Output $Volume
87
+ Write-Output "DEV_DRIVE=$($Volume.DriveLetter):" >> $env:GITHUB_ENV
88
+
74
89
- uses : actions/checkout@v4
90
+
91
+ # actions/checkout does not let us clone into anywhere outside ${{ github.workspace }}, so we have to copy the clone...
92
+ - name : Copy Git Repo to Dev Drive
93
+ run : |
94
+ Copy-Item -Path "${{ github.workspace }}" -Destination "${{ env.DEV_DRIVE }}/uv" -Recurse
95
+
75
96
- name : " Install Rust toolchain"
97
+ working-directory : ${{ env.DEV_DRIVE }}/uv
98
+ env :
99
+ CARGO_HOME : ${{ env.DEV_DRIVE }}/.cargo
100
+ RUSTUP_HOME : ${{ env.DEV_DRIVE }}/.rustup
76
101
run : rustup component add clippy
102
+
77
103
- uses : Swatinem/rust-cache@v2
78
104
with :
105
+ workspaces : ${{ env.DEV_DRIVE }}/uv
79
106
save-if : ${{ github.ref == 'refs/heads/main' }}
107
+ env :
108
+ CARGO_HOME : ${{ env.DEV_DRIVE }}/.cargo
109
+ RUSTUP_HOME : ${{ env.DEV_DRIVE }}/.rustup
110
+
80
111
- name : " Clippy"
112
+ working-directory : ${{ env.DEV_DRIVE }}/uv
113
+ env :
114
+ CARGO_HOME : ${{ env.DEV_DRIVE }}/.cargo
115
+ RUSTUP_HOME : ${{ env.DEV_DRIVE }}/.rustup
81
116
run : cargo clippy --workspace --all-targets --all-features --locked -- -D warnings
82
117
83
118
cargo-shear :
@@ -145,8 +180,28 @@ jobs:
145
180
labels : ${{ matrix.runner }}
146
181
name : " cargo test | ${{ matrix.os }}"
147
182
steps :
183
+ - name : Create Dev Drive using ReFS
184
+ run : |
185
+ $Volume = New-VHD -Path C:/uv_dev_drive.vhdx -SizeBytes 10GB |
186
+ Mount-VHD -Passthru |
187
+ Initialize-Disk -Passthru |
188
+ New-Partition -AssignDriveLetter -UseMaximumSize |
189
+ Format-Volume -FileSystem ReFS -Confirm:$false -Force
190
+ Write-Output $Volume
191
+ Write-Output "DEV_DRIVE=$($Volume.DriveLetter):" >> $env:GITHUB_ENV
192
+
148
193
- uses : actions/checkout@v4
194
+
195
+ # actions/checkout does not let us clone into anywhere outside ${{ github.workspace }}, so we have to copy the clone...
196
+ - name : Copy Git Repo to Dev Drive
197
+ run : |
198
+ Copy-Item -Path "${{ github.workspace }}" -Destination "${{ env.DEV_DRIVE }}/uv" -Recurse
199
+
149
200
- name : " Install Rust toolchain"
201
+ working-directory : ${{ env.DEV_DRIVE }}/uv
202
+ env :
203
+ CARGO_HOME : ${{ env.DEV_DRIVE }}/.cargo
204
+ RUSTUP_HOME : ${{ env.DEV_DRIVE }}/.rustup
150
205
run : rustup show
151
206
152
207
# We do not test with Python patch versions on Windows
@@ -162,18 +217,33 @@ jobs:
162
217
3.12
163
218
164
219
- uses : Swatinem/rust-cache@v2
220
+ with :
221
+ workspaces : ${{ env.DEV_DRIVE }}/uv
222
+ env :
223
+ CARGO_HOME : ${{ env.DEV_DRIVE }}/.cargo
224
+ RUSTUP_HOME : ${{ env.DEV_DRIVE }}/.rustup
165
225
166
226
- name : " Install cargo nextest"
167
227
uses : taiki-e/install-action@v2
168
228
with :
169
229
tool : cargo-nextest
230
+ env :
231
+ CARGO_HOME : ${{ env.DEV_DRIVE }}/.cargo
232
+ RUSTUP_HOME : ${{ env.DEV_DRIVE }}/.rustup
170
233
171
234
- name : " Cargo test"
235
+ working-directory : ${{ env.DEV_DRIVE }}/uv
236
+ env :
237
+ CARGO_HOME : ${{ env.DEV_DRIVE }}/.cargo
238
+ RUSTUP_HOME : ${{ env.DEV_DRIVE }}/.rustup
172
239
run : |
173
240
cargo nextest run --no-default-features --features python,pypi,git --workspace --status-level skip --failure-output immediate-final --no-fail-fast -j 12 --final-status-level slow
174
241
175
242
- name : " Smoke test"
243
+ working-directory : ${{ env.DEV_DRIVE }}/uv
176
244
env :
245
+ CARGO_HOME : ${{ env.DEV_DRIVE }}/.cargo
246
+ RUSTUP_HOME : ${{ env.DEV_DRIVE }}/.rustup
177
247
# Avoid debug build stack overflows.
178
248
UV_STACK_SIZE : 2000000 # 2 megabyte, double the default on windows
179
249
run : |
@@ -186,21 +256,53 @@ jobs:
186
256
runs-on : windows-latest
187
257
name : " check windows trampoline"
188
258
steps :
259
+ - name : Create Dev Drive using ReFS
260
+ run : |
261
+ $Volume = New-VHD -Path C:/uv_dev_drive.vhdx -SizeBytes 10GB |
262
+ Mount-VHD -Passthru |
263
+ Initialize-Disk -Passthru |
264
+ New-Partition -AssignDriveLetter -UseMaximumSize |
265
+ Format-Volume -FileSystem ReFS -Confirm:$false -Force
266
+ Write-Output $Volume
267
+ Write-Output "DEV_DRIVE=$($Volume.DriveLetter):" >> $env:GITHUB_ENV
268
+
189
269
- uses : actions/checkout@v4
270
+
271
+ # actions/checkout does not let us clone into anywhere outside ${{ github.workspace }}, so we have to copy the clone...
272
+ - name : Copy Git Repo to Dev Drive
273
+ run : |
274
+ Copy-Item -Path "${{ github.workspace }}" -Destination "${{ env.DEV_DRIVE }}/uv" -Recurse
275
+
190
276
- name : " Install Rust toolchain"
191
- working-directory : crates/uv-trampoline
277
+ working-directory : ${{ env.DEV_DRIVE }}/uv/crates/uv-trampoline
278
+ env :
279
+ CARGO_HOME : ${{ env.DEV_DRIVE }}/.cargo
280
+ RUSTUP_HOME : ${{ env.DEV_DRIVE }}/.rustup
192
281
run : |
193
282
rustup target add x86_64-pc-windows-msvc
194
283
rustup component add clippy rust-src --toolchain nightly-2024-03-19-x86_64-pc-windows-msvc
284
+
195
285
- uses : rui314/setup-mold@v1
286
+
196
287
- uses : Swatinem/rust-cache@v2
197
288
with :
198
- workspaces : " crates/uv-trampoline"
289
+ workspaces : ${{ env.DEV_DRIVE }}/uv/crates/uv-trampoline
290
+ env :
291
+ CARGO_HOME : ${{ env.DEV_DRIVE }}/.cargo
292
+ RUSTUP_HOME : ${{ env.DEV_DRIVE }}/.rustup
293
+
199
294
- name : " Clippy"
200
- working-directory : crates/uv-trampoline
295
+ working-directory : ${{ env.DEV_DRIVE }}/uv/crates/uv-trampoline
296
+ env :
297
+ CARGO_HOME : ${{ env.DEV_DRIVE }}/.cargo
298
+ RUSTUP_HOME : ${{ env.DEV_DRIVE }}/.rustup
201
299
run : cargo clippy --all-features --locked --target x86_64-pc-windows-msvc -- -D warnings
300
+
202
301
- name : " Build"
203
- working-directory : crates/uv-trampoline
302
+ working-directory : ${{ env.DEV_DRIVE }}/uv/crates/uv-trampoline
303
+ env :
304
+ CARGO_HOME : ${{ env.DEV_DRIVE }}/.cargo
305
+ RUSTUP_HOME : ${{ env.DEV_DRIVE }}/.rustup
204
306
run : cargo build --release --target x86_64-pc-windows-msvc
205
307
206
308
build-binary-linux :
@@ -273,19 +375,44 @@ jobs:
273
375
labels : windows-latest-large
274
376
name : " build binary | windows"
275
377
steps :
378
+ - name : Create Dev Drive using ReFS
379
+ run : |
380
+ $Volume = New-VHD -Path C:/uv_dev_drive.vhdx -SizeBytes 10GB |
381
+ Mount-VHD -Passthru |
382
+ Initialize-Disk -Passthru |
383
+ New-Partition -AssignDriveLetter -UseMaximumSize |
384
+ Format-Volume -FileSystem ReFS -Confirm:$false -Force
385
+ Write-Output $Volume
386
+ Write-Output "DEV_DRIVE=$($Volume.DriveLetter):" >> $env:GITHUB_ENV
387
+
276
388
- uses : actions/checkout@v4
277
389
390
+ # actions/checkout does not let us clone into anywhere outside ${{ github.workspace }}, so we have to copy the clone...
391
+ - name : Copy Git Repo to Dev Drive
392
+ run : |
393
+ Copy-Item -Path "${{ github.workspace }}" -Destination "${{ env.DEV_DRIVE }}/uv" -Recurse
394
+
278
395
- uses : rui314/setup-mold@v1
279
396
280
397
- uses : Swatinem/rust-cache@v2
398
+ with :
399
+ workspaces : ${{ env.DEV_DRIVE }}/uv
400
+ env :
401
+ CARGO_HOME : ${{ env.DEV_DRIVE }}/.cargo
402
+ RUSTUP_HOME : ${{ env.DEV_DRIVE }}/.rustup
403
+
281
404
- name : " Build"
405
+ working-directory : ${{ env.DEV_DRIVE }}/uv
406
+ env :
407
+ CARGO_HOME : ${{ env.DEV_DRIVE }}/.cargo
408
+ RUSTUP_HOME : ${{ env.DEV_DRIVE }}/.rustup
282
409
run : cargo build
283
410
284
411
- name : " Upload binary"
285
412
uses : actions/upload-artifact@v4
286
413
with :
287
414
name : uv-windows-${{ github.sha }}
288
- path : . /target/debug/uv.exe
415
+ path : ${{ env.DEV_DRIVE }}/uv /target/debug/uv.exe
289
416
retention-days : 1
290
417
291
418
ecosystem-test :
0 commit comments