about summary refs log tree commit diff
path: root/src/ci
AgeCommit message (Collapse)AuthorLines
2025-10-03Auto merge of #145898 - lolbinarycat:rustdoc-search-trait-parent, ↵bors-1/+1
r=GuillaumeGomez,notriddle If a trait item appears in rustdoc search, hide the corrosponding impl items fixes rust-lang/rust#138251 cc `@notriddle`
2025-10-02rustdoc: use same stage for all pr check docsMichael Howell-1/+1
2025-10-02Rollup merge of #147233 - GuillaumeGomez:citool-submodule-init, r=KobzolMatthias Krüger-2/+22
Initialize llvm submodule if not already the case to run citool While working on https://github.com/rust-lang/rust/pull/146414, I ran the following command (to run CI docker locally): ``` cargo run --manifest-path src/ci/citool/Cargo.toml run-local --type pr x86_64-gnu-gcc ``` However, since I didn't have `src/llvm` submodule initialized, it failed. Apparently it's a common issue for people using this tool so this PR removes this small inconvenience. r? ``@Kobzol``
2025-10-01Initialize llvm submodule if not already the case to run citoolGuillaume Gomez-1/+21
2025-10-01Switch `citool` to 2024 editionGuillaume Gomez-1/+1
2025-09-30Remove usage of `compiletest-use-stage0-libtest` from CIJakub Beránek-3/+1
2025-09-29Make macOS dist build configuration match where reasonableJake Goulding-5/+9
2025-09-28Auto merge of #146513 - madsmtm:apple-reenable-assertions, r=Mark-Simulacrumbors-12/+0
Re-enable assertions on macOS alt builds These were previously disabled, in part for performance reasons, in part due to needing availability symbols `__isPlatformVersionAtLeast` and `__isOSVersionAtLeast` that `compiler-builtins` did not provide, see https://github.com/rust-lang/rust/pull/62592#issuecomment-510670657 and https://github.com/rust-lang/rust/pull/134275#issuecomment-2543067830 for failed checks. Since https://github.com/rust-lang/rust/pull/138944 though, `std` now provides these symbols, so we should be able to re-enable LLVM assertions, debug assertions and overflow checks. Fixes https://github.com/rust-lang/rust/issues/59637. try-job: `*apple*`
2025-09-27Re-enable assertions on macOSMads Marquart-12/+0
2025-09-26Rename `rust.use-lld` to `rust.bootstrap-override-lld`Jakub Beránek-2/+2
2025-09-24Auto merge of #146338 - CrooseGit:dev/reucru01/AArch64-enable-GCS, ↵bors-3/+3
r=Urgau,davidtwco Extends AArch64 branch protection support to include GCS Extends existing support for AArch64 branch protection to include support for [Guarded Control Stacks](https://community.arm.com/arm-community-blogs/b/architectures-and-processors-blog/posts/arm-a-profile-architecture-2022#guarded-control-stack-gcs:~:text=Extraction%20or%20tracking.-,Guarded%20Control%20Stack%20(GCS),-With%20the%202022).
2025-09-23Changes some aarch64 CIs g++ install & ubuntu ver.Reuben Cruise-3/+3
GCS support was added to GCC in version 15, thus the rmake test for this patch requires GCC15 Similarly, the ubuntu version is updated so the newer clang version is available, and/or GCC15 is the default.
2025-09-21Rollup merge of #146606 - Enselic:test-test-args, r=Mark-SimulacrumMatthias Krüger-0/+7
ci: x86_64-gnu-tools: Add `--test-args` regression test See https://github.com/rust-lang/rust/pull/146601#issuecomment-3293179561 r? ``@Mark-Simulacrum``
2025-09-16Update the minimum external LLVM to 20Josh Stone-104/+13
2025-09-16ci: x86_64-gnu-tools: Add `--test-args` regression testMartin Nordholts-0/+7
2025-09-13Auto merge of #146394 - Enselic:debuginfo-level-tests-2, r=jieyouxubors-1/+1
ci: Increase `rust.debuginfo-level-tests` to `2` in `x86_64-gnu-debug` job Simply to increase the scope of the testing. Part of https://github.com/rust-lang/rust/issues/61117. cc rust-lang/rust#145967 and rust-lang/rust#146025 which prepared for this. And rust-lang/rust#144499 that set to level to `1` try-job: x86_64-gnu-debug
2025-09-12ci: Increase `rust.debuginfo-level-tests` to `2` in `x86_64-gnu-debug` jobMartin Nordholts-1/+1
Simply to increase the scope of the testing. Force debuginfo=0 for a handful of tests so that we can have CI prevent regressing on more tests.
2025-09-09CI: rfl: move job forward to Linux v6.17-rc5 to remove temporary commitsMiguel Ojeda-3/+1
v6.17-rc5 contains the equivalent of the two commits we had here, thus move the Rust for Linux job forward to that so that we don't need the temporary commits anymore. Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2025-09-06Auto merge of #146233 - jieyouxu:run-make-fission, r=Kobzolbors-7/+9
Split `run-make` into two {`run-make`,`run-make-cargo`} test suites ## Summary Split `tests/run-make` into two test suites, to make it faster and more convenient for contributors to run run-make tests that do not need in-tree `cargo`. | New test suites | Explanation | | ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `tests/run-make` | The "fast path" test suite intended for run-make tests that do not need in-tree `cargo`. These tests may not use `cargo`. | | `tests/run-make-cargo` | The "slow path" test suite that requires checking out `cargo` submodule and building in-tree `cargo`, and thus will have access to in-tree `cargo`. In practice, these constitute a very small portion of the original `run-make` tests. | This PR carries out [MCP 847: Split run-make test suite into slower-building test suite with suitably-staged cargo and faster-building test suite without cargo](https://github.com/rust-lang/compiler-team/issues/847). Fixes rust-lang/rust#135573 (for the tests that do not need in-tree `cargo`). Fixes rust-lang/rust#134109. ## Remarks - I considered if we want to split by in-tree tools previously. However, as discussed rust-lang/rust#134109, in practice `rustdoc` is not very slow to build, but `cargo` takes a good few minutes. So, the partition boundary was determined to be along in-tree `cargo` availability. - The `run-make` tests previously that wanted to use `cargo` cannot just use the bootstrap `cargo`, otherwise they would run into situations where bootstrap `cargo` can significantly diverge from in-tree `cargo` (see https://github.com/rust-lang/rust/pull/130642). --- try-job: aarch64-msvc-1 try-job: test-various try-job: x86_64-gnu-debug try-job: aarch64-gnu-debug try-job: aarch64-apple try-job: dist-various-1
2025-09-06ci: check `src/tools/bump-stage0` in `pr-check-2`Jieyou Xu-0/+1
To catch obvious build failures of the `src/tools/bump-stage0` early, before we find out it can't even build when we really need it to work.
2025-09-05ci: update jobs to also run `tests/run-make-cargo`Jieyou Xu-7/+9
For the ones that explicitly picks which test suite to run.
2025-09-03CI: rfl: move job forward to Linux v6.17-rc3 plus 2 commitsMiguel Ojeda-1/+2
This upgrades the Rust CI from v6.16-rc1 plus a temporary commit for the >= 1.91 target spec [1] to v6.17-rc3 with two commits pending to be merged upstream -- one for the same target spec format change [1] and another for the `file_as_c_str` change [2]. Link: https://github.com/rust-lang/rust/pull/144443 [1] Link: https://github.com/rust-lang/rust/pull/145928 [2] Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2025-09-01Auto merge of #145663 - Kobzol:bootstrap-test, r=jieyouxubors-1/+1
Enforce in bootstrap that test must have stage at least 1 (except for compiletest) This PR cleans up a bunch of test steps and adds metadata to them. I didn't yet touch the most complicated step (`CompileTest`), I'm leaving that for another PR. Testing anything on stage 0 is only possible for compiletest and with `build.allow-compiletest-stage0`. Testing anything else on stage 0 will either produce a nice error or crash with a stage being subtracted below zero. r? `@jieyouxu` try-job: dist-x86_64-linux try-job: aarch64-gnu try-job: arm-android try-job: `x86_64-gnu-llvm-20*` try-job: `x86_64-msvc-*` try-job: aarch64-apple try-job: test-various
2025-08-30Do not run tests on CI in stage 0Jakub Beránek-1/+1
2025-08-27CI: rfl: support Rust >= 1.91.0 target specMiguel Ojeda-1/+2
To unblock the Rust CI in PR [1], use a temporary commit from Rust for Linux that supports the future target spec format. Link: https://github.com/rust-lang/rust/pull/144443 [1] Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2025-08-26Rollup merge of #145790 - mati865:gnullvm-improve-dist, r=KobzolSamuel Tardieu-30/+4
Improve dist for gnullvm hosts LLVM tools cross-compilation has been fixed by rust-lang/rust#145763 and LLVM downloading from CI no longer causes build error, so let's enable them both.
2025-08-26Rollup merge of #144499 - Enselic:ci-debuginfo-level-tests, r=davidtwcoSamuel Tardieu-0/+5
ci: Begin running ui tests with `rust.debuginfo-level-tests=1` To reduce risk of regressing on generating debuginfo e.g. in the form of ICE:s. This will also ensure that future ui tests work with different debuginfo levels. See https://github.com/rust-lang/rust/issues/61117. When I looked at run time for different CI jobs, **x86_64-gnu-debug** was far from the bottleneck, so it should be fine to make it perform more work. A handful of tests are failing so we need to force debuginfo=0 on those for now. We'll start small with debuginfo=1. We'll step up to debuginfo=2 once most (all?) tests can handle debuginfo=1. There are more failures with debuginfo=2 than with debuginfo=1.
2025-08-26Rollup merge of #145845 - Kobzol:fix-distcheck, r=jieyouxuStuart Cook-5/+3
Make `x test distcheck` self-contained Before, the checked components were extracted under the checked out source root, which caused us to test some weird combination of tarball + checkout sources/aritfacts/configuration. Now `x test distcheck` works with an external temporary directory instead, which should make it self-contained. I also moved some config from the Dockerfile to the test itself, and fixed an issue in tidy that caused `x test tidy` to fail on tarball sources. I also removed `.args(&builder.config.configure_args)`, because it was passing all kinds of crap from the CI config to the distcheck step, which was making it less reproducible. Fixes: https://github.com/rust-lang/rust/issues/145183 r? ```@jieyouxu``` try-job: x86_64-gnu-distcheck
2025-08-26Rollup merge of #145815 - jieyouxu:pr-check-timeout, r=marcoieniStuart Cook-3/+6
Wait for DPkg frontend lock when trying to remove packages Hopefully this helps with [#t-infra > pr-check-1 fails on "free up disk space"](https://rust-lang.zulipchat.com/#narrow/channel/242791-t-infra/topic/pr-check-1.20fails.20on.20.22free.20up.20disk.20space.22/with/535794424). As suggested by riking in [#t-infra > pr-check-1 fails on "free up disk space" @ 💬](https://rust-lang.zulipchat.com/#narrow/channel/242791-t-infra/topic/pr-check-1.20fails.20on.20.22free.20up.20disk.20space.22/near/535791579), thanks! r? infra-ci
2025-08-25Wait for DPkg frontend lock when trying to remove packagesJieyou Xu-3/+6
2025-08-25Do not forward CI configure arguments to `distcheck` buildsJakub Beránek-0/+3
2025-08-25Make `x test distcheck` more self-containedJakub Beránek-6/+1
2025-08-24Fix some minor issues in commentshoupo-bob-4/+4
Signed-off-by: houpo-bob <houpocun@outlook.com>
2025-08-23Enable LLVM download from CI for gnullvm distMateusz Mikuła-20/+2
It no longer fails with an error locally.
2025-08-23Enable LLVM tools for gnullvm distMateusz Mikuła-12/+4
This issue has been fixed by <https://github.com/rust-lang/rust/pull/145763>.
2025-08-23citool: cleanup `mismatched_lifetime_syntaxes` warningsSamuel Tardieu-3/+3
2025-08-22Rollup merge of #137457 - JayAndJef:issue-132802-fix, r=KobzolJacob Pratt-3/+26
Fix host code appearing in Wasm binaries This is a direct fix for issue [132802](https://github.com/rust-lang/rust/issues/132802). Followed the outline as follows: > * give a hard error in bootstrap when using gcc to compile for wasm > * change our CI to use clang instead of gcc > * add a test that compiling a sample program for wasm32-unknown doesn't give any linker warnings The `test-various` ci job was also changed. try-job: test-various try-job: dist-various-1 try-job: dist-various-2 try-job: x86_64-msvc-1
2025-08-22ci: Begin running ui tests with `rust.debuginfo-level-tests=1`Martin Nordholts-0/+5
To reduce risk of regressing on generating debuginfo e.g. in the form of ICE:s. This will also ensure that future ui tests support different debuginfo levels. When I looked at run time for different CI jobs, **x86_64-gnu-debug** was far from the bottle neck, so it should be fine to make it perform more work.
2025-08-21ci: don't cleanup windows diskMarcoIeni-239/+0
2025-08-20Rollup merge of #145252 - shepmaster:demote-x86_64-apple-darwin-to-tier-2, ↵Jacob Pratt-30/+15
r=Kobzol,madsmtm Demote x86_64-apple-darwin to Tier 2 with host tools Switch to only using aarch64 runners (implying we are now cross-compiling) and stop running tests. In the future, we could enable (some?) tests via Rosetta 2. This implements the decision from https://github.com/rust-lang/rfcs/pull/3841.
2025-08-19Rollup merge of #145025 - lolbinarycat:ci-tidy-spellcheck, r=Kobzol许杰友 Jieyou Xu (Joe)-1/+1
run spellcheck as a tidy extra check in ci This is probably how it should've been done from the start. r? ``@Kobzol``
2025-08-19Rollup merge of #144476 - notriddle:notriddle/stringdex, ↵Stuart Cook-1/+1
r=lolbinarycat,GuillaumeGomez rustdoc-search: search backend with partitioned suffix tree Before: - https://notriddle.com/windows-docs-rs/doc-old/windows/ - https://doc.rust-lang.org/1.89.0/std/index.html - https://doc.rust-lang.org/1.89.0/nightly-rustc/rustc_hir/index.html After: - https://notriddle.com/windows-docs-rs/doc/windows/ - https://notriddle.com/rustdoc-html-demo-12/stringdex/doc/std/index.html - https://notriddle.com/rustdoc-html-demo-12/stringdex/compiler-doc/rustc_hir/index.html ## Summary Rewrites the rustdoc search engine to use an indexed data structure, factored out as a crate called [stringdex](https://crates.io/crates/stringdex), that allows it to perform modified-levenshtein distance calculations, substring matches, and prefix matches in a reasonably efficient, and, more importantly, *incremental* algorithm. ## Motivation Fixes https://github.com/rust-lang/rust/issues/131156 While the windows-rs crate is definitely the worst offender, I've noticed performance problems with the compiler crates as well. It makes no sense for rustdoc-search to have poor performance: it's basically a spell checker, and those have been usable since the 90's. Stringdex is particularly designed to quickly return exact matches, to always report those matches first, and to never, ever [place new matches on top of old ones](https://web.dev/articles/cls). It also tries to yield to the event loop occasionally as it runs. This way, you can click the exactly-matched result before the rest of the search finishes running. ## Explanation A longer description of how name search works can be found in stringdex's [HACKING.md](https://gitlab.com/notriddle/stringdex/-/blob/main/HACKING.md) file. Type search is done by performing a name search on each element, then performing bitmap operations to narrow down a list of potential matches, then performing type unification on each match. ## Drawbacks It's rather complex, and takes up more disk space than the current flat list of strings. ## Rationale and alternatives Instead of a suffix tree, I could've used a different [approximate matching data structure](https://en.wikipedia.org/wiki/Approximate_string_matching). I didn't do that because I wanted to keep the current behavior (for example, a straightforward trigram index won't match [oepn](https://doc.rust-lang.org/nightly/std/?search=oepn) like the current system does). ## Prior art [Sherlodoc](https://github.com/art-w/sherlodoc) is based on a similar concept, but they: - use edit distance over a suffix tree for type-based search, instead of the binary matching that's implemented here - use substring matching for name-based search, [but not fuzzy name matching](https://github.com/art-w/sherlodoc/issues/21) - actually implement body text search, which is a potential-future feature, but not implemented in this PR ## Future possibilities ### Low-level optimization in stringdex There are half a dozen low-level optimizations that I still need to explore. I haven't done them yet, because I've been working on bug fixes and rebasing on rustdoc's side, and a more solid and diverse test suite for stringdex itself. - Stringdex decides whether to bundle two nodes into the same file based on size. To figure out a node's size, I have to run compression on it. This is probably slower than it needs to be. - Stack compression is limited to the same 256-slot sliding windows as backref compression, and it doesn't have to be. (stack and backref compression are used to optimize the representation of the edge pointer from a parent node to its child; backref uses one byte, while stack is entirely implicit) - The JS-side decoder is pretty naive. It performs unnecessary hash table lookups when decoding compressed nodes, and retains a list of hashes that it doesn't need. It needs to calculate the hashes in order to construct the merkle tree correctly, but it doesn't need to keep them. - Data compression happens at the end, while emitting the node. This means it's not being counted when deciding on how to bundle, which is pretty dumb. ### Improved recall in type-driven search Right now, type-driven search performs very strict matching. It's very precise, but misses a lot of things people would want. What I'm not sure about is whether to focus more on edit-distance-based approaches, or to focus on type-theoretical approaches. Both gives avenues to improve, but edit distance is going to be faster while type checking is going to be more precise. For example, a type theoretical improvement would fix [`Iterator<T>, (T -> U) -> Iterator<U>`](https://doc.rust-lang.org/nightly/std/?search=Iterator%3CT%3E%2C%20(T%20-%3E%20U)%20-%3E%20Iterator%3CU%3E) to give [`Iterator::map`](https://doc.rust-lang.org/nightly/std/iter/trait.Iterator.html#method.map), because it would recognize that the Map struct implements the Iterator trait. I don't know of any clean way to get this result to work without implementing significant type checking logic in search.js, and an edit-distance-based "dirty" approach would likely give a bunch of other results on top of this one. ## Full-text search Once you've got this fuzzy dictionary matching to work, the logical next step is to implement some kind of information retrieval-based approach to phrase matching. Like applying edit distance to types, phrase search gets you significantly better recall, but with a few major drawbacks: - You have to pick between index bloat and the use of stopwords. Stopwords are bad because they might actually be important (try searching "if let" in mdBook if you're feeling brave), but without them, you spend a lot of space on text that doesn't matter. - Example code also tends to have a lot of irrelevant stuff in it. Like stop words, we'd have to pick potentially-confusing or bloat. Neither of these problems are deal-breakers, but they're worth keeping in mind.
2025-08-18ci: add timeout to windows disk cleanup waitMarcoIeni-3/+18
2025-08-16run spellcheck as a tidy extra check in cibinarycat-1/+1
2025-08-15rustdoc-search: search backend with partitioned suffix treeMichael Howell-1/+1
2025-08-15Demote x86_64-apple-darwin to Tier 2 with host toolsJake Goulding-30/+15
Switch to only using aarch64 runners (implying we are now cross-compiling) and stop running tests. In the future, we could enable (some?) tests via Rosetta 2.
2025-08-15Rollup merge of #145311 - marcoieni:clean-disk-in-background-windows, r=KobzolJakub Beránek-1/+179
ci: clean windows disk space in background
2025-08-14ci: clean windows disk space in backgroundMarcoIeni-1/+179
2025-08-14Auto merge of #145131 - Kobzol:bootstrap-clippy, r=jieyouxubors-1/+1
Enforce in bootstrap that clippy must have stage at least 1 This mostly piggybacks on the previous `x check` [rework](https://github.com/rust-lang/rust/pull/143048). The new "rules" follow the new staging logic. So `x clippy <foo>` lints `foo` using stage0 Clippy. `x clippy --stage 2 <foo>` lints `foo` using stage1 Clippy (which is built from in-tree sources). I had to fix some latent issues with `prepare_compiler_for_check` along the way. Checking `rustc_private` tools should now check less compiler crates (or rather not check compiler examples/tests/etc.), potentially speeding it up slightly. I also had to make some manual adjustments to `x clippy ci` so that it doesn't do needless work. r? `@jieyouxu`
2025-08-13Auto merge of #145298 - nikic:llvm21-rc3, r=cuviperbors-1/+3
Update to LLVM 21.1.0 rc3