Skip to content

Commit 2c5a5fe

Browse files
authored
Rollup merge of #141777 - Kobzol:dist-linux-alt-no-pgo-bolt, r=marcoieni
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 2d7ebd3 + 8f22a50 commit 2c5a5fe

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
@@ -105,6 +109,15 @@ envs:
105109
pr:
106110
PR_CI_JOB: 1
107111

112+
jobs:
113+
dist-x86_64-linux: &job-dist-x86_64-linux
114+
name: dist-x86_64-linux
115+
env:
116+
CODEGEN_BACKENDS: llvm,cranelift
117+
DOCKER_SCRIPT: dist.sh
118+
<<: *job-linux-36c-codebuild
119+
120+
108121
# Jobs that run on each push to a pull request (PR)
109122
# These jobs automatically inherit envs.pr, to avoid repeating
110123
# it in each job definition.
@@ -138,10 +151,7 @@ pr:
138151
# These jobs automatically inherit envs.try, to avoid repeating
139152
# it in each job definition.
140153
try:
141-
- name: dist-x86_64-linux
142-
env:
143-
CODEGEN_BACKENDS: llvm,cranelift
144-
<<: *job-linux-36c-codebuild
154+
- <<: *job-dist-x86_64-linux
145155

146156
# Main CI jobs that have to be green to merge a commit into master
147157
# These jobs automatically inherit envs.auto, to avoid repeating
@@ -234,16 +244,14 @@ auto:
234244
- name: dist-x86_64-illumos
235245
<<: *job-linux-4c
236246

237-
- name: dist-x86_64-linux
238-
env:
239-
CODEGEN_BACKENDS: llvm,cranelift
240-
<<: *job-linux-36c-codebuild
247+
- <<: *job-dist-x86_64-linux
241248

242249
- name: dist-x86_64-linux-alt
243250
env:
244251
IMAGE: dist-x86_64-linux
245252
CODEGEN_BACKENDS: llvm,cranelift
246-
<<: *job-linux-16c
253+
DOCKER_SCRIPT: dist-alt.sh
254+
<<: *job-linux-4c-largedisk
247255

248256
- name: dist-x86_64-musl
249257
env:

0 commit comments

Comments
 (0)