Skip to content

Commit ad48c10

Browse files
committed
Auto merge of #107044 - cuviper:more-llvm-ci, r=Mark-Simulacrum
ci: add runners for vanilla LLVM 14 and 15 As discussed in [zulip #t-infra][1] -- r? Mark-Simulacrum [1]: https://rust-lang.zulipchat.com/#narrow/stream/242791-t-infra/topic/testing.20multiple.20llvm.20versions
2 parents d3322e2 + 318d77d commit ad48c10

File tree

4 files changed

+152
-0
lines changed

4 files changed

+152
-0
lines changed

.github/workflows/ci.yml

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

src/ci/github-actions/ci.yml

+10
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,16 @@ jobs:
450450
- name: x86_64-gnu-distcheck
451451
<<: *job-linux-xl
452452

453+
- name: x86_64-gnu-llvm-15
454+
env:
455+
RUST_BACKTRACE: 1
456+
<<: *job-linux-xl
457+
458+
- name: x86_64-gnu-llvm-14
459+
env:
460+
RUST_BACKTRACE: 1
461+
<<: *job-linux-xl
462+
453463
- name: x86_64-gnu-llvm-13
454464
env:
455465
RUST_BACKTRACE: 1

0 commit comments

Comments
 (0)