Skip to content

Commit 03a9792

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

File tree

2 files changed

+51
-18
lines changed

2 files changed

+51
-18
lines changed

.github/workflows/ci.yml

+45-3
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,24 @@ 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+
name: Delete NTFS checkout, to make sure we aren't using it still
119+
run: rm -rf ${{ github.workspace }}
120+
121+
- if: ${{ !contains(matrix.os, 'windows') }}
122+
name: Make sure DEV_DRIVE_WORKSPACE is populated with the workspace
123+
run: echo "DEV_DRIVE_WORKSPACE=${{ github.workspace }}" >> $GITHUB_ENV
124+
107125
# Rust Log Analyzer can't currently detect the PR number of a GitHub
108126
# Actions build on its own, so a hint in the log message is needed to
109127
# point it in the right direction.
@@ -115,6 +133,7 @@ jobs:
115133

116134
- name: add extra environment variables
117135
run: src/ci/scripts/setup-environment.sh
136+
working-directory: ${{ env.DEV_DRIVE_WORKSPACE }}
118137
env:
119138
# Since it's not possible to merge `${{ matrix.env }}` with the other
120139
# variables in `job.<name>.env`, the variables defined in the matrix
@@ -124,48 +143,63 @@ jobs:
124143

125144
- name: setup upstream remote
126145
run: src/ci/scripts/setup-upstream-remote.sh
146+
working-directory: ${{ env.DEV_DRIVE_WORKSPACE }}
127147

128148
- name: ensure the channel matches the target branch
129149
run: src/ci/scripts/verify-channel.sh
150+
working-directory: ${{ env.DEV_DRIVE_WORKSPACE }}
130151

131152
- name: collect CPU statistics
132153
run: src/ci/scripts/collect-cpu-stats.sh
154+
working-directory: ${{ env.DEV_DRIVE_WORKSPACE }}
133155

134156
- name: show the current environment
135157
run: src/ci/scripts/dump-environment.sh
158+
working-directory: ${{ env.DEV_DRIVE_WORKSPACE }}
136159

137160
- name: install awscli
138161
run: src/ci/scripts/install-awscli.sh
162+
working-directory: ${{ env.DEV_DRIVE_WORKSPACE }}
139163

140164
- name: install sccache
141165
run: src/ci/scripts/install-sccache.sh
166+
working-directory: ${{ env.DEV_DRIVE_WORKSPACE }}
142167

143168
- name: select Xcode
144169
run: src/ci/scripts/select-xcode.sh
170+
working-directory: ${{ env.DEV_DRIVE_WORKSPACE }}
145171

146172
- name: install clang
147173
run: src/ci/scripts/install-clang.sh
174+
working-directory: ${{ env.DEV_DRIVE_WORKSPACE }}
148175

149176
- name: install tidy
150177
run: src/ci/scripts/install-tidy.sh
178+
working-directory: ${{ env.DEV_DRIVE_WORKSPACE }}
151179

152180
- name: install WIX
153181
run: src/ci/scripts/install-wix.sh
182+
working-directory: ${{ env.DEV_DRIVE_WORKSPACE }}
154183

155184
- name: disable git crlf conversion
156185
run: src/ci/scripts/disable-git-crlf-conversion.sh
186+
working-directory: ${{ env.DEV_DRIVE_WORKSPACE }}
157187

158188
- name: checkout submodules
159189
run: src/ci/scripts/checkout-submodules.sh
190+
working-directory: ${{ env.DEV_DRIVE_WORKSPACE }}
160191

161192
- name: install MinGW
162193
run: src/ci/scripts/install-mingw.sh
194+
working-directory: ${{ env.DEV_DRIVE_WORKSPACE }}
163195

164196
- name: install ninja
165197
run: src/ci/scripts/install-ninja.sh
198+
working-directory: ${{ env.DEV_DRIVE_WORKSPACE }}
166199

167200
- name: enable ipv6 on Docker
168201
run: src/ci/scripts/enable-docker-ipv6.sh
202+
working-directory: ${{ env.DEV_DRIVE_WORKSPACE }}
169203

170204
# Disable automatic line ending conversion (again). On Windows, when we're
171205
# installing dependencies, something switches the git configuration directory or
@@ -174,37 +208,44 @@ jobs:
174208
# appropriate line endings.
175209
- name: disable git crlf conversion
176210
run: src/ci/scripts/disable-git-crlf-conversion.sh
211+
working-directory: ${{ env.DEV_DRIVE_WORKSPACE }}
177212

178213
- name: ensure line endings are correct
179214
run: src/ci/scripts/verify-line-endings.sh
215+
working-directory: ${{ env.DEV_DRIVE_WORKSPACE }}
180216

181217
- name: ensure backported commits are in upstream branches
182218
run: src/ci/scripts/verify-backported-commits.sh
219+
working-directory: ${{ env.DEV_DRIVE_WORKSPACE }}
183220

184221
- name: ensure the stable version number is correct
185222
run: src/ci/scripts/verify-stable-version-number.sh
223+
working-directory: ${{ env.DEV_DRIVE_WORKSPACE }}
186224

187225
- name: run the build
188226
# Redirect stderr to stdout to avoid reordering the two streams in the GHA logs.
189227
run: src/ci/scripts/run-build-from-ci.sh 2>&1
228+
working-directory: ${{ env.DEV_DRIVE_WORKSPACE }}
190229
env:
191230
AWS_ACCESS_KEY_ID: ${{ env.CACHES_AWS_ACCESS_KEY_ID }}
192231
AWS_SECRET_ACCESS_KEY: ${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.CACHES_AWS_ACCESS_KEY_ID)] }}
193232

194233
- name: create github artifacts
195234
run: src/ci/scripts/create-doc-artifacts.sh
235+
working-directory: ${{ env.DEV_DRIVE_WORKSPACE }}
196236

197237
- name: upload artifacts to github
198238
uses: actions/upload-artifact@v4
199239
with:
200240
# name is set in previous step
201241
name: ${{ env.DOC_ARTIFACT_NAME }}
202-
path: obj/artifacts/doc
242+
path: ${{ env.DEV_DRIVE_WORKSPACE }}obj/artifacts/doc
203243
if-no-files-found: ignore
204244
retention-days: 5
205245

206246
- name: upload artifacts to S3
207247
run: src/ci/scripts/upload-artifacts.sh
248+
working-directory: ${{ env.DEV_DRIVE_WORKSPACE }}
208249
env:
209250
AWS_ACCESS_KEY_ID: ${{ env.ARTIFACTS_AWS_ACCESS_KEY_ID }}
210251
AWS_SECRET_ACCESS_KEY: ${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.ARTIFACTS_AWS_ACCESS_KEY_ID)] }}
@@ -217,6 +258,7 @@ jobs:
217258

218259
- name: upload job metrics to DataDog
219260
if: needs.calculate_matrix.outputs.run_type != 'pr'
261+
working-directory: ${{ env.DEV_DRIVE_WORKSPACE }}
220262
env:
221263
DATADOG_SITE: datadoghq.com
222264
DATADOG_API_KEY: ${{ secrets.DATADOG_API_KEY }}
@@ -230,7 +272,7 @@ jobs:
230272
outcome:
231273
name: bors build finished
232274
runs-on: ubuntu-latest
233-
needs: [ calculate_matrix, job ]
275+
needs: [calculate_matrix, job]
234276
# !cancelled() executes the job regardless of whether the previous jobs passed or failed
235277
if: ${{ !cancelled() && contains(fromJSON('["auto", "try"]'), needs.calculate_matrix.outputs.run_type) }}
236278
steps:

src/ci/github-actions/jobs.yml

+6-15
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)