Skip to content

Commit 62b87c1

Browse files
committed
WIP: Test Windows CI in a dev drive
1 parent acfdb8d commit 62b87c1

File tree

2 files changed

+53
-18
lines changed

2 files changed

+53
-18
lines changed

.github/workflows/ci.yml

+47-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:
@@ -116,6 +116,26 @@ jobs:
116116
# minutes (and potentially removes important packages).
117117
large-packages: false
118118

119+
- if: contains(matrix.os, 'windows')
120+
uses: samypr100/setup-dev-drive@1d65529cfd809844a9e91e400a560294b6820a68
121+
with:
122+
# use as much space as is sensible, upper github limits are 14gb and 300gb
123+
drive-size: ${{ matrix.os == 'windows-2022' && '12gb' || '100gb' }}
124+
# pre-allocate the space to avoid out of disk errors and improve long-running performance
125+
drive-type: Fixed
126+
# copy the git clone into the dev drive
127+
workspace-copy: true
128+
# ReFS may have issues with sym links
129+
drive-format: NTFS
130+
131+
- if: contains(matrix.os, 'windows')
132+
name: Delete non-dev drive checkout, to make sure we aren't using it still
133+
run: rm -rf ${{ github.workspace }}
134+
135+
- if: ${{ !contains(matrix.os, 'windows') }}
136+
name: Make sure DEV_DRIVE_WORKSPACE is populated with the workspace
137+
run: echo "DEV_DRIVE_WORKSPACE=${{ github.workspace }}" >> $GITHUB_ENV
138+
119139
# Rust Log Analyzer can't currently detect the PR number of a GitHub
120140
# Actions build on its own, so a hint in the log message is needed to
121141
# point it in the right direction.
@@ -127,6 +147,7 @@ jobs:
127147

128148
- name: add extra environment variables
129149
run: src/ci/scripts/setup-environment.sh
150+
working-directory: ${{ env.DEV_DRIVE_WORKSPACE }}
130151
env:
131152
# Since it's not possible to merge `${{ matrix.env }}` with the other
132153
# variables in `job.<name>.env`, the variables defined in the matrix
@@ -136,48 +157,63 @@ jobs:
136157

137158
- name: setup upstream remote
138159
run: src/ci/scripts/setup-upstream-remote.sh
160+
working-directory: ${{ env.DEV_DRIVE_WORKSPACE }}
139161

140162
- name: ensure the channel matches the target branch
141163
run: src/ci/scripts/verify-channel.sh
164+
working-directory: ${{ env.DEV_DRIVE_WORKSPACE }}
142165

143166
- name: collect CPU statistics
144167
run: src/ci/scripts/collect-cpu-stats.sh
168+
working-directory: ${{ env.DEV_DRIVE_WORKSPACE }}
145169

146170
- name: show the current environment
147171
run: src/ci/scripts/dump-environment.sh
172+
working-directory: ${{ env.DEV_DRIVE_WORKSPACE }}
148173

149174
- name: install awscli
150175
run: src/ci/scripts/install-awscli.sh
176+
working-directory: ${{ env.DEV_DRIVE_WORKSPACE }}
151177

152178
- name: install sccache
153179
run: src/ci/scripts/install-sccache.sh
180+
working-directory: ${{ env.DEV_DRIVE_WORKSPACE }}
154181

155182
- name: select Xcode
156183
run: src/ci/scripts/select-xcode.sh
184+
working-directory: ${{ env.DEV_DRIVE_WORKSPACE }}
157185

158186
- name: install clang
159187
run: src/ci/scripts/install-clang.sh
188+
working-directory: ${{ env.DEV_DRIVE_WORKSPACE }}
160189

161190
- name: install tidy
162191
run: src/ci/scripts/install-tidy.sh
192+
working-directory: ${{ env.DEV_DRIVE_WORKSPACE }}
163193

164194
- name: install WIX
165195
run: src/ci/scripts/install-wix.sh
196+
working-directory: ${{ env.DEV_DRIVE_WORKSPACE }}
166197

167198
- name: disable git crlf conversion
168199
run: src/ci/scripts/disable-git-crlf-conversion.sh
200+
working-directory: ${{ env.DEV_DRIVE_WORKSPACE }}
169201

170202
- name: checkout submodules
171203
run: src/ci/scripts/checkout-submodules.sh
204+
working-directory: ${{ env.DEV_DRIVE_WORKSPACE }}
172205

173206
- name: install MinGW
174207
run: src/ci/scripts/install-mingw.sh
208+
working-directory: ${{ env.DEV_DRIVE_WORKSPACE }}
175209

176210
- name: install ninja
177211
run: src/ci/scripts/install-ninja.sh
212+
working-directory: ${{ env.DEV_DRIVE_WORKSPACE }}
178213

179214
- name: enable ipv6 on Docker
180215
run: src/ci/scripts/enable-docker-ipv6.sh
216+
working-directory: ${{ env.DEV_DRIVE_WORKSPACE }}
181217

182218
# Disable automatic line ending conversion (again). On Windows, when we're
183219
# installing dependencies, something switches the git configuration directory or
@@ -186,25 +222,31 @@ jobs:
186222
# appropriate line endings.
187223
- name: disable git crlf conversion
188224
run: src/ci/scripts/disable-git-crlf-conversion.sh
225+
working-directory: ${{ env.DEV_DRIVE_WORKSPACE }}
189226

190227
- name: ensure line endings are correct
191228
run: src/ci/scripts/verify-line-endings.sh
229+
working-directory: ${{ env.DEV_DRIVE_WORKSPACE }}
192230

193231
- name: ensure backported commits are in upstream branches
194232
run: src/ci/scripts/verify-backported-commits.sh
233+
working-directory: ${{ env.DEV_DRIVE_WORKSPACE }}
195234

196235
- name: ensure the stable version number is correct
197236
run: src/ci/scripts/verify-stable-version-number.sh
237+
working-directory: ${{ env.DEV_DRIVE_WORKSPACE }}
198238

199239
- name: run the build
200240
# Redirect stderr to stdout to avoid reordering the two streams in the GHA logs.
201241
run: src/ci/scripts/run-build-from-ci.sh 2>&1
242+
working-directory: ${{ env.DEV_DRIVE_WORKSPACE }}
202243
env:
203244
AWS_ACCESS_KEY_ID: ${{ env.CACHES_AWS_ACCESS_KEY_ID }}
204245
AWS_SECRET_ACCESS_KEY: ${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.CACHES_AWS_ACCESS_KEY_ID)] }}
205246

206247
- name: create github artifacts
207248
run: src/ci/scripts/create-doc-artifacts.sh
249+
working-directory: ${{ env.DEV_DRIVE_WORKSPACE }}
208250

209251
- name: print disk usage
210252
run: |
@@ -216,12 +258,13 @@ jobs:
216258
with:
217259
# name is set in previous step
218260
name: ${{ env.DOC_ARTIFACT_NAME }}
219-
path: obj/artifacts/doc
261+
path: ${{ env.DEV_DRIVE_WORKSPACE }}obj/artifacts/doc
220262
if-no-files-found: ignore
221263
retention-days: 5
222264

223265
- name: upload artifacts to S3
224266
run: src/ci/scripts/upload-artifacts.sh
267+
working-directory: ${{ env.DEV_DRIVE_WORKSPACE }}
225268
env:
226269
AWS_ACCESS_KEY_ID: ${{ env.ARTIFACTS_AWS_ACCESS_KEY_ID }}
227270
AWS_SECRET_ACCESS_KEY: ${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.ARTIFACTS_AWS_ACCESS_KEY_ID)] }}
@@ -234,6 +277,7 @@ jobs:
234277

235278
- name: upload job metrics to DataDog
236279
if: needs.calculate_matrix.outputs.run_type != 'pr'
280+
working-directory: ${{ env.DEV_DRIVE_WORKSPACE }}
237281
env:
238282
DATADOG_SITE: datadoghq.com
239283
DATADOG_API_KEY: ${{ secrets.DATADOG_API_KEY }}
@@ -247,7 +291,7 @@ jobs:
247291
outcome:
248292
name: bors build finished
249293
runs-on: ubuntu-latest
250-
needs: [ calculate_matrix, job ]
294+
needs: [calculate_matrix, job]
251295
# !cancelled() executes the job regardless of whether the previous jobs passed or failed
252296
if: ${{ !cancelled() && contains(fromJSON('["auto", "try"]'), needs.calculate_matrix.outputs.run_type) }}
253297
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
@@ -56,8 +56,7 @@ envs:
5656
NO_DEBUG_ASSERTIONS: 1
5757
NO_OVERFLOW_CHECKS: 1
5858

59-
production:
60-
&production
59+
production: &production
6160
DEPLOY_BUCKET: rust-lang-ci2
6261
# AWS_SECRET_ACCESS_KEYs are stored in GitHub's secrets storage, named
6362
# AWS_SECRET_ACCESS_KEY_<keyid>. Including the key id in the name allows to
@@ -89,19 +88,11 @@ envs:
8988
# These jobs automatically inherit envs.pr, to avoid repeating
9089
# it in each job definition.
9190
pr:
92-
- image: mingw-check
93-
<<: *job-linux-4c
94-
- image: mingw-check-tidy
95-
continue_on_error: true
96-
<<: *job-linux-4c
97-
- image: x86_64-gnu-llvm-18
91+
- image: x86_64-msvc
9892
env:
99-
ENABLE_GCC_CODEGEN: "1"
100-
# We are adding (temporarily) a dummy commit on the compiler
101-
READ_ONLY_SRC: "0"
102-
<<: *job-linux-16c
103-
- image: x86_64-gnu-tools
104-
<<: *job-linux-16c
93+
RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc --enable-profiler
94+
SCRIPT: make ci-msvc
95+
<<: *job-windows-8c
10596

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

0 commit comments

Comments
 (0)