about summary refs log tree commit diff
path: root/src/ci/docker
AgeCommit message (Collapse)AuthorLines
2024-06-04Silence double-symlink errors while building solaris toolchainJubilee Young-1/+1
2024-05-29ci: Consolidate $IS_NOT_LATEST_LLVM into $EXTERNAL_LLVMJubilee Young-4/+0
We want to only demand that we check for all components we expect if we actually built the components we expect, which means we built the LLVM. Otherwise, it isn't worth checking.
2024-05-21Rollup merge of #125011 - diondokter:opt-for-size, r=Amanieu,kobzolMatthias Krüger-0/+4
Add opt-for-size core lib feature flag Adds a feature flag to the core library that enables the possibility to have smaller implementations for certain algorithms. So far, the core lib has traded performance for binary size. This is likely what most people want since they have big simd-capable machines. However, people on small machines, like embedded devices, don't enjoy the potential speedup of the bigger algorithms, but do have to pay for them. These microcontrollers often only have 16-1024kB of flash memory. This PR is the result of some talks with project members like `@Amanieu` at RustNL. There are some open questions of how this is eventually stabilized, but it's a similar question as with the existing `panic_immediate_abort` feature. Speaking as someone from the embedded side, we'd rather have this unstable for a while as opposed to not having it at all. In the meantime we can try to use it and also add additional PRs to the core lib that uses the feature flag in areas where we find benefit. Open questions from my side: - Is this a good feature name? - `panic_immediate_abort` is fairly verbose, so I went with something equally verbose - It's easy to refactor later - I've added the feature to `std` and `alloc` as well as they might benefit too. Do we agree? - I expect these to get less usage out of the flag since most size-constraint projects don't use these libraries often.
2024-05-20refactor(ci/docker/dist-x86_64-linux): remove rustc-perf downloadingBernardo Meurer Costa-8/+0
It is now available as a submodule in src/tools/rustc-perf, and is initialized when building opt-dist
2024-05-20Move tests to more opportune pointDion Dokter-4/+4
2024-05-20Deduplicate test commandDion Dokter-5/+4
2024-05-17Only test std, alloc and coreDion Dokter-3/+3
2024-05-17Run tests with the flag enabledDion Dokter-0/+5
2024-05-11Rollup merge of #124829 - briansmith:b/armv7-profiler, r=Mark-SimulacrumMatthias Krüger-1/+1
Enable profiler for armv7-unknown-linux-gnueabihf. Allow code coverage measurement for armv7-unknown-linux-gnueabihf targets. Fixes #79640.
2024-05-10Auto merge of #124850 - dpaoliello:clang2022, r=Kobzolbors-0/+1
Upgrade pre-built Clang used in MSVC and MacOS builds, move MSVC builds to Server 2022 Fixes #92948 Example working MacOS and Windows builds: <https://github.com/rust-lang/rust/actions/runs/8989360201> There is a [bug in Clang 18](https://github.com/llvm/llvm-project/pull/81849) that causes issues when building for Arm64 in later parts of the build (specifically `libgit2`). As a workaround, we will still use the pre-built Clang to build LLVM but will use MSVC for the rest of the Arm64 build.
2024-05-09Upgrade the version of Clang used in the build, move MSVC builds to Server 2022Daniel Paoliello-0/+1
2024-05-07Fuchsia test runner: fixup scriptMarc Khouri-87/+93
This commit fixes several issues in the fuchsia-test-runner.py script: 1. Migrate from `pm` to `ffx` for package management, as `pm` is now deprecated. Furthermore, the `pm` calls used in this script no longer work at Fuchsia's HEAD. This is the largest change in this commit, and impacts all steps around repository management (creation and registration of the repo, as well as package publishing). 2. Allow for `libtest` to be either statically or dynamically linked. The script assumed it was dynamically linked, but the current Rust behavior at HEAD is to statically link it. 3. Minor cleanup to use `ffx --machine json` rather than string parsing. 4. Minor cleanup to the docs around the script.
2024-05-06Enable profiler for armv7-unknown-linux-gnueabihf.Brian Smith-1/+1
2024-05-03Allow reusing CI Docker cache when running CI images locallyJakub Beránek-2/+10
2024-05-03Calculate the Docker hash key also locallyJakub Beránek-31/+29
2024-05-03Do not include Docker version in caching keyJakub Beránek-2/+0
We are now using Docker caching directly rather than downloading archives from S3, so it should not be needed. This should unblock reusing the cache locally.
2024-04-29Remove the `expand-yaml-anchors` toolJakub Beránek-5/+4
2024-04-24Rollup merge of #123881 - erickt:bump-fuchsia, r=tmandryLeón Orell Valerian Liehr-6/+6
Bump Fuchsia versions This updates the Fuchsia commit used in `auto - x86_64-gnu-integration` CI bot to use the Rust commit 703dc9ce64d9b31a239a7280d9b5f9ddd85ffed6. This should help improve the coverage of this builder. It also updates the SDK version to F20.20240412.3.1, and the Fuchsia Clang version to c777c011a709dffd4fa5e79cad7947b7c3405d02. r? ``@tmandry``
2024-04-21Rollup merge of #124069 - onur-ozkan:run-clippy-on-bootstrap, r=albertlarsan68Guillaume Gomez-0/+1
enable clippy for bootstrap on CI PRs (in `mingw-check` image) Let's keep the bootstrap codebase cleaner.
2024-04-21Auto merge of #123981 - Kobzol:update-nodejs, r=Mark-Simulacrumbors-8/+20
CI: add script for installing NodeJS and update it to v20 I centralized the installation on a single place to make it simple to update the NodeJS version across the board. Fixes: https://github.com/rust-lang/rust/issues/123965 r? `@Mark-Simulacrum`
2024-04-20Auto merge of #121712 - mati865:provide-prebuilt-std-for-gnullvm, ↵bors-1/+18
r=Mark-Simulacrum Provide prebuilt std for gnullvm targets Revival of https://github.com/rust-lang/rust/pull/114346 which waiting on MCP that was accepted recently: https://github.com/rust-lang/compiler-team/issues/710#issuecomment-1942014308
2024-04-18CI: add script for installing NodeJS and update it to v20Jakub Beránek-8/+20
2024-04-17Auto merge of #123978 - alexcrichton:update-wasi-toolchain, r=Mark-Simulacrumbors-62/+7
Update how WASI toolchains are used in CI and bootstrap This commit updates how the WASI targets are configured with their toolchain. Long ago a `config.toml` option of `wasi-root` was added to enable building with the WASI files produced by wasi-libc. Additionally for CI testing and release building the Rust toolchain has been using a hard-coded commit of wasi-libc which is bundled with the release of the `wasm32-wasip1` target, for example. Nowadays though the wasi-sdk project, the C/C++ toolchain for WASI, is the go-to solution for compiling/linking WASI code and contains the more-or-less official releases of wasi-libc. This commit migrates CI to using wasi-sdk releases and additionally updates `bootstrap` to recognize when this is configured. This means that with `$WASI_SDK_PATH` configured there's no further configuration necessary to get a working build. Notably this also works better for the new targets of WASI as well, such as `wasm32-wasip2` and `wasm32-wasip1-threads` where the wasi-sdk release now has libraries for all targets bundled within it.
2024-04-17enable clippy for bootstrap on CI PRsonur-ozkan-0/+1
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-04-17Auto merge of #123678 - DianQK:docker-local, r=Kobzolbors-14/+17
Improve the experience of running Docker locally When running locally, the absence of the `GITHUB_STEP_SUMMARY` environment variable will lead to the following error: ``` ::endgroup:: ./src/ci/docker/run.sh: line 349: : No such file or directory ``` I've also changed the output artifacts directory to `obj/$image_name`, allowing me to easily run all images locally. We always encounter various strange issues when modifying the test cases in the `codegen` directory. r? Kobzol cc `@saethlin`
2024-04-16update `mingw-check` clippy invocationonur-ozkan-1/+1
Previously this command was linting compiler and library together. As we no longer run clippy on the entire tree unless it's explicitly requested, we need to update this command by adding `library` path. Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-04-16Change the output artifact path to `$root_dir/obj/$image` when running locallyDianQK-10/+11
2024-04-15Update how WASI toolchains are used in CI and bootstrapAlex Crichton-62/+7
This commit updates how the WASI targets are configured with their toolchain. Long ago a `config.toml` option of `wasi-root` was added to enable building with the WASI files produced by wasi-libc. Additionally for CI testing and release building the Rust toolchain has been using a hard-coded commit of wasi-libc which is bundled with the release of the `wasm32-wasip1` target, for example. Nowadays though the wasi-sdk project, the C/C++ toolchain for WASI, is the go-to solution for compiling/linking WASI code and contains the more-or-less official releases of wasi-libc. This commit migrates CI to using wasi-sdk releases and additionally updates `bootstrap` to recognize when this is configured. This means that with `$WASI_SDK_PATH` configured there's no further configuration necessary to get a working build. Notably this also works better for the new targets of WASI as well, such as `wasm32-wasip2` and `wasm32-wasip1-threads` where the wasi-sdk release now has libraries for all targets bundled within it.
2024-04-15Provide prebuilt std for gnullvm targetsMateusz Mikuła-1/+18
2024-04-15Auto merge of #123828 - cuviper:cargo-aarch64-gnu, r=Mark-Simulacrumbors-1/+3
ci: test cargo on `aarch64-gnu` Since `aarch64-unknown-linux-gnu` is a tier-1 target, we should also test cargo on it, especially since cargo's own CI doesn't cover this yet. This might have helped us discover #123733 sooner, which is not a cargo problem but was uncovered by a new cargo test (which we'll have to skip for now). Everything else passes in my local run, so at least we'll have a guard against future regressions.
2024-04-14Fix ENV quotes in aarch64-gnu/DockerfileJosh Stone-1/+1
Co-authored-by: Eric Huss <eric@huss.org>
2024-04-13Rollup merge of #123530 - 9names:build-rv32im, r=Mark-SimulacrumMatthias Krüger-0/+3
Enable building tier2 target riscv32im-unknown-none-elf riscv32im-unknown-none-elf was promoted to tier2 in https://github.com/rust-lang/rust/pull/117874 but it has not yet been added to the list of build targets. By adding riscv32im-unknown-none-elf to the list of build targets, this PR enables end-users to install this target via rustup.
2024-04-13Bump Fuchsia versionsErick Tryzelaar-6/+6
This updates the Fuchsia commit used in `auto - x86_64-gnu-integration` CI bot to use the Rust commit 703dc9ce64d9b31a239a7280d9b5f9ddd85ffed6. This should help improve the coverage of this builder. It also updates the SDK version to F20.20240412.3.1, and the Fuchsia Clang version to c777c011a709dffd4fa5e79cad7947b7c3405d02.
2024-04-11ci: test cargo on `aarch64-gnu`Josh Stone-1/+3
2024-04-09Only output to `GITHUB_STEP_SUMMARY` in a CI environmentDianQK-1/+3
2024-04-09Use `isCI` in `run.sh`DianQK-3/+3
2024-04-09Rollup merge of #123624 - GuillaumeGomez:theme-switch-tests, r=notriddleMatthias Krüger-13/+11
[rustdoc] [GUI tests] Make theme switching closer to reality Better to actually perform actions user do rather than only testing the change through local storage. As for `browser-ui-test` update: I updated `puppeteer` version (to `0.19.4`) and fixed a bug when displaying the file if it came from an `include`. r? `@notriddle`
2024-04-08Manually set cache directory path when running GUI testsGuillaume Gomez-12/+10
2024-04-08Update browser-ui-test version to 0.17.2Guillaume Gomez-1/+1
2024-04-07disable debug assertions to speed up the check-aux jobRalf Jung-0/+4
2024-04-06Auto merge of #123545 - matthiaskrgr:rollup-vyx8cfv, r=matthiaskrgrbors-4/+4
Rollup of 4 pull requests Successful merges: - #114788 (impl get_mut_or_init and get_mut_or_try_init for OnceCell and OnceLock) - #122291 (Stabilize `const_caller_location` and `const_location_fields`) - #123357 (CI: Redirect stderr to stdout to order GHA logs) - #123504 (bootstrap: split cargo-miri test into separate Step) r? `@ghost` `@rustbot` modify labels: rollup
2024-04-06Auto merge of #123321 - clubby789:cargo-uupdate, r=Mark-Simulacrumbors-2/+2
Bump dependencies Follow up for #123252 Unfortunately this file needs to be manually bumped when any dependencies are bumped in the main lockfile ``` Updating autocfg v1.1.0 -> v1.2.0 Updating chrono v0.4.35 -> v0.4.37 Updating clap v4.5.3 -> v4.5.4 Updating clap_derive v4.5.3 -> v4.5.4 Updating handlebars v5.1.0 -> v5.1.2 Updating itoa v1.0.10 -> v1.0.11 Updating memoffset v0.9.0 -> v0.9.1 Updating openssl-sys v0.9.101 -> v0.9.102 Updating pin-project-lite v0.2.13 -> v0.2.14 Updating r-efi v4.3.0 -> v4.4.0 Updating regex-syntax v0.8.2 -> v0.8.3 Updating security-framework v2.9.2 -> v2.10.0 Updating security-framework-sys v2.9.1 -> v2.10.0 Updating serde_json v1.0.114 -> v1.0.115 Updating syn v2.0.55 -> v2.0.57 Updating tokio v1.36.0 -> v1.37.0 ```
2024-04-06Add target riscv32im_unknown_none_elf to dist-various-19names-0/+3
2024-04-05bootstrap: split cargo-miri test into separate StepRalf Jung-4/+4
2024-04-05Auto merge of #123317 - RalfJung:test-in-miri, r=m-ou-se,saethlin,onur-ozkanbors-0/+5
Support running library tests in Miri This adds a new bootstrap subcommand `./x.py miri` which can test libraries in Miri. This is in preparation for eventually doing that as part of bors CI, but this PR only adds the infrastructure, and doesn't enable it yet. `@rust-lang/bootstrap` should this be `x.py test --miri library/core` or `x.py miri library/core`? The flag has the advantage that we don't have to copy all the arguments from `Subcommand::Test`. It has the disadvantage that most test steps just ignore `--miri` and still run tests the regular way. For clippy you went the route of making it a separate subcommand. ~~I went with a flag now as that seemed easier, but I can change this.~~ I made it a new subcommand. Note however that the regular cargo invocation would be `cargo miri test ...`, so `x.py` is still going to be different in that the `test` is omitted. That said, we could also make it `./x.py miri-test` to make that difference smaller -- that's in fact more consistent with the internal name of the command when bootstrap invokes cargo. `@rust-lang/libs` ~~unfortunately this PR does some unholy things to the `lib.rs` files of our library crates.~~ `@m-ou-se` found a way that entirely avoids library-level hacks, except for some new small `lib.miri.rs` files that hopefully you will never have to touch. There's a new hack in cargo-miri but there it is in good company...
2024-04-04Update browser-ui-test version to 0.17.1Guillaume Gomez-1/+1
2024-04-04smoke-test 'x.py test --miri' on CIRalf Jung-0/+5
2024-04-02Rollup merge of #123338 - GuillaumeGomez:update-browser-ui-test, r=notriddleGuillaume Gomez-1/+1
Update to new browser-ui-test version This new version brings a lot of new internal improvements (mostly around validating the commands input). It also improved some command names and arguments. r? `@notriddle`
2024-04-02Rollup merge of #122614 - notriddle:notriddle/search-desc, r=GuillaumeGomezGuillaume Gomez-1/+1
rustdoc-search: shard the search result descriptions ## Preview This makes no visual changes to rustdoc search. It's a pure perf improvement. <details><summary>old</summary> Preview: <http://notriddle.com/rustdoc-html-demo-10/doc/std/index.html?search=vec> WebPageTest Comparison with before branch on a sort of worst case (searching `vec`, winds up downloading most of the shards anyway): <https://www.webpagetest.org/video/compare.php?tests=240317_AiDc61_2EM,240317_AiDcM0_2EN> Waterfall diagram: ![image](https://github.com/rust-lang/rust/assets/1593513/39548f0c-7ad6-411b-abf8-f6668ff4da18) </details> Preview: <http://notriddle.com/rustdoc-html-demo-10/doc2/std/index.html?search=vec> WebPageTest Comparison with before branch on a sort of worst case (searching `vec`, winds up downloading most of the shards anyway): <https://www.webpagetest.org/video/compare.php?tests=240322_BiDcCH_13R,240322_AiDcJY_104> ![image](https://github.com/rust-lang/rust/assets/1593513/4be1f9ff-c3ff-4b96-8f5b-b264df2e662d) ## Description r? `@GuillaumeGomez` The descriptions are, on almost all crates[^1], the majority of the size of the search index, even though they aren't really used for searching. This makes it relatively easy to separate them into their own files. Additionally, this PR pulls out information about whether there's a description into a bitmap. This allows us to sort, truncate, *then* download. This PR also bumps us to ES8. Out of the browsers we support, all of them support async functions according to caniuse. https://caniuse.com/async-functions [^1]: <https://microsoft.github.io/windows-docs-rs/>, a crate with 44MiB of pure names and no descriptions for them, is an outlier and should not be counted. But this PR should improve it, by replacing a long line of empty strings with a compressed bitmap with a single Run section. Just not very much. ## Detailed sizes ```console $ cat test.sh set -ex cp ../search-index*.js search-index.js awk 'FNR==NR {a++;next} FNR<a-3' search-index.js{,} | awk 'NR>1 {gsub(/\],\\$/,""); gsub(/^\["[^"]+",/,""); print} {next}' | sed -E "s:\\\\':':g" > search-index.json jq -c '.t' search-index.json > t.json jq -c '.n' search-index.json > n.json jq -c '.q' search-index.json > q.json jq -c '.D' search-index.json > D.json jq -c '.e' search-index.json > e.json jq -c '.i' search-index.json > i.json jq -c '.f' search-index.json > f.json jq -c '.c' search-index.json > c.json jq -c '.p' search-index.json > p.json jq -c '.a' search-index.json > a.json du -hs t.json n.json q.json D.json e.json i.json f.json c.json p.json a.json $ bash test.sh + cp ../search-index1.78.0.js search-index.js + awk 'FNR==NR {a++;next} FNR<a-3' search-index.js search-index.js + awk 'NR>1 {gsub(/\],\\$/,""); gsub(/^\["[^"]+",/,""); print} {next}' + sed -E 's:\\'\'':'\'':g' + jq -c .t search-index.json + jq -c .n search-index.json + jq -c .q search-index.json + jq -c .D search-index.json + jq -c .e search-index.json + jq -c .i search-index.json + jq -c .f search-index.json + jq -c .c search-index.json + jq -c .p search-index.json + jq -c .a search-index.json + du -hs t.json n.json q.json D.json e.json i.json f.json c.json p.json a.json 64K t.json 800K n.json 8.0K q.json 4.0K D.json 16K e.json 192K i.json 544K f.json 4.0K c.json 36K p.json 20K a.json ``` These are, roughly, the size of each section in the standard library (this tool actually excludes libtest, for parsing-json-with-awk reasons, but libtest is tiny so it's probably not important). t = item type, like "struct", "free fn", or "type alias". Since one byte is used for every item, this implies that there are approximately 64 thousand items in the standard library. n = name, and that's now the largest section of the search index with the descriptions removed from it q = parent *module* path, stored parallel to the items within D = the size of each description shard, stored as vlq hex numbers e = empty description bit flags, stored as a roaring bitmap i = parent *type* index as a link into `p`, stored as decimal json numbers; used only for associated types; might want to switch to vlq hex, since that's shorter, but that would be a separate pr f = function signature, stored as lists of lists that index into `p` c = deprecation flag, stored as a roaring bitmap p = parent *type*, stored separately and linked into from `i` and `f` a = alias, as [[key, value]] pairs ## Search performance http://notriddle.com/rustdoc-html-demo-11/perf-shard/index.html For example, in stm32f4: <table><thead><tr><th>before<th>after</tr></thead> <tbody><tr><td> ``` Testing T -> U ... in_args = 0, returned = 0, others = 200 wall time = 617 Testing T, U ... in_args = 0, returned = 0, others = 200 wall time = 198 Testing T -> T ... in_args = 0, returned = 0, others = 200 wall time = 282 Testing crc32 ... in_args = 0, returned = 0, others = 0 wall time = 426 Testing spi::pac ... in_args = 0, returned = 0, others = 0 wall time = 673 ``` </td><td> ``` Testing T -> U ... in_args = 0, returned = 0, others = 200 wall time = 716 Testing T, U ... in_args = 0, returned = 0, others = 200 wall time = 207 Testing T -> T ... in_args = 0, returned = 0, others = 200 wall time = 289 Testing crc32 ... in_args = 0, returned = 0, others = 0 wall time = 418 Testing spi::pac ... in_args = 0, returned = 0, others = 0 wall time = 687 ``` </td></tr><tr><td> ``` user: 005.345 s sys: 002.955 s wall: 006.899 s child_RSS_high: 583664 KiB group_mem_high: 557876 KiB ``` </td><td> ``` user: 004.652 s sys: 000.565 s wall: 003.865 s child_RSS_high: 538696 KiB group_mem_high: 511724 KiB ``` </td></tr> </table> This perf tester is janky and unscientific enough that the apparent differences might just be noise. If it's not an order of magnitude, it's probably not real. ## Future possibilities * Currently, results are not shown until the descriptions are downloaded. Theoretically, the description-less results could be shown. But actually doing that, and making sure it works properly, would require extra work (we have to be careful to avoid layout jumps). * More than just descriptions can be sharded this way. But we have to be careful to make sure the size wins are worth the round trips. Ideally, data that’s needed only for display should be sharded while data needed for search isn’t. * [Full text search](https://internals.rust-lang.org/t/full-text-search-for-rustdoc-and-doc-rs/20427) also needs this kind of infrastructure. A good implementation might store a compressed bloom filter in the search index, then download the full keyword in shards. But, we have to be careful not just of the amount readers have to download, but also of the amount that [publishers](https://gist.github.com/notriddle/c289e77f3ed469d1c0238d1d135d49e1) have to store.
2024-04-01Rollup merge of #123330 - jfgoog:pass-backtrace, r=KobzolJubilee-0/+1
Pass RUST_BACKTRACE when running docker.