Skip to content

Commit 87c8c83

Browse files
committed
Auto merge of #112779 - Kobzol:ci-merge-llvm-14, r=pietroalbini
CI: merge x86_64-gnu-llvm-14 and x86_64-gnu-llvm-14-stage1 CI jobs Another attempt to shorten CI job times. Suggested by `@the8472` [here](https://rust-lang.zulipchat.com/#narrow/stream/242791-t-infra/topic/CI.20usage/near/367172221).
2 parents c4c84df + 0c147d5 commit 87c8c83

File tree

7 files changed

+41
-80
lines changed

7 files changed

+41
-80
lines changed

.github/workflows/ci.yml

+1-4
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ jobs:
3737
pr:
3838
name: "PR - ${{ matrix.name }}"
3939
env:
40+
PR_CI_JOB: 1
4041
CI_JOB_NAME: "${{ matrix.name }}"
4142
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
4243
HEAD_SHA: "${{ github.event.pull_request.head.sha || github.sha }}"
@@ -296,10 +297,6 @@ jobs:
296297
env:
297298
RUST_BACKTRACE: 1
298299
os: ubuntu-20.04-8core-32gb
299-
- name: x86_64-gnu-llvm-14-stage1
300-
env:
301-
RUST_BACKTRACE: 1
302-
os: ubuntu-20.04-8core-32gb
303300
- name: x86_64-gnu-nopt
304301
os: ubuntu-20.04-4core-16gb
305302
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 -ex
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
@@ -263,6 +263,7 @@ docker \
263263
--env CI_JOB_NAME="${CI_JOB_NAME-$IMAGE}" \
264264
--env BASE_COMMIT="$BASE_COMMIT" \
265265
--env DIST_TRY_BUILD \
266+
--env PR_CI_JOB \
266267
--init \
267268
--rm \
268269
rust-ci \

src/ci/github-actions/ci.yml

+1-5
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,7 @@ jobs:
311311
name: PR - ${{ matrix.name }}
312312
env:
313313
<<: [*shared-ci-variables, *public-variables]
314+
PR_CI_JOB: 1
314315
if: github.event_name == 'pull_request'
315316
continue-on-error: ${{ matrix.name == 'mingw-check-tidy' }}
316317
strategy:
@@ -473,11 +474,6 @@ jobs:
473474
RUST_BACKTRACE: 1
474475
<<: *job-linux-8c
475476

476-
- name: x86_64-gnu-llvm-14-stage1
477-
env:
478-
RUST_BACKTRACE: 1
479-
<<: *job-linux-8c
480-
481477
- name: x86_64-gnu-nopt
482478
<<: *job-linux-4c
483479

src/ci/run.sh

+1
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,7 @@ else
188188
fi
189189

190190
if [ ! -z "$SCRIPT" ]; then
191+
echo "Executing ${SCRIPT}"
191192
sh -x -c "$SCRIPT"
192193
else
193194
do_make() {

0 commit comments

Comments
 (0)