3 ARG DEBIAN_FRONTEND=noninteractive
5 # NOTE: intentionally installs both python2 and python3 so we can test support for both.
6 RUN apt-get update && apt-get install -y --no-install-recommends \
29 # Install powershell so we can test x.ps1 on Linux
30 apt-transport-https software-properties-common && \
31 curl -s "https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/packages-microsoft-prod.deb" > packages-microsoft-prod.deb && \
32 dpkg -i packages-microsoft-prod.deb && \
34 apt-get install -y powershell \
35 && rm -rf /var/lib/apt/lists/*
37 COPY scripts/sccache.sh /scripts/
38 RUN sh /scripts/sccache.sh
40 # We are disabling CI LLVM since this builder is intentionally using a host
41 # LLVM, rather than the typical src/llvm-project LLVM.
42 ENV NO_DOWNLOAD_CI_LLVM 1
44 # Using llvm-link-shared due to libffi issues -- see #34486
45 ENV RUST_CONFIGURE_ARGS \
46 --build=x86_64-unknown-linux-gnu \
47 --llvm-root=/usr/lib/llvm-13 \
48 --enable-llvm-link-shared \
49 --set rust.thin-lto-import-instr-limit=10
51 # NOTE: intentionally uses all of `x.py`, `x`, and `x.ps1` to make sure they all work on Linux.
52 ENV SCRIPT ../x.py --stage 2 test --exclude src/tools/tidy && \
53 # Run the `mir-opt` tests again but this time for a 32-bit target.
54 # This enforces that tests using `// EMIT_MIR_FOR_EACH_BIT_WIDTH` have
55 # both 32-bit and 64-bit outputs updated by the PR author, before
56 # the PR is approved and tested for merging.
57 # It will also detect tests lacking `// EMIT_MIR_FOR_EACH_BIT_WIDTH`,
58 # despite having different output on 32-bit vs 64-bit targets.
59 ../x --stage 2 test src/test/mir-opt \
60 --host='' --target=i686-unknown-linux-gnu && \
61 # Run the UI test suite again, but in `--pass=check` mode
63 # This is intended to make sure that both `--pass=check` continues to
66 ../x.ps1 --stage 2 test src/test/ui --pass=check \
67 --host='' --target=i686-unknown-linux-gnu && \
68 # Run tidy at the very end, after all the other tests.
69 python2.7 ../x.py --stage 2 test src/tools/tidy