fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1FROM ubuntu:22.04 2 3ARG DEBIAN_FRONTEND=noninteractive 4RUN apt-get update && apt-get install -y --no-install-recommends \ 5 g++ \ 6 make \ 7 ninja-build \ 8 file \ 9 curl \ 10 ca-certificates \ 11 python3 \ 12 python3-pip \ 13 python3-pkg-resources \ 14 git \ 15 cmake \ 16 sudo \ 17 gdb \ 18 xz-utils \ 19 libssl-dev \ 20 pkg-config \ 21 mingw-w64 \ 22 && rm -rf /var/lib/apt/lists/* 23 24RUN curl -sL https://nodejs.org/dist/v16.9.0/node-v16.9.0-linux-x64.tar.xz | tar -xJ 25ENV PATH="/node-v16.9.0-linux-x64/bin:${PATH}" 26ENV RUST_CONFIGURE_ARGS="--set rust.validate-mir-opts=3" 27 28# Install es-check 29# Pin its version to prevent unrelated CI failures due to future es-check versions. 30RUN npm install es-check@6.1.1 eslint@8.6.0 -g 31 32COPY scripts/sccache.sh /scripts/ 33RUN sh /scripts/sccache.sh 34 35COPY host-x86_64/mingw-check/reuse-requirements.txt /tmp/ 36RUN pip3 install --no-deps --no-cache-dir --require-hashes -r /tmp/reuse-requirements.txt 37 38COPY host-x86_64/mingw-check/validate-toolstate.sh /scripts/ 39COPY host-x86_64/mingw-check/validate-error-codes.sh /scripts/ 40 41ENV RUN_CHECK_WITH_PARALLEL_QUERIES 1 42ENV SCRIPT python3 ../x.py --stage 2 test src/tools/expand-yaml-anchors && \ 43 python3 ../x.py check --target=i686-pc-windows-gnu --host=i686-pc-windows-gnu && \ 44 python3 ../x.py build --stage 0 src/tools/build-manifest && \ 45 python3 ../x.py test --stage 0 src/tools/compiletest && \ 46 python3 ../x.py test --stage 0 core alloc std test proc_macro && \ 47 # Build both public and internal documentation. 48 RUSTDOCFLAGS=\"--document-private-items --document-hidden-items\" python3 ../x.py doc --stage 0 library && \ 49 mkdir -p /checkout/obj/staging/doc && \ 50 cp -r build/x86_64-unknown-linux-gnu/doc /checkout/obj/staging && \ 51 RUSTDOCFLAGS=\"--document-private-items --document-hidden-items\" python3 ../x.py doc --stage 0 compiler && \ 52 RUSTDOCFLAGS=\"--document-private-items --document-hidden-items\" python3 ../x.py doc --stage 0 library/test && \ 53 /scripts/validate-toolstate.sh && \ 54 /scripts/validate-error-codes.sh && \ 55 reuse lint && \ 56 # Runs checks to ensure that there are no ES5 issues in our JS code. 57 es-check es6 ../src/librustdoc/html/static/js/*.js && \ 58 eslint -c ../src/librustdoc/html/static/.eslintrc.js ../src/librustdoc/html/static/js/*.js && \ 59 eslint -c ../src/tools/rustdoc-js/.eslintrc.js ../src/tools/rustdoc-js/tester.js && \ 60 eslint -c ../src/tools/rustdoc-gui/.eslintrc.js ../src/tools/rustdoc-gui/tester.js