|
| 1 | +FROM ubuntu:23.04 |
| 2 | + |
| 3 | +ARG DEBIAN_FRONTEND=noninteractive |
| 4 | + |
| 5 | +RUN apt-get update && apt-get install -y --no-install-recommends \ |
| 6 | + g++ \ |
| 7 | + gcc-multilib \ |
| 8 | + make \ |
| 9 | + ninja-build \ |
| 10 | + file \ |
| 11 | + curl \ |
| 12 | + ca-certificates \ |
| 13 | + python3 \ |
| 14 | + git \ |
| 15 | + cmake \ |
| 16 | + sudo \ |
| 17 | + gdb \ |
| 18 | + llvm-16-tools \ |
| 19 | + llvm-16-dev \ |
| 20 | + libedit-dev \ |
| 21 | + libssl-dev \ |
| 22 | + pkg-config \ |
| 23 | + zlib1g-dev \ |
| 24 | + xz-utils \ |
| 25 | + nodejs \ |
| 26 | + mingw-w64 \ |
| 27 | + && rm -rf /var/lib/apt/lists/* |
| 28 | + |
| 29 | +# Install powershell (universal package) so we can test x.ps1 on Linux |
| 30 | +RUN curl -sL "https://github.com/PowerShell/PowerShell/releases/download/v7.3.1/powershell_7.3.1-1.deb_amd64.deb" > powershell.deb && \ |
| 31 | + dpkg -i powershell.deb && \ |
| 32 | + rm -f powershell.deb |
| 33 | + |
| 34 | +COPY scripts/sccache.sh /scripts/ |
| 35 | +RUN sh /scripts/sccache.sh |
| 36 | + |
| 37 | +# We are disabling CI LLVM since this builder is intentionally using a host |
| 38 | +# LLVM, rather than the typical src/llvm-project LLVM. |
| 39 | +ENV NO_DOWNLOAD_CI_LLVM 1 |
| 40 | + |
| 41 | +# Using llvm-link-shared due to libffi issues -- see #34486 |
| 42 | +ENV RUST_CONFIGURE_ARGS \ |
| 43 | + --build=x86_64-unknown-linux-gnu \ |
| 44 | + --llvm-root=/usr/lib/llvm-16 \ |
| 45 | + --enable-llvm-link-shared \ |
| 46 | + --set rust.thin-lto-import-instr-limit=10 |
| 47 | + |
| 48 | +# NOTE: intentionally uses all of `x.py`, `x`, and `x.ps1` to make sure they all work on Linux. |
| 49 | +ENV SCRIPT ../x.py --stage 2 test --exclude src/tools/tidy && \ |
| 50 | + # Run the `mir-opt` tests again but this time for a 32-bit target. |
| 51 | + # This enforces that tests using `// EMIT_MIR_FOR_EACH_BIT_WIDTH` have |
| 52 | + # both 32-bit and 64-bit outputs updated by the PR author, before |
| 53 | + # the PR is approved and tested for merging. |
| 54 | + # It will also detect tests lacking `// EMIT_MIR_FOR_EACH_BIT_WIDTH`, |
| 55 | + # despite having different output on 32-bit vs 64-bit targets. |
| 56 | + ../x --stage 2 test tests/mir-opt \ |
| 57 | + --host='' --target=i686-unknown-linux-gnu && \ |
| 58 | + # Run the UI test suite again, but in `--pass=check` mode |
| 59 | + # |
| 60 | + # This is intended to make sure that both `--pass=check` continues to |
| 61 | + # work. |
| 62 | + # |
| 63 | + ../x.ps1 --stage 2 test tests/ui --pass=check \ |
| 64 | + --host='' --target=i686-unknown-linux-gnu |
0 commit comments