60
60
id : jobs
61
61
job :
62
62
name : ${{ matrix.name }}
63
- needs : [ calculate_matrix ]
63
+ needs : [calculate_matrix]
64
64
runs-on : " ${{ matrix.os }}"
65
65
defaults :
66
66
run :
@@ -104,6 +104,19 @@ jobs:
104
104
with :
105
105
fetch-depth : 2
106
106
107
+ - if : contains(matrix.os, 'windows')
108
+ uses : samypr100/setup-dev-drive@1d65529cfd809844a9e91e400a560294b6820a68
109
+ with :
110
+ # use as much space as is sensible, upper github limits are 14gb and 300gb
111
+ drive-size : ${{ matrix.os == 'windows-2022' && '12gb' || '100gb' }}
112
+ # pre-allocate the space to avoid out of disk errors and improve long-running performance
113
+ drive-type : Fixed
114
+ # copy the git clone into the dev drive
115
+ workspace-copy : true
116
+
117
+ - if : ${{ !contains(matrix.os, 'windows') }}
118
+ run : echo "DEV_DRIVE_WORKSPACE=${{ github.workspace }}" >> $GITHUB_ENV
119
+
107
120
# Rust Log Analyzer can't currently detect the PR number of a GitHub
108
121
# Actions build on its own, so a hint in the log message is needed to
109
122
# point it in the right direction.
@@ -187,24 +200,27 @@ jobs:
187
200
- name : run the build
188
201
# Redirect stderr to stdout to avoid reordering the two streams in the GHA logs.
189
202
run : src/ci/scripts/run-build-from-ci.sh 2>&1
203
+ working-directory : ${{ env.DEV_DRIVE_WORKSPACE }}
190
204
env :
191
205
AWS_ACCESS_KEY_ID : ${{ env.CACHES_AWS_ACCESS_KEY_ID }}
192
206
AWS_SECRET_ACCESS_KEY : ${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.CACHES_AWS_ACCESS_KEY_ID)] }}
193
207
194
208
- name : create github artifacts
195
209
run : src/ci/scripts/create-doc-artifacts.sh
210
+ working-directory : ${{ env.DEV_DRIVE_WORKSPACE }}
196
211
197
212
- name : upload artifacts to github
198
213
uses : actions/upload-artifact@v4
199
214
with :
200
215
# name is set in previous step
201
216
name : ${{ env.DOC_ARTIFACT_NAME }}
202
- path : obj/artifacts/doc
217
+ path : ${{ env.DEV_DRIVE_WORKSPACE }} obj/artifacts/doc
203
218
if-no-files-found : ignore
204
219
retention-days : 5
205
220
206
221
- name : upload artifacts to S3
207
222
run : src/ci/scripts/upload-artifacts.sh
223
+ working-directory : ${{ env.DEV_DRIVE_WORKSPACE }}
208
224
env :
209
225
AWS_ACCESS_KEY_ID : ${{ env.ARTIFACTS_AWS_ACCESS_KEY_ID }}
210
226
AWS_SECRET_ACCESS_KEY : ${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.ARTIFACTS_AWS_ACCESS_KEY_ID)] }}
@@ -217,6 +233,7 @@ jobs:
217
233
218
234
- name : upload job metrics to DataDog
219
235
if : needs.calculate_matrix.outputs.run_type != 'pr'
236
+ working-directory : ${{ env.DEV_DRIVE_WORKSPACE }}
220
237
env :
221
238
DATADOG_SITE : datadoghq.com
222
239
DATADOG_API_KEY : ${{ secrets.DATADOG_API_KEY }}
@@ -230,7 +247,7 @@ jobs:
230
247
outcome :
231
248
name : bors build finished
232
249
runs-on : ubuntu-latest
233
- needs : [ calculate_matrix, job ]
250
+ needs : [calculate_matrix, job]
234
251
# !cancelled() executes the job regardless of whether the previous jobs passed or failed
235
252
if : ${{ !cancelled() && contains(fromJSON('["auto", "try"]'), needs.calculate_matrix.outputs.run_type) }}
236
253
steps :
0 commit comments