Skip to content

Commit 6a184ec

Browse files
Auto merge of #141777 - Kobzol:dist-linux-alt-no-pgo-bolt, r=<try>
Do not run PGO/BOLT in x64 Linux alt builds Should unblock #131077 and also reduce our CI costs. It seems to run ~1.5h on the x64 larger runner (free runner runs out of disk space, sadly). Discussed [here](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/Utility.20of.20the.20.60dist-x86_64-linux-alt.60.20job/with/521324477). r? `@marcoieni` try-job: `dist-x86_64-linux*`
2 parents b17dba4 + 8f22a50 commit 6a184ec

File tree

4 files changed

+45
-17
lines changed

4 files changed

+45
-17
lines changed

src/ci/docker/host-x86_64/dist-x86_64-linux/Dockerfile

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -96,14 +96,13 @@ ENV RUST_CONFIGURE_ARGS \
9696
--set rust.lto=thin \
9797
--set rust.codegen-units=1
9898

99-
# Note that `rust.debug` is set to true *only* for `opt-dist`
100-
ENV SCRIPT python3 ../x.py build --set rust.debug=true opt-dist && \
101-
./build/$HOSTS/stage0-tools-bin/opt-dist linux-ci -- python3 ../x.py dist \
102-
--host $HOSTS --target $HOSTS \
103-
--include-default-paths \
104-
build-manifest bootstrap && \
105-
# Use GCC for building GCC, as it seems to behave badly when built with Clang
106-
CC=/rustroot/bin/cc CXX=/rustroot/bin/c++ python3 ../x.py dist gcc
99+
ARG SCRIPT_ARG
100+
101+
COPY host-x86_64/dist-x86_64-linux/dist.sh /scripts/
102+
COPY host-x86_64/dist-x86_64-linux/dist-alt.sh /scripts/
103+
104+
ENV SCRIPT /scripts/${SCRIPT_ARG}
105+
107106
ENV CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER=clang
108107

109108
# This is the only builder which will create source tarballs
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
3+
set -eux
4+
5+
python3 ../x.py dist \
6+
--host $HOSTS --target $HOSTS \
7+
--include-default-paths \
8+
build-manifest bootstrap
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash
2+
3+
set -eux
4+
5+
python3 ../x.py build --set rust.debug=true opt-dist
6+
7+
./build/$HOSTS/stage0-tools-bin/opt-dist linux-ci -- python3 ../x.py dist \
8+
--host $HOSTS --target $HOSTS \
9+
--include-default-paths \
10+
build-manifest bootstrap
11+
12+
# Use GCC for building GCC, as it seems to behave badly when built with Clang
13+
CC=/rustroot/bin/cc CXX=/rustroot/bin/c++ python3 ../x.py dist gcc

src/ci/github-actions/jobs.yml

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ runners:
1010
free_disk: true
1111
<<: *base-job
1212

13+
- &job-linux-4c-largedisk
14+
os: ubuntu-24.04-4core-16gb
15+
<<: *base-job
16+
1317
- &job-linux-8c
1418
os: ubuntu-24.04-8core-32gb
1519
<<: *base-job
@@ -107,6 +111,15 @@ envs:
107111
pr:
108112
PR_CI_JOB: 1
109113

114+
jobs:
115+
dist-x86_64-linux: &job-dist-x86_64-linux
116+
name: dist-x86_64-linux
117+
env:
118+
CODEGEN_BACKENDS: llvm,cranelift
119+
DOCKER_SCRIPT: dist.sh
120+
<<: *job-linux-36c-codebuild
121+
122+
110123
# Jobs that run on each push to a pull request (PR)
111124
# These jobs automatically inherit envs.pr, to avoid repeating
112125
# it in each job definition.
@@ -140,10 +153,7 @@ pr:
140153
# These jobs automatically inherit envs.try, to avoid repeating
141154
# it in each job definition.
142155
try:
143-
- name: dist-x86_64-linux
144-
env:
145-
CODEGEN_BACKENDS: llvm,cranelift
146-
<<: *job-linux-36c-codebuild
156+
- <<: *job-dist-x86_64-linux
147157

148158
# Main CI jobs that have to be green to merge a commit into master
149159
# These jobs automatically inherit envs.auto, to avoid repeating
@@ -236,16 +246,14 @@ auto:
236246
- name: dist-x86_64-illumos
237247
<<: *job-linux-4c
238248

239-
- name: dist-x86_64-linux
240-
env:
241-
CODEGEN_BACKENDS: llvm,cranelift
242-
<<: *job-linux-36c-codebuild
249+
- <<: *job-dist-x86_64-linux
243250

244251
- name: dist-x86_64-linux-alt
245252
env:
246253
IMAGE: dist-x86_64-linux
247254
CODEGEN_BACKENDS: llvm,cranelift
248-
<<: *job-linux-16c
255+
DOCKER_SCRIPT: dist-alt.sh
256+
<<: *job-linux-4c-largedisk
249257

250258
- name: dist-x86_64-musl
251259
env:

0 commit comments

Comments
 (0)