Skip to content

Commit c852da7

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

File tree

4 files changed

+143
-41
lines changed

4 files changed

+143
-41
lines changed

.github/workflows/ci.yml

+11-11
Original file line numberDiff line numberDiff line change
@@ -409,72 +409,72 @@ jobs:
409409
env:
410410
RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-msvc --enable-profiler"
411411
SCRIPT: make ci-msvc
412-
os: windows-2019-8core-32gb
412+
os: windows-2022-8core-32gb
413413
- name: i686-msvc
414414
env:
415415
RUST_CONFIGURE_ARGS: "--build=i686-pc-windows-msvc"
416416
SCRIPT: make ci-msvc
417-
os: windows-2019-8core-32gb
417+
os: windows-2022-8core-32gb
418418
- name: x86_64-msvc-ext
419419
env:
420420
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
421421
HOST_TARGET: x86_64-pc-windows-msvc
422422
RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-msvc --enable-lld --save-toolstates=/tmp/toolstate/toolstates.json"
423423
DEPLOY_TOOLSTATES_JSON: toolstates-windows.json
424-
os: windows-2019-8core-32gb
424+
os: windows-2022-8core-32gb
425425
- name: i686-mingw
426426
env:
427427
RUST_CONFIGURE_ARGS: "--build=i686-pc-windows-gnu"
428428
SCRIPT: make ci-mingw
429429
NO_DOWNLOAD_CI_LLVM: 1
430430
CUSTOM_MINGW: 1
431-
os: windows-2019-8core-32gb
431+
os: windows-2022-8core-32gb
432432
- name: x86_64-mingw
433433
env:
434434
SCRIPT: make ci-mingw
435435
RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-gnu --enable-profiler"
436436
NO_DOWNLOAD_CI_LLVM: 1
437437
CUSTOM_MINGW: 1
438-
os: windows-2019-8core-32gb
438+
os: windows-2022-8core-32gb
439439
- name: dist-x86_64-msvc
440440
env:
441441
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"
442442
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
443443
DIST_REQUIRE_ALL_TOOLS: 1
444-
os: windows-2019-8core-32gb
444+
os: windows-2022-8core-32gb
445445
- name: dist-i686-msvc
446446
env:
447447
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"
448448
SCRIPT: python x.py dist bootstrap --include-default-paths
449449
DIST_REQUIRE_ALL_TOOLS: 1
450-
os: windows-2019-8core-32gb
450+
os: windows-2022-8core-32gb
451451
- name: dist-aarch64-msvc
452452
env:
453453
RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-msvc --host=aarch64-pc-windows-msvc --enable-full-tools --enable-profiler"
454454
SCRIPT: python x.py dist bootstrap --include-default-paths
455455
DIST_REQUIRE_ALL_TOOLS: 1
456-
os: windows-2019-8core-32gb
456+
os: windows-2022-8core-32gb
457457
- name: dist-i686-mingw
458458
env:
459459
RUST_CONFIGURE_ARGS: "--build=i686-pc-windows-gnu --enable-full-tools --enable-profiler"
460460
NO_DOWNLOAD_CI_LLVM: 1
461461
SCRIPT: python x.py dist bootstrap --include-default-paths
462462
CUSTOM_MINGW: 1
463463
DIST_REQUIRE_ALL_TOOLS: 1
464-
os: windows-2019-8core-32gb
464+
os: windows-2022-8core-32gb
465465
- name: dist-x86_64-mingw
466466
env:
467467
SCRIPT: python x.py dist bootstrap --include-default-paths
468468
RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-gnu --enable-full-tools --enable-profiler"
469469
NO_DOWNLOAD_CI_LLVM: 1
470470
CUSTOM_MINGW: 1
471471
DIST_REQUIRE_ALL_TOOLS: 1
472-
os: windows-2019-8core-32gb
472+
os: windows-2022-8core-32gb
473473
- name: dist-x86_64-msvc-alt
474474
env:
475475
RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-msvc --enable-extended --enable-profiler"
476476
SCRIPT: python x.py dist bootstrap --include-default-paths
477-
os: windows-2019-8core-32gb
477+
os: windows-2022-8core-32gb
478478
defaults:
479479
run:
480480
shell: "${{ contains(matrix.os, 'windows') && 'msys2 {0}' || 'bash' }}"

src/ci/github-actions/ci.yml

+2-2
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

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

+1-16
Original file line numberDiff line numberDiff line change
@@ -43,26 +43,11 @@ 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"
5849

5950
# Disable downloading CI LLVM on this builder;
6051
# setting up clang-cl just above conflicts with the default if-unchanged option.
6152
ciCommandSetEnv NO_DOWNLOAD_CI_LLVM 1
6253
fi
63-
64-
if isWindows; then
65-
# GitHub image 20210928.2 added LLVM, but it is broken (and we don't want
66-
# to use it anyways).
67-
rm -rf /c/Program\ Files/LLVM
68-
fi

0 commit comments

Comments
 (0)