Skip to content

Commit e2c0be6

Browse files
committed
Auto merge of #132721 - MarcoIeni:mingw-split, r=<try>
CI: split x86_64-mingw job try-job: x86_64-mingw-1 try-job: x86_64-mingw-2
2 parents cb2bd2b + 30a9fdc commit e2c0be6

File tree

4 files changed

+25
-12
lines changed

4 files changed

+25
-12
lines changed

src/bootstrap/mk/Makefile.in

+5-3
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,13 @@ ci-msvc: ci-msvc-py ci-msvc-ps1
108108

109109
## MingW native builders
110110

111-
# test both x and bootstrap entrypoints
111+
# Set of tests that should represent half of the time of the test suite.
112+
# Used to split tests across multiple CI runners.
113+
# Test both x and bootstrap entrypoints.
112114
ci-mingw-x:
113-
$(Q)$(CFG_SRC_DIR)/x test --stage 2 tidy
115+
$(Q)$(CFG_SRC_DIR)/x test --stage 2 --skip=compiler --skip=src
114116
ci-mingw-bootstrap:
115-
$(Q)$(BOOTSTRAP) test --stage 2 --skip tidy
117+
$(Q)$(BOOTSTRAP) test --stage 2 --skip=tests --skip=coverage-map --skip=coverage-run --skip=library --skip=tidyselftest
116118
ci-mingw: ci-mingw-x ci-mingw-bootstrap
117119

118120
.PHONY: dist

src/bootstrap/src/core/builder/mod.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -258,11 +258,11 @@ impl PathSet {
258258

259259
// internal use only
260260
fn check(p: &TaskPath, needle: &Path, module: Kind) -> bool {
261-
if let Some(p_kind) = &p.kind {
262-
p.path.ends_with(needle) && *p_kind == module
263-
} else {
264-
p.path.ends_with(needle)
265-
}
261+
let check_path = || {
262+
// This order is important for retro-compatibility, as `starts_with` was introduced later.
263+
p.path.ends_with(needle) || p.path.starts_with(needle)
264+
};
265+
if let Some(p_kind) = &p.kind { check_path() && *p_kind == module } else { check_path() }
266266
}
267267

268268
/// Return all `TaskPath`s in `Self` that contain any of the `needles`, removing the

src/ci/github-actions/jobs.yml

+13-3
Original file line numberDiff line numberDiff line change
@@ -439,14 +439,24 @@ auto:
439439
NO_DOWNLOAD_CI_LLVM: 1
440440
<<: *job-windows-8c
441441

442-
- image: x86_64-mingw
442+
# x86_64-mingw is split into two jobs to run tests in parallel.
443+
- image: x86_64-mingw-1
443444
env:
444-
SCRIPT: make ci-mingw
445+
SCRIPT: make ci-mingw-x
445446
RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-gnu
446447
# We are intentionally allowing an old toolchain on this builder (and that's
447448
# incompatible with LLVM downloads today).
448449
NO_DOWNLOAD_CI_LLVM: 1
449-
<<: *job-windows-8c
450+
<<: *job-windows
451+
452+
- image: x86_64-mingw-2
453+
env:
454+
SCRIPT: make ci-mingw-bootstrap
455+
RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-gnu
456+
# We are intentionally allowing an old toolchain on this builder (and that's
457+
# incompatible with LLVM downloads today).
458+
NO_DOWNLOAD_CI_LLVM: 1
459+
<<: *job-windows
450460

451461
- image: dist-x86_64-msvc
452462
env:

src/ci/shared.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ function isLinux {
5353
}
5454

5555
function isKnownToBeMingwBuild {
56-
isGitHubActions && [[ "${CI_JOB_NAME}" == *mingw ]]
56+
# CI_JOB_NAME must end with "mingw" and optionally `-N` to be considered a MinGW build.
57+
isGitHubActions && [[ "${CI_JOB_NAME}" =~ mingw(-[0-9]+)?$ ]]
5758
}
5859

5960
function isCiBranch {

0 commit comments

Comments
 (0)