Skip to content

Commit 61cd6a2

Browse files
committed
Test building on Server 2022
1 parent d1a0fa5 commit 61cd6a2

File tree

4 files changed

+145
-101
lines changed

4 files changed

+145
-101
lines changed

.github/workflows/ci.yml

+11-53
Original file line numberDiff line numberDiff line change
@@ -165,20 +165,6 @@ jobs:
165165
- name: create github artifacts
166166
run: src/ci/scripts/create-doc-artifacts.sh
167167
if: success() && !env.SKIP_JOB
168-
- name: upload artifacts to github
169-
uses: actions/upload-artifact@v4
170-
with:
171-
name: "${{ env.DOC_ARTIFACT_NAME }}"
172-
path: obj/artifacts/doc
173-
if-no-files-found: ignore
174-
retention-days: 5
175-
if: success() && !env.SKIP_JOB
176-
- name: upload artifacts to S3
177-
run: src/ci/scripts/upload-artifacts.sh
178-
env:
179-
AWS_ACCESS_KEY_ID: "${{ env.ARTIFACTS_AWS_ACCESS_KEY_ID }}"
180-
AWS_SECRET_ACCESS_KEY: "${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.ARTIFACTS_AWS_ACCESS_KEY_ID)] }}"
181-
if: "success() && !env.SKIP_JOB && (github.event_name == 'push' || env.DEPLOY == '1' || env.DEPLOY_ALT == '1')"
182168
auto:
183169
name: "auto - ${{ matrix.name }}"
184170
env:
@@ -409,72 +395,72 @@ jobs:
409395
env:
410396
RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-msvc --enable-profiler"
411397
SCRIPT: make ci-msvc
412-
os: windows-2019-8core-32gb
398+
os: windows-2022-8core-32gb
413399
- name: i686-msvc
414400
env:
415401
RUST_CONFIGURE_ARGS: "--build=i686-pc-windows-msvc"
416402
SCRIPT: make ci-msvc
417-
os: windows-2019-8core-32gb
403+
os: windows-2022-8core-32gb
418404
- name: x86_64-msvc-ext
419405
env:
420406
SCRIPT: python x.py --stage 2 test src/tools/cargotest src/tools/cargo && src/ci/docker/host-x86_64/x86_64-gnu-tools/checktools.sh x.py /tmp/toolstate/toolstates.json windows
421407
HOST_TARGET: x86_64-pc-windows-msvc
422408
RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-msvc --enable-lld --save-toolstates=/tmp/toolstate/toolstates.json"
423409
DEPLOY_TOOLSTATES_JSON: toolstates-windows.json
424-
os: windows-2019-8core-32gb
410+
os: windows-2022-8core-32gb
425411
- name: i686-mingw
426412
env:
427413
RUST_CONFIGURE_ARGS: "--build=i686-pc-windows-gnu"
428414
SCRIPT: make ci-mingw
429415
NO_DOWNLOAD_CI_LLVM: 1
430416
CUSTOM_MINGW: 1
431-
os: windows-2019-8core-32gb
417+
os: windows-2022-8core-32gb
432418
- name: x86_64-mingw
433419
env:
434420
SCRIPT: make ci-mingw
435421
RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-gnu --enable-profiler"
436422
NO_DOWNLOAD_CI_LLVM: 1
437423
CUSTOM_MINGW: 1
438-
os: windows-2019-8core-32gb
424+
os: windows-2022-8core-32gb
439425
- name: dist-x86_64-msvc
440426
env:
441427
RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-msvc --host=x86_64-pc-windows-msvc --target=x86_64-pc-windows-msvc --enable-full-tools --enable-profiler --set rust.codegen-units=1"
442428
SCRIPT: python x.py build --set rust.debug=true opt-dist && PGO_HOST=x86_64-pc-windows-msvc ./build/x86_64-pc-windows-msvc/stage0-tools-bin/opt-dist windows-ci -- python x.py dist bootstrap --include-default-paths
443429
DIST_REQUIRE_ALL_TOOLS: 1
444-
os: windows-2019-8core-32gb
430+
os: windows-2022-8core-32gb
445431
- name: dist-i686-msvc
446432
env:
447433
RUST_CONFIGURE_ARGS: "--build=i686-pc-windows-msvc --host=i686-pc-windows-msvc --target=i686-pc-windows-msvc,i586-pc-windows-msvc --enable-full-tools --enable-profiler"
448434
SCRIPT: python x.py dist bootstrap --include-default-paths
449435
DIST_REQUIRE_ALL_TOOLS: 1
450-
os: windows-2019-8core-32gb
436+
os: windows-2022-8core-32gb
451437
- name: dist-aarch64-msvc
452438
env:
453439
RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-msvc --host=aarch64-pc-windows-msvc --enable-full-tools --enable-profiler"
454440
SCRIPT: python x.py dist bootstrap --include-default-paths
455441
DIST_REQUIRE_ALL_TOOLS: 1
456-
os: windows-2019-8core-32gb
442+
os: windows-2022-8core-32gb
457443
- name: dist-i686-mingw
458444
env:
459445
RUST_CONFIGURE_ARGS: "--build=i686-pc-windows-gnu --enable-full-tools --enable-profiler"
460446
NO_DOWNLOAD_CI_LLVM: 1
461447
SCRIPT: python x.py dist bootstrap --include-default-paths
462448
CUSTOM_MINGW: 1
463449
DIST_REQUIRE_ALL_TOOLS: 1
464-
os: windows-2019-8core-32gb
450+
os: windows-2022-8core-32gb
465451
- name: dist-x86_64-mingw
466452
env:
467453
SCRIPT: python x.py dist bootstrap --include-default-paths
468454
RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-gnu --enable-full-tools --enable-profiler"
469455
NO_DOWNLOAD_CI_LLVM: 1
470456
CUSTOM_MINGW: 1
471457
DIST_REQUIRE_ALL_TOOLS: 1
472-
os: windows-2019-8core-32gb
458+
os: windows-2022-8core-32gb
473459
- name: dist-x86_64-msvc-alt
474460
env:
475461
RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-msvc --enable-extended --enable-profiler"
476462
SCRIPT: python x.py dist bootstrap --include-default-paths
477-
os: windows-2019-8core-32gb
463+
os: windows-2022-8core-32gb
478464
defaults:
479465
run:
480466
shell: "${{ contains(matrix.os, 'windows') && 'msys2 {0}' || 'bash' }}"
@@ -575,20 +561,6 @@ jobs:
575561
- name: create github artifacts
576562
run: src/ci/scripts/create-doc-artifacts.sh
577563
if: success() && !env.SKIP_JOB
578-
- name: upload artifacts to github
579-
uses: actions/upload-artifact@v4
580-
with:
581-
name: "${{ env.DOC_ARTIFACT_NAME }}"
582-
path: obj/artifacts/doc
583-
if-no-files-found: ignore
584-
retention-days: 5
585-
if: success() && !env.SKIP_JOB
586-
- name: upload artifacts to S3
587-
run: src/ci/scripts/upload-artifacts.sh
588-
env:
589-
AWS_ACCESS_KEY_ID: "${{ env.ARTIFACTS_AWS_ACCESS_KEY_ID }}"
590-
AWS_SECRET_ACCESS_KEY: "${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.ARTIFACTS_AWS_ACCESS_KEY_ID)] }}"
591-
if: "success() && !env.SKIP_JOB && (github.event_name == 'push' || env.DEPLOY == '1' || env.DEPLOY_ALT == '1')"
592564
try:
593565
name: "try - ${{ matrix.name }}"
594566
env:
@@ -714,20 +686,6 @@ jobs:
714686
- name: create github artifacts
715687
run: src/ci/scripts/create-doc-artifacts.sh
716688
if: success() && !env.SKIP_JOB
717-
- name: upload artifacts to github
718-
uses: actions/upload-artifact@v4
719-
with:
720-
name: "${{ env.DOC_ARTIFACT_NAME }}"
721-
path: obj/artifacts/doc
722-
if-no-files-found: ignore
723-
retention-days: 5
724-
if: success() && !env.SKIP_JOB
725-
- name: upload artifacts to S3
726-
run: src/ci/scripts/upload-artifacts.sh
727-
env:
728-
AWS_ACCESS_KEY_ID: "${{ env.ARTIFACTS_AWS_ACCESS_KEY_ID }}"
729-
AWS_SECRET_ACCESS_KEY: "${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.ARTIFACTS_AWS_ACCESS_KEY_ID)] }}"
730-
if: "success() && !env.SKIP_JOB && (github.event_name == 'push' || env.DEPLOY == '1' || env.DEPLOY_ALT == '1')"
731689
master:
732690
name: master
733691
runs-on: ubuntu-latest

src/ci/github-actions/ci.yml

+2-25
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,11 @@ x--expand-yaml-anchors--remove:
9797
<<: *base-job
9898

9999
- &job-windows-8c
100-
os: windows-2019-8core-32gb
100+
os: windows-2022-8core-32gb
101101
<<: *base-job
102102

103103
- &job-windows-16c
104-
os: windows-2019-16core-64gb
104+
os: windows-2022-16core-64gb
105105
<<: *base-job
106106

107107
- &job-aarch64-linux
@@ -261,29 +261,6 @@ x--expand-yaml-anchors--remove:
261261
run: src/ci/scripts/create-doc-artifacts.sh
262262
<<: *step
263263

264-
- name: upload artifacts to github
265-
uses: actions/upload-artifact@v4
266-
with:
267-
# name is set in previous step
268-
name: ${{ env.DOC_ARTIFACT_NAME }}
269-
path: obj/artifacts/doc
270-
if-no-files-found: ignore
271-
retention-days: 5
272-
<<: *step
273-
274-
- name: upload artifacts to S3
275-
run: src/ci/scripts/upload-artifacts.sh
276-
env:
277-
AWS_ACCESS_KEY_ID: ${{ env.ARTIFACTS_AWS_ACCESS_KEY_ID }}
278-
AWS_SECRET_ACCESS_KEY: ${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.ARTIFACTS_AWS_ACCESS_KEY_ID)] }}
279-
# Adding a condition on DEPLOY=1 or DEPLOY_ALT=1 is not needed as all deploy
280-
# builders *should* have the AWS credentials available. Still, explicitly
281-
# adding the condition is helpful as this way CI will not silently skip
282-
# deploying artifacts from a dist builder if the variables are misconfigured,
283-
# erroring about invalid credentials instead.
284-
if: success() && !env.SKIP_JOB && (github.event_name == 'push' || env.DEPLOY == '1' || env.DEPLOY_ALT == '1')
285-
<<: *step
286-
287264
# These snippets are used by the try-success, try-failure, auto-success and auto-failure jobs.
288265
# Check out their documentation for more information on why they're needed.
289266

src/ci/github-actions/jobs.yml

+129-12
Original file line numberDiff line numberDiff line change
@@ -27,24 +27,141 @@ shared_defs:
2727
<<: *base-job
2828

2929
- &job-windows-8c
30-
os: windows-2019-8core-32gb
30+
os: windows-2022
3131
<<: *base-job
3232

3333
- &job-windows-16c
34-
os: windows-2019-16core-64gb
34+
os: windows-2022
3535
<<: *base-job
3636

3737
- &job-aarch64-linux
3838
os: [ self-hosted, ARM64, linux ]
3939

4040
pr:
41-
- name: mingw-check
42-
<<: *job-linux-4c
43-
- name: mingw-check-tidy
44-
<<: *job-linux-4c
45-
- name: x86_64-gnu-llvm-17
46-
env:
47-
ENABLE_GCC_CODEGEN: "1"
48-
<<: *job-linux-16c
49-
- name: x86_64-gnu-tools
50-
<<: *job-linux-16c
41+
- name: x86_64-msvc
42+
env:
43+
RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc --enable-profiler
44+
SCRIPT: make ci-msvc
45+
<<: *job-windows-8c
46+
47+
- name: i686-msvc
48+
env:
49+
RUST_CONFIGURE_ARGS: --build=i686-pc-windows-msvc
50+
SCRIPT: make ci-msvc
51+
<<: *job-windows-8c
52+
53+
- name: x86_64-msvc-ext
54+
env:
55+
SCRIPT: python x.py --stage 2 test src/tools/cargotest src/tools/cargo && src/ci/docker/host-x86_64/x86_64-gnu-tools/checktools.sh x.py /tmp/toolstate/toolstates.json windows
56+
HOST_TARGET: x86_64-pc-windows-msvc
57+
RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc --enable-lld --save-toolstates=/tmp/toolstate/toolstates.json
58+
DEPLOY_TOOLSTATES_JSON: toolstates-windows.json
59+
<<: *job-windows-8c
60+
61+
# 32/64-bit MinGW builds.
62+
#
63+
# We are using MinGW with POSIX threads since LLVM requires
64+
# C++'s std::thread which is disabled in libstdc++ with win32 threads.
65+
# FIXME: Libc++ doesn't have this limitation so we can avoid
66+
# winpthreads if we switch to it.
67+
#
68+
# Instead of relying on the MinGW version installed on CI we download
69+
# and install one ourselves so we won't be surprised by changes to CI's
70+
# build image.
71+
#
72+
# Finally, note that the downloads below are all in the `rust-lang-ci` S3
73+
# bucket, but they clearly didn't originate there! The downloads originally
74+
# came from the mingw-w64 SourceForge download site. Unfortunately
75+
# SourceForge is notoriously flaky, so we mirror it on our own infrastructure.
76+
77+
- name: i686-mingw
78+
env:
79+
RUST_CONFIGURE_ARGS: --build=i686-pc-windows-gnu
80+
SCRIPT: make ci-mingw
81+
# We are intentionally allowing an old toolchain on this builder (and that's
82+
# incompatible with LLVM downloads today).
83+
NO_DOWNLOAD_CI_LLVM: 1
84+
CUSTOM_MINGW: 1
85+
<<: *job-windows-8c
86+
87+
- name: x86_64-mingw
88+
env:
89+
SCRIPT: make ci-mingw
90+
RUST_CONFIGURE_ARGS: >-
91+
--build=x86_64-pc-windows-gnu
92+
--enable-profiler
93+
# We are intentionally allowing an old toolchain on this builder (and that's
94+
# incompatible with LLVM downloads today).
95+
NO_DOWNLOAD_CI_LLVM: 1
96+
CUSTOM_MINGW: 1
97+
<<: *job-windows-8c
98+
99+
- name: dist-x86_64-msvc
100+
env:
101+
RUST_CONFIGURE_ARGS: >-
102+
--build=x86_64-pc-windows-msvc
103+
--host=x86_64-pc-windows-msvc
104+
--target=x86_64-pc-windows-msvc
105+
--enable-full-tools
106+
--enable-profiler
107+
--set rust.codegen-units=1
108+
SCRIPT: python x.py build --set rust.debug=true opt-dist && PGO_HOST=x86_64-pc-windows-msvc ./build/x86_64-pc-windows-msvc/stage0-tools-bin/opt-dist windows-ci -- python x.py dist bootstrap --include-default-paths
109+
DIST_REQUIRE_ALL_TOOLS: 1
110+
<<: *job-windows-8c
111+
112+
- name: dist-i686-msvc
113+
env:
114+
RUST_CONFIGURE_ARGS: >-
115+
--build=i686-pc-windows-msvc
116+
--host=i686-pc-windows-msvc
117+
--target=i686-pc-windows-msvc,i586-pc-windows-msvc
118+
--enable-full-tools
119+
--enable-profiler
120+
SCRIPT: python x.py dist bootstrap --include-default-paths
121+
DIST_REQUIRE_ALL_TOOLS: 1
122+
<<: *job-windows-8c
123+
124+
- name: dist-aarch64-msvc
125+
env:
126+
RUST_CONFIGURE_ARGS: >-
127+
--build=x86_64-pc-windows-msvc
128+
--host=aarch64-pc-windows-msvc
129+
--enable-full-tools
130+
--enable-profiler
131+
SCRIPT: python x.py dist bootstrap --include-default-paths
132+
DIST_REQUIRE_ALL_TOOLS: 1
133+
<<: *job-windows-8c
134+
135+
- name: dist-i686-mingw
136+
env:
137+
RUST_CONFIGURE_ARGS: >-
138+
--build=i686-pc-windows-gnu
139+
--enable-full-tools
140+
--enable-profiler
141+
# We are intentionally allowing an old toolchain on this builder (and that's
142+
# incompatible with LLVM downloads today).
143+
NO_DOWNLOAD_CI_LLVM: 1
144+
SCRIPT: python x.py dist bootstrap --include-default-paths
145+
CUSTOM_MINGW: 1
146+
DIST_REQUIRE_ALL_TOOLS: 1
147+
<<: *job-windows-8c
148+
149+
- name: dist-x86_64-mingw
150+
env:
151+
SCRIPT: python x.py dist bootstrap --include-default-paths
152+
RUST_CONFIGURE_ARGS: >-
153+
--build=x86_64-pc-windows-gnu
154+
--enable-full-tools
155+
--enable-profiler
156+
# We are intentionally allowing an old toolchain on this builder (and that's
157+
# incompatible with LLVM downloads today).
158+
NO_DOWNLOAD_CI_LLVM: 1
159+
CUSTOM_MINGW: 1
160+
DIST_REQUIRE_ALL_TOOLS: 1
161+
<<: *job-windows-8c
162+
163+
- name: dist-x86_64-msvc-alt
164+
env:
165+
RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc --enable-extended --enable-profiler
166+
SCRIPT: python x.py dist bootstrap --include-default-paths
167+
<<: *job-windows-8c

src/ci/scripts/install-clang.sh

+3-11
Original file line numberDiff line numberDiff line change
@@ -43,25 +43,17 @@ elif isWindows && ! isKnownToBeMingwBuild; then
4343
# amongst LLVM and rustc. Note that we only do this on MSVC as I don't think
4444
# clang has an output mode compatible with MinGW that we need. If it does we
4545
# should switch to clang for MinGW as well!
46-
#
47-
# The LLVM installer is an NSIS installer, which we can extract with 7z. We
48-
# don't want to run the installer directly; extracting it is more reliable
49-
# in CI environments.
5046

51-
mkdir -p citools/clang-rust
52-
cd citools
53-
retry curl -f "${MIRRORS_BASE}/LLVM-${LLVM_VERSION}-win64.exe" \
54-
-o "LLVM-${LLVM_VERSION}-win64.exe"
55-
7z x -oclang-rust/ "LLVM-${LLVM_VERSION}-win64.exe"
5647
ciCommandSetEnv RUST_CONFIGURE_ARGS \
57-
"${RUST_CONFIGURE_ARGS} --set llvm.clang-cl=$(pwd)/clang-rust/bin/clang-cl.exe"
48+
"${RUST_CONFIGURE_ARGS} --set llvm.clang-cl=clang-cl.exe"
49+
rm -rf /c/Program\ Files/LLVM/bin/lldb.exe
5850

5951
# Disable downloading CI LLVM on this builder;
6052
# setting up clang-cl just above conflicts with the default if-unchanged option.
6153
ciCommandSetEnv NO_DOWNLOAD_CI_LLVM 1
6254
fi
6355

64-
if isWindows; then
56+
if isWindows && isKnownToBeMingwBuild; then
6557
# GitHub image 20210928.2 added LLVM, but it is broken (and we don't want
6658
# to use it anyways).
6759
rm -rf /c/Program\ Files/LLVM

0 commit comments

Comments
 (0)