6060 id : jobs
6161 job :
6262 name : ${{ matrix.name }}
63- needs : [ calculate_matrix ]
63+ needs : [calculate_matrix]
6464 runs-on : " ${{ matrix.os }}"
6565 defaults :
6666 run :
@@ -104,6 +104,19 @@ jobs:
104104 with :
105105 fetch-depth : 2
106106
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+
107120 # Rust Log Analyzer can't currently detect the PR number of a GitHub
108121 # Actions build on its own, so a hint in the log message is needed to
109122 # point it in the right direction.
@@ -187,24 +200,27 @@ jobs:
187200 - name : run the build
188201 # Redirect stderr to stdout to avoid reordering the two streams in the GHA logs.
189202 run : src/ci/scripts/run-build-from-ci.sh 2>&1
203+ working-directory : ${{ env.DEV_DRIVE_WORKSPACE }}
190204 env :
191205 AWS_ACCESS_KEY_ID : ${{ env.CACHES_AWS_ACCESS_KEY_ID }}
192206 AWS_SECRET_ACCESS_KEY : ${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.CACHES_AWS_ACCESS_KEY_ID)] }}
193207
194208 - name : create github artifacts
195209 run : src/ci/scripts/create-doc-artifacts.sh
210+ working-directory : ${{ env.DEV_DRIVE_WORKSPACE }}
196211
197212 - name : upload artifacts to github
198213 uses : actions/upload-artifact@v4
199214 with :
200215 # name is set in previous step
201216 name : ${{ env.DOC_ARTIFACT_NAME }}
202- path : obj/artifacts/doc
217+ path : ${{ env.DEV_DRIVE_WORKSPACE }} obj/artifacts/doc
203218 if-no-files-found : ignore
204219 retention-days : 5
205220
206221 - name : upload artifacts to S3
207222 run : src/ci/scripts/upload-artifacts.sh
223+ working-directory : ${{ env.DEV_DRIVE_WORKSPACE }}
208224 env :
209225 AWS_ACCESS_KEY_ID : ${{ env.ARTIFACTS_AWS_ACCESS_KEY_ID }}
210226 AWS_SECRET_ACCESS_KEY : ${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.ARTIFACTS_AWS_ACCESS_KEY_ID)] }}
@@ -217,6 +233,7 @@ jobs:
217233
218234 - name : upload job metrics to DataDog
219235 if : needs.calculate_matrix.outputs.run_type != 'pr'
236+ working-directory : ${{ env.DEV_DRIVE_WORKSPACE }}
220237 env :
221238 DATADOG_SITE : datadoghq.com
222239 DATADOG_API_KEY : ${{ secrets.DATADOG_API_KEY }}
@@ -230,7 +247,7 @@ jobs:
230247 outcome :
231248 name : bors build finished
232249 runs-on : ubuntu-latest
233- needs : [ calculate_matrix, job ]
250+ needs : [calculate_matrix, job]
234251 # !cancelled() executes the job regardless of whether the previous jobs passed or failed
235252 if : ${{ !cancelled() && contains(fromJSON('["auto", "try"]'), needs.calculate_matrix.outputs.run_type) }}
236253 steps :
0 commit comments