From 2ead65f0023825417f4d82d2e740bc43ee1f3749 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Mon, 15 Aug 2022 18:04:01 -0700 Subject: [PATCH 1/6] ci: Upgrade non-dist Linux testers from 16.04 to 22.04 --- src/ci/docker/host-x86_64/i686-gnu-nopt/Dockerfile | 13 +++---------- src/ci/docker/host-x86_64/i686-gnu/Dockerfile | 12 +++--------- src/ci/docker/host-x86_64/x86_64-gnu-aux/Dockerfile | 13 +++---------- .../host-x86_64/x86_64-gnu-distcheck/Dockerfile | 12 ++++-------- .../docker/host-x86_64/x86_64-gnu-tools/Dockerfile | 12 +++--------- 5 files changed, 16 insertions(+), 46 deletions(-) diff --git a/src/ci/docker/host-x86_64/i686-gnu-nopt/Dockerfile b/src/ci/docker/host-x86_64/i686-gnu-nopt/Dockerfile index 71ea13071bd1f..dd74726f85691 100644 --- a/src/ci/docker/host-x86_64/i686-gnu-nopt/Dockerfile +++ b/src/ci/docker/host-x86_64/i686-gnu-nopt/Dockerfile @@ -1,5 +1,6 @@ -FROM ubuntu:16.04 +FROM ubuntu:22.04 +ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install -y --no-install-recommends \ g++-multilib \ make \ @@ -20,18 +21,10 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ COPY scripts/sccache.sh /scripts/ RUN sh /scripts/sccache.sh -COPY scripts/cmake.sh /scripts/ -RUN /scripts/cmake.sh - RUN mkdir -p /config RUN echo "[rust]" > /config/nopt-std-config.toml RUN echo "optimize = false" >> /config/nopt-std-config.toml -# We are intentionally allowing an old toolchain on this builder (and that's -# incompatible with LLVM downloads today). -ENV NO_DOWNLOAD_CI_LLVM 1 - -ENV RUST_CONFIGURE_ARGS --build=i686-unknown-linux-gnu --disable-optimize-tests \ - --set llvm.allow-old-toolchain +ENV RUST_CONFIGURE_ARGS --build=i686-unknown-linux-gnu --disable-optimize-tests ENV SCRIPT python3 ../x.py test --stage 0 --config /config/nopt-std-config.toml library/std \ && python3 ../x.py --stage 2 test diff --git a/src/ci/docker/host-x86_64/i686-gnu/Dockerfile b/src/ci/docker/host-x86_64/i686-gnu/Dockerfile index ebeab3dbdb799..0c36cfd66bdef 100644 --- a/src/ci/docker/host-x86_64/i686-gnu/Dockerfile +++ b/src/ci/docker/host-x86_64/i686-gnu/Dockerfile @@ -1,5 +1,6 @@ -FROM ubuntu:16.04 +FROM ubuntu:22.04 +ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install -y --no-install-recommends \ g++-multilib \ make \ @@ -20,14 +21,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ COPY scripts/sccache.sh /scripts/ RUN sh /scripts/sccache.sh -COPY scripts/cmake.sh /scripts/ -RUN /scripts/cmake.sh - -# We are intentionally allowing an old toolchain on this builder (and that's -# incompatible with LLVM downloads today). -ENV NO_DOWNLOAD_CI_LLVM 1 -ENV RUST_CONFIGURE_ARGS --build=i686-unknown-linux-gnu \ - --set llvm.allow-old-toolchain +ENV RUST_CONFIGURE_ARGS --build=i686-unknown-linux-gnu # Exclude some tests that are unlikely to be platform specific, to speed up # this slow job. ENV SCRIPT python3 ../x.py --stage 2 test \ diff --git a/src/ci/docker/host-x86_64/x86_64-gnu-aux/Dockerfile b/src/ci/docker/host-x86_64/x86_64-gnu-aux/Dockerfile index 321b3d6ace486..d55d5b56ad3f5 100644 --- a/src/ci/docker/host-x86_64/x86_64-gnu-aux/Dockerfile +++ b/src/ci/docker/host-x86_64/x86_64-gnu-aux/Dockerfile @@ -1,5 +1,6 @@ -FROM ubuntu:16.04 +FROM ubuntu:22.04 +ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install -y --no-install-recommends \ g++ \ make \ @@ -23,13 +24,5 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ COPY scripts/sccache.sh /scripts/ RUN sh /scripts/sccache.sh -COPY scripts/cmake.sh /scripts/ -RUN /scripts/cmake.sh - -# We are intentionally allowing an old toolchain on this builder (and that's -# incompatible with LLVM downloads today). -ENV NO_DOWNLOAD_CI_LLVM 1 - -ENV RUST_CONFIGURE_ARGS --build=x86_64-unknown-linux-gnu \ - --set llvm.allow-old-toolchain +ENV RUST_CONFIGURE_ARGS --build=x86_64-unknown-linux-gnu ENV RUST_CHECK_TARGET check-aux diff --git a/src/ci/docker/host-x86_64/x86_64-gnu-distcheck/Dockerfile b/src/ci/docker/host-x86_64/x86_64-gnu-distcheck/Dockerfile index be4def85f14c4..80a004501a81b 100644 --- a/src/ci/docker/host-x86_64/x86_64-gnu-distcheck/Dockerfile +++ b/src/ci/docker/host-x86_64/x86_64-gnu-distcheck/Dockerfile @@ -1,5 +1,6 @@ -FROM ubuntu:16.04 +FROM ubuntu:22.04 +ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install -y --no-install-recommends \ g++ \ make \ @@ -19,14 +20,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ COPY scripts/sccache.sh /scripts/ RUN sh /scripts/sccache.sh -COPY scripts/cmake.sh /scripts/ -RUN /scripts/cmake.sh - -# We are intentionally allowing an old toolchain on this builder (and that's -# incompatible with LLVM downloads today). +# We are disabling CI LLVM since distcheck is an offline build. ENV NO_DOWNLOAD_CI_LLVM 1 -ENV RUST_CONFIGURE_ARGS --build=x86_64-unknown-linux-gnu --set rust.ignore-git=false \ - --set llvm.allow-old-toolchain +ENV RUST_CONFIGURE_ARGS --build=x86_64-unknown-linux-gnu --set rust.ignore-git=false ENV SCRIPT python3 ../x.py --stage 2 test distcheck ENV DIST_SRC 1 diff --git a/src/ci/docker/host-x86_64/x86_64-gnu-tools/Dockerfile b/src/ci/docker/host-x86_64/x86_64-gnu-tools/Dockerfile index e2ec4f275001b..ca23198cf90d3 100644 --- a/src/ci/docker/host-x86_64/x86_64-gnu-tools/Dockerfile +++ b/src/ci/docker/host-x86_64/x86_64-gnu-tools/Dockerfile @@ -1,5 +1,6 @@ -FROM ubuntu:16.04 +FROM ubuntu:22.04 +ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install -y --no-install-recommends \ g++ \ make \ @@ -27,6 +28,7 @@ RUN apt-get install -y \ libdbus-1-3 \ libexpat1 \ libfontconfig1 \ + libgbm1 \ libgcc1 \ libgconf-2-4 \ libgdk-pixbuf2.0-0 \ @@ -59,9 +61,6 @@ RUN apt-get install -y \ COPY scripts/sccache.sh /scripts/ RUN sh /scripts/sccache.sh -COPY scripts/cmake.sh /scripts/ -RUN /scripts/cmake.sh - COPY host-x86_64/x86_64-gnu-tools/checktools.sh /tmp/ RUN curl -sL https://nodejs.org/dist/v14.4.0/node-v14.4.0-linux-x64.tar.xz | tar -xJ @@ -80,12 +79,7 @@ COPY host-x86_64/x86_64-gnu-tools/browser-ui-test.version /tmp/ # the local version of the package is different than the one used by the CI. RUN npm install -g browser-ui-test@$(head -n 1 /tmp/browser-ui-test.version) --unsafe-perm=true -# We are intentionally allowing an old toolchain on this builder (and that's -# incompatible with LLVM downloads today). -ENV NO_DOWNLOAD_CI_LLVM 1 - ENV RUST_CONFIGURE_ARGS \ - --set llvm.allow-old-toolchain \ --build=x86_64-unknown-linux-gnu \ --save-toolstates=/tmp/toolstate/toolstates.json From d3f2d0cae0c8b19c7036d068b805832be8b163cb Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Tue, 16 Aug 2022 11:52:43 -0700 Subject: [PATCH 2/6] rustbuild: fix version parsing for browser-ui-test --- src/bootstrap/test.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs index baad0c75295a5..242ad98813d7f 100644 --- a/src/bootstrap/test.rs +++ b/src/bootstrap/test.rs @@ -905,7 +905,10 @@ fn get_browser_ui_test_version_inner(npm: &Path, global: bool) -> Option .output() .map(|output| String::from_utf8_lossy(&output.stdout).into_owned()) .unwrap_or(String::new()); - lines.lines().find_map(|l| l.split(":browser-ui-test@").skip(1).next()).map(|v| v.to_owned()) + lines + .lines() + .find_map(|l| l.split(':').nth(1)?.strip_prefix("browser-ui-test@")) + .map(|v| v.to_owned()) } fn get_browser_ui_test_version(npm: &Path) -> Option { From 6d7083227c950f0dfdcca48c4ea19359d74c1a44 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Wed, 17 Aug 2022 09:55:23 -0700 Subject: [PATCH 3/6] ci: Test rustdoc-gui with --no-sandbox --- src/ci/docker/host-x86_64/x86_64-gnu-tools/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ci/docker/host-x86_64/x86_64-gnu-tools/Dockerfile b/src/ci/docker/host-x86_64/x86_64-gnu-tools/Dockerfile index ca23198cf90d3..e8fd9a20288a7 100644 --- a/src/ci/docker/host-x86_64/x86_64-gnu-tools/Dockerfile +++ b/src/ci/docker/host-x86_64/x86_64-gnu-tools/Dockerfile @@ -84,4 +84,4 @@ ENV RUST_CONFIGURE_ARGS \ --save-toolstates=/tmp/toolstate/toolstates.json ENV SCRIPT /tmp/checktools.sh ../x.py && \ - NODE_PATH=`npm root -g` python3 ../x.py test src/test/rustdoc-gui --stage 2 + NODE_PATH=`npm root -g` python3 ../x.py test src/test/rustdoc-gui --stage 2 --test-args --no-sandbox From 2fd82bbfe54ebd9c177153b4033062e41196beb8 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Tue, 23 Aug 2022 10:34:54 -0700 Subject: [PATCH 4/6] ci: upgrade Node.js in x86_64-gnu-tools --- src/ci/docker/host-x86_64/x86_64-gnu-tools/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ci/docker/host-x86_64/x86_64-gnu-tools/Dockerfile b/src/ci/docker/host-x86_64/x86_64-gnu-tools/Dockerfile index e8fd9a20288a7..6e4a93bc5bd71 100644 --- a/src/ci/docker/host-x86_64/x86_64-gnu-tools/Dockerfile +++ b/src/ci/docker/host-x86_64/x86_64-gnu-tools/Dockerfile @@ -63,8 +63,8 @@ RUN sh /scripts/sccache.sh COPY host-x86_64/x86_64-gnu-tools/checktools.sh /tmp/ -RUN curl -sL https://nodejs.org/dist/v14.4.0/node-v14.4.0-linux-x64.tar.xz | tar -xJ -ENV NODE_FOLDER=/node-v14.4.0-linux-x64/bin +RUN curl -sL https://nodejs.org/dist/v14.20.0/node-v14.20.0-linux-x64.tar.xz | tar -xJ +ENV NODE_FOLDER=/node-v14.20.0-linux-x64/bin ENV PATH="$NODE_FOLDER:${PATH}" COPY host-x86_64/x86_64-gnu-tools/browser-ui-test.version /tmp/ From 4a5082e91e4aa17c8ed5f628d2c8a17fdbbde1d5 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Tue, 23 Aug 2022 10:36:46 -0700 Subject: [PATCH 5/6] ci: Test rustdoc-gui with --jobs 1 --- src/ci/docker/host-x86_64/x86_64-gnu-tools/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ci/docker/host-x86_64/x86_64-gnu-tools/Dockerfile b/src/ci/docker/host-x86_64/x86_64-gnu-tools/Dockerfile index 6e4a93bc5bd71..4350ca205862c 100644 --- a/src/ci/docker/host-x86_64/x86_64-gnu-tools/Dockerfile +++ b/src/ci/docker/host-x86_64/x86_64-gnu-tools/Dockerfile @@ -84,4 +84,5 @@ ENV RUST_CONFIGURE_ARGS \ --save-toolstates=/tmp/toolstate/toolstates.json ENV SCRIPT /tmp/checktools.sh ../x.py && \ - NODE_PATH=`npm root -g` python3 ../x.py test src/test/rustdoc-gui --stage 2 --test-args --no-sandbox + NODE_PATH=`npm root -g` python3 ../x.py test src/test/rustdoc-gui --stage 2 \ + --test-args "'--no-sandbox --jobs 1'" From b96cde7cba8927ee75de2ad888c4089d99837e41 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Tue, 23 Aug 2022 10:37:30 -0700 Subject: [PATCH 6/6] test: bump the mobile width in rustdoc-gui/type-declation-overflow.goml --- src/test/rustdoc-gui/type-declation-overflow.goml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/rustdoc-gui/type-declation-overflow.goml b/src/test/rustdoc-gui/type-declation-overflow.goml index 22212a31728dc..85e03c45e700e 100644 --- a/src/test/rustdoc-gui/type-declation-overflow.goml +++ b/src/test/rustdoc-gui/type-declation-overflow.goml @@ -32,6 +32,6 @@ assert-property: (".item-decl pre", {"scrollWidth": "950"}) size: (600, 600) goto: file://|DOC_PATH|/lib2/too_long/struct.SuperIncrediblyLongLongLongLongLongLongLongGigaGigaGigaMegaLongLongLongStructName.html // It shouldn't have an overflow in the topbar either. -assert-property: (".mobile-topbar .location", {"scrollWidth": "492"}) -assert-property: (".mobile-topbar .location", {"clientWidth": "492"}) +assert-property: (".mobile-topbar .location", {"scrollWidth": "502"}) +assert-property: (".mobile-topbar .location", {"clientWidth": "502"}) assert-css: (".mobile-topbar .location", {"overflow-x": "hidden"})