Skip to content

Commit 1dba972

Browse files
committed
CI: merge x86_64-gnu-llvm-14 and x86_64-gnu-llvm-14-stage1 CI jobs
1 parent f90d57d commit 1dba972

File tree

6 files changed

+40
-80
lines changed

6 files changed

+40
-80
lines changed

.github/workflows/ci.yml

+1-4
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ jobs:
3636
actions: write
3737
name: "PR - ${{ matrix.name }}"
3838
env:
39+
PR_CI_JOB: 1
3940
CI_JOB_NAME: "${{ matrix.name }}"
4041
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
4142
HEAD_SHA: "${{ github.event.pull_request.head.sha || github.sha }}"
@@ -314,10 +315,6 @@ jobs:
314315
env:
315316
RUST_BACKTRACE: 1
316317
os: ubuntu-20.04-8core-32gb
317-
- name: x86_64-gnu-llvm-14-stage1
318-
env:
319-
RUST_BACKTRACE: 1
320-
os: ubuntu-20.04-8core-32gb
321318
- name: x86_64-gnu-nopt
322319
os: ubuntu-20.04-4core-16gb
323320
env: {}

src/ci/docker/host-x86_64/x86_64-gnu-llvm-14-stage1/Dockerfile

-54
This file was deleted.

src/ci/docker/host-x86_64/x86_64-gnu-llvm-14/Dockerfile

+3-17
Original file line numberDiff line numberDiff line change
@@ -49,20 +49,6 @@ ENV RUST_CONFIGURE_ARGS \
4949
--enable-llvm-link-shared \
5050
--set rust.thin-lto-import-instr-limit=10
5151

52-
# NOTE: intentionally uses all of `x.py`, `x`, and `x.ps1` to make sure they all work on Linux.
53-
ENV SCRIPT ../x.py --stage 2 test --exclude src/tools/tidy && \
54-
# Run the `mir-opt` tests again but this time for a 32-bit target.
55-
# This enforces that tests using `// EMIT_MIR_FOR_EACH_BIT_WIDTH` have
56-
# both 32-bit and 64-bit outputs updated by the PR author, before
57-
# the PR is approved and tested for merging.
58-
# It will also detect tests lacking `// EMIT_MIR_FOR_EACH_BIT_WIDTH`,
59-
# despite having different output on 32-bit vs 64-bit targets.
60-
../x --stage 2 test tests/mir-opt \
61-
--host='' --target=i686-unknown-linux-gnu && \
62-
# Run the UI test suite again, but in `--pass=check` mode
63-
#
64-
# This is intended to make sure that both `--pass=check` continues to
65-
# work.
66-
#
67-
../x.ps1 --stage 2 test tests/ui --pass=check \
68-
--host='' --target=i686-unknown-linux-gnu
52+
COPY host-x86_64/x86_64-gnu-llvm-14/script.sh /tmp/
53+
54+
ENV SCRIPT /tmp/script.sh
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
# Only run the stage 1 tests on merges, not on PR CI jobs.
6+
if [[ -z "${PR_CI_JOB}" ]]; then
7+
../x.py --stage 1 test --exclude src/tools/tidy && \
8+
# Run the `mir-opt` tests again but this time for a 32-bit target.
9+
# This enforces that tests using `// EMIT_MIR_FOR_EACH_BIT_WIDTH` have
10+
# both 32-bit and 64-bit outputs updated by the PR author, before
11+
# the PR is approved and tested for merging.
12+
# It will also detect tests lacking `// EMIT_MIR_FOR_EACH_BIT_WIDTH`,
13+
# despite having different output on 32-bit vs 64-bit targets.
14+
../x.py --stage 1 test tests/mir-opt \
15+
--host='' --target=i686-unknown-linux-gnu
16+
fi
17+
18+
# NOTE: intentionally uses all of `x.py`, `x`, and `x.ps1` to make sure they all work on Linux.
19+
../x.py --stage 2 test --exclude src/tools/tidy && \
20+
# Run the `mir-opt` tests again but this time for a 32-bit target.
21+
# This enforces that tests using `// EMIT_MIR_FOR_EACH_BIT_WIDTH` have
22+
# both 32-bit and 64-bit outputs updated by the PR author, before
23+
# the PR is approved and tested for merging.
24+
# It will also detect tests lacking `// EMIT_MIR_FOR_EACH_BIT_WIDTH`,
25+
# despite having different output on 32-bit vs 64-bit targets.
26+
../x --stage 2 test tests/mir-opt \
27+
--host='' --target=i686-unknown-linux-gnu && \
28+
# Run the UI test suite again, but in `--pass=check` mode
29+
#
30+
# This is intended to make sure that both `--pass=check` continues to
31+
# work.
32+
#
33+
../x.ps1 --stage 2 test tests/ui --pass=check \
34+
--host='' --target=i686-unknown-linux-gnu

src/ci/docker/run.sh

+1
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,7 @@ docker \
265265
--env CI_JOB_NAME="${CI_JOB_NAME-$IMAGE}" \
266266
--env BASE_COMMIT="$BASE_COMMIT" \
267267
--env DIST_TRY_BUILD \
268+
--env PR_CI_JOB \
268269
--init \
269270
--rm \
270271
rust-ci \

src/ci/github-actions/ci.yml

+1-5
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,7 @@ jobs:
313313
name: PR - ${{ matrix.name }}
314314
env:
315315
<<: [*shared-ci-variables, *public-variables]
316+
PR_CI_JOB: 1
316317
if: github.event_name == 'pull_request'
317318
continue-on-error: ${{ matrix.name == 'mingw-check-tidy' }}
318319
strategy:
@@ -489,11 +490,6 @@ jobs:
489490
RUST_BACKTRACE: 1
490491
<<: *job-linux-8c
491492

492-
- name: x86_64-gnu-llvm-14-stage1
493-
env:
494-
RUST_BACKTRACE: 1
495-
<<: *job-linux-8c
496-
497493
- name: x86_64-gnu-nopt
498494
<<: *job-linux-4c
499495

0 commit comments

Comments
 (0)