Skip to content

Commit b8da8af

Browse files
committed
WIP: Test Windows CI in a dev drive
1 parent d9c4b8d commit b8da8af

File tree

2 files changed

+26
-18
lines changed

2 files changed

+26
-18
lines changed

.github/workflows/ci.yml

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
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:

src/ci/github-actions/jobs.yml

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# dynamically in CI from ci.yml.
33
runners:
44
- &base-job
5-
env: { }
5+
env: {}
66

77
- &job-linux-4c
88
os: ubuntu-20.04-4core-16gb
@@ -51,8 +51,7 @@ envs:
5151
NO_DEBUG_ASSERTIONS: 1
5252
NO_OVERFLOW_CHECKS: 1
5353

54-
production:
55-
&production
54+
production: &production
5655
DEPLOY_BUCKET: rust-lang-ci2
5756
# AWS_SECRET_ACCESS_KEYs are stored in GitHub's secrets storage, named
5857
# AWS_SECRET_ACCESS_KEY_<keyid>. Including the key id in the name allows to
@@ -84,19 +83,11 @@ envs:
8483
# These jobs automatically inherit envs.pr, to avoid repeating
8584
# it in each job definition.
8685
pr:
87-
- image: mingw-check
88-
<<: *job-linux-4c
89-
- image: mingw-check-tidy
90-
continue_on_error: true
91-
<<: *job-linux-4c
92-
- image: x86_64-gnu-llvm-18
86+
- image: x86_64-msvc
9387
env:
94-
ENABLE_GCC_CODEGEN: "1"
95-
# We are adding (temporarily) a dummy commit on the compiler
96-
READ_ONLY_SRC: "0"
97-
<<: *job-linux-16c
98-
- image: x86_64-gnu-tools
99-
<<: *job-linux-16c
88+
RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc --enable-profiler
89+
SCRIPT: make ci-msvc
90+
<<: *job-windows-8c
10091

10192
# Jobs that run when you perform a try build (@bors try)
10293
# These jobs automatically inherit envs.try, to avoid repeating

0 commit comments

Comments
 (0)