Skip to content

Commit 2248a23

Browse files
committed
[don't merge] see how much time we save when running --stage 1 in CI
1 parent c396bb3 commit 2248a23

File tree

3 files changed

+65
-0
lines changed

3 files changed

+65
-0
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ jobs:
4646
- name: x86_64-gnu-llvm-12
4747
os: ubuntu-20.04-xl
4848
env: {}
49+
- name: x86_64-gnu-llvm-12-stage1
50+
os: ubuntu-20.04-xl
51+
env: {}
4952
- name: x86_64-gnu-tools
5053
env:
5154
CI_ONLY_WHEN_SUBMODULES_CHANGED: 1
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
FROM ubuntu:20.04
2+
3+
ARG DEBIAN_FRONTEND=noninteractive
4+
RUN apt-get update && apt-get install -y --no-install-recommends \
5+
g++ \
6+
gcc-multilib \
7+
make \
8+
ninja-build \
9+
file \
10+
curl \
11+
ca-certificates \
12+
python2.7 \
13+
git \
14+
cmake \
15+
sudo \
16+
gdb \
17+
llvm-12-tools \
18+
llvm-12-dev \
19+
libedit-dev \
20+
libssl-dev \
21+
pkg-config \
22+
zlib1g-dev \
23+
xz-utils \
24+
nodejs
25+
26+
COPY scripts/sccache.sh /scripts/
27+
RUN sh /scripts/sccache.sh
28+
29+
# using llvm-link-shared due to libffi issues -- see #34486
30+
ENV RUST_CONFIGURE_ARGS \
31+
--build=x86_64-unknown-linux-gnu \
32+
--llvm-root=/usr/lib/llvm-12 \
33+
--enable-llvm-link-shared \
34+
--set rust.thin-lto-import-instr-limit=10
35+
36+
# Some tests use --stage 1 to mean "build using stage1" and some using it to mean "run using stage 1".
37+
# Until we straighten that out, special-case the ones that mean "build with stage1".
38+
ENV SCRIPT python2.7 ../x.py test --exclude run-make-fulldeps --exclude error_index_generator \
39+
--exclude linkchecker --stage 1 --exclude src/tools/rustdoc --exclude rustdoc-json-types \
40+
--exclude tidy --exclude ui-fulldeps && \
41+
# Intentionally excludes *-fulldeps, error-index, and linkchecker tests, which aren't guaranteed to work in stage 1.
42+
python2.7 ../x.py test --stage 0 src/tools/rustdoc rustdoc-json-types && \
43+
# Run the `mir-opt` tests again but this time for a 32-bit target.
44+
# This enforces that tests using `// EMIT_MIR_FOR_EACH_BIT_WIDTH` have
45+
# both 32-bit and 64-bit outputs updated by the PR author, before
46+
# the PR is approved and tested for merging.
47+
# It will also detect tests lacking `// EMIT_MIR_FOR_EACH_BIT_WIDTH`,
48+
# despite having different output on 32-bit vs 64-bit targets.
49+
python2.7 ../x.py --stage 1 test src/test/mir-opt \
50+
--host='' --target=i686-unknown-linux-gnu && \
51+
# Run the UI test suite again, but in `--pass=check` mode
52+
#
53+
# This is intended to make sure that both `--pass=check` continues to
54+
# work.
55+
#
56+
python2.7 ../x.py --stage 1 test src/test/ui --pass=check \
57+
--host='' --target=i686-unknown-linux-gnu && \
58+
# Run tidy at the very end, after all the other tests.
59+
python2.7 ../x.py --stage 1 test src/tools/tidy

src/ci/github-actions/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,9 @@ jobs:
287287
- name: x86_64-gnu-llvm-12
288288
<<: *job-linux-xl
289289

290+
- name: x86_64-gnu-llvm-12-stage1
291+
<<: *job-linux-xl
292+
290293
- name: x86_64-gnu-tools
291294
env:
292295
CI_ONLY_WHEN_SUBMODULES_CHANGED: 1

0 commit comments

Comments
 (0)