From 3fa690a52375c0d2a7fb157f0c361e6e66731cb1 Mon Sep 17 00:00:00 2001 From: MarcoIeni <11428655+MarcoIeni@users.noreply.github.com> Date: Fri, 29 Nov 2024 15:17:13 +0100 Subject: [PATCH 1/2] CI: split x86_64-msvc job --- src/bootstrap/mk/Makefile.in | 6 ++++-- src/bootstrap/src/core/builder/mod.rs | 10 +++++----- src/ci/github-actions/jobs.yml | 15 ++++++++------- 3 files changed, 17 insertions(+), 14 deletions(-) diff --git a/src/bootstrap/mk/Makefile.in b/src/bootstrap/mk/Makefile.in index 92c8f5dc452fc..0ef9153f88cd9 100644 --- a/src/bootstrap/mk/Makefile.in +++ b/src/bootstrap/mk/Makefile.in @@ -99,11 +99,13 @@ prepare: ## MSVC native builders +# Set of tests that should represent half of the time of the test suite. +# Used to split tests across multiple CI runners. # this intentionally doesn't use `$(BOOTSTRAP)` so we can test the shebang on Windows ci-msvc-py: - $(Q)$(CFG_SRC_DIR)/x.py test --stage 2 tidy + $(Q)$(CFG_SRC_DIR)/x.py test --stage 2 --skip=compiler --skip=src ci-msvc-ps1: - $(Q)$(CFG_SRC_DIR)/x.ps1 test --stage 2 --skip tidy + $(Q)$(CFG_SRC_DIR)/x.ps1 test --stage 2 --skip=tests --skip=coverage-map --skip=coverage-run --skip=library --skip=tidyselftest ci-msvc: ci-msvc-py ci-msvc-ps1 ## MingW native builders diff --git a/src/bootstrap/src/core/builder/mod.rs b/src/bootstrap/src/core/builder/mod.rs index 945a7b7366f4d..5db4eed1349f4 100644 --- a/src/bootstrap/src/core/builder/mod.rs +++ b/src/bootstrap/src/core/builder/mod.rs @@ -258,11 +258,11 @@ impl PathSet { // internal use only fn check(p: &TaskPath, needle: &Path, module: Kind) -> bool { - if let Some(p_kind) = &p.kind { - p.path.ends_with(needle) && *p_kind == module - } else { - p.path.ends_with(needle) - } + let check_path = || { + // This order is important for retro-compatibility, as `starts_with` was introduced later. + p.path.ends_with(needle) || p.path.starts_with(needle) + }; + if let Some(p_kind) = &p.kind { check_path() && *p_kind == module } else { check_path() } } /// Return all `TaskPath`s in `Self` that contain any of the `needles`, removing the diff --git a/src/ci/github-actions/jobs.yml b/src/ci/github-actions/jobs.yml index 2f59892acf6a5..888b12c51ea03 100644 --- a/src/ci/github-actions/jobs.yml +++ b/src/ci/github-actions/jobs.yml @@ -372,17 +372,18 @@ auto: # Windows Builders # ###################### - - image: x86_64-msvc + # x86_64-msvc is split into two jobs to run tests in parallel. + - image: x86_64-msvc-1 env: RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc --enable-profiler - SCRIPT: make ci-msvc - <<: *job-windows-8c + SCRIPT: make ci-msvc-py + <<: *job-windows - - image: i686-msvc + - image: x86_64-msvc-2 env: - RUST_CONFIGURE_ARGS: --build=i686-pc-windows-msvc - SCRIPT: make ci-msvc - <<: *job-windows-8c + RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc --enable-profiler + SCRIPT: make ci-msvc-ps1 + <<: *job-windows # x86_64-msvc-ext is split into multiple jobs to run tests in parallel. - image: x86_64-msvc-ext1 From 02bf39782fa37d04a1a2466589613cc70594c6e7 Mon Sep 17 00:00:00 2001 From: MarcoIeni <11428655+MarcoIeni@users.noreply.github.com> Date: Fri, 29 Nov 2024 15:19:12 +0100 Subject: [PATCH 2/2] rentroduce job --- src/ci/github-actions/jobs.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/ci/github-actions/jobs.yml b/src/ci/github-actions/jobs.yml index 888b12c51ea03..157441e56031e 100644 --- a/src/ci/github-actions/jobs.yml +++ b/src/ci/github-actions/jobs.yml @@ -385,6 +385,12 @@ auto: SCRIPT: make ci-msvc-ps1 <<: *job-windows + - image: i686-msvc + env: + RUST_CONFIGURE_ARGS: --build=i686-pc-windows-msvc + SCRIPT: make ci-msvc + <<: *job-windows-8c + # x86_64-msvc-ext is split into multiple jobs to run tests in parallel. - image: x86_64-msvc-ext1 env: