Skip to content

Commit 09156ca

Browse files
committed
Auto merge of #133912 - MarcoIeni:test-codebuild-runner, r=<try>
[experiment] test code build runner try-job: x86_64-fuchsia try-job: x86_64-gnu try-job: x86_64-gnu-debug try-job: x86_64-gnu-distcheck try-job: dist-arm-linux try-job: dist-powerpc64le-linux try-job: dist-x86_64-linux try-job: dist-x86_64-linux-alt
2 parents 61cc3e5 + afbd96e commit 09156ca

File tree

15 files changed

+150
-26
lines changed

15 files changed

+150
-26
lines changed

.github/workflows/ci.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,26 @@ jobs:
112112
run: src/ci/scripts/free-disk-space.sh
113113
if: matrix.free_disk
114114

115+
- name: free up more disk space
116+
if: matrix.free_disk
117+
run: |
118+
sudo apt purge -y --autoremove \
119+
'^java-*' \
120+
'groff' \
121+
'groff-base' \
122+
'^libllvm.*' \
123+
'^llvm.*' \
124+
'gcc' \
125+
'gcc-11' \
126+
'libicu-dev' \
127+
'^vim.*' \
128+
'python3-breezy' \
129+
&& sudo rm -rf /var/lib/apt/lists/*
130+
df -h /
131+
132+
- name: Show installed packages ordered by size
133+
run: dpkg-query -W --showformat='${Installed-Size} ${Package}\n' | sort -nr
134+
115135
# Rust Log Analyzer can't currently detect the PR number of a GitHub
116136
# Actions build on its own, so a hint in the log message is needed to
117137
# point it in the right direction.
@@ -174,6 +194,8 @@ jobs:
174194

175195
- name: enable ipv6 on Docker
176196
run: src/ci/scripts/enable-docker-ipv6.sh
197+
# Don't run on codebuild because systemctl is not available
198+
if: ${{ !contains(matrix.os, 'codebuild-ubuntu') }}
177199

178200
# Disable automatic line ending conversion (again). On Windows, when we're
179201
# installing dependencies, something switches the git configuration directory or

src/bootstrap/bootstrap.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1002,10 +1002,14 @@ def build_bootstrap(self):
10021002
env = os.environ.copy()
10031003
if "GITHUB_ACTIONS" in env:
10041004
print("::group::Building bootstrap")
1005+
print("Current home directory:", os.path.expanduser("~"))
1006+
print("Current working directory:", os.getcwd())
1007+
print("Current HOME:", env["HOME"])
10051008
else:
10061009
eprint("Building bootstrap")
10071010

10081011
args = self.build_bootstrap_cmd(env)
1012+
print("Running", args, "in", self.rust_root)
10091013
# Run this from the source directory so cargo finds .cargo/config
10101014
run(args, env=env, verbose=self.verbose, cwd=self.rust_root)
10111015

@@ -1015,6 +1019,7 @@ def build_bootstrap(self):
10151019
def build_bootstrap_cmd(self, env):
10161020
"""For tests."""
10171021
build_dir = os.path.join(self.build_dir, "bootstrap")
1022+
print("Building bootstrap in", build_dir)
10181023
if self.clean and os.path.exists(build_dir):
10191024
shutil.rmtree(build_dir)
10201025
# `CARGO_BUILD_TARGET` breaks bootstrap build.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ubuntu:22.04
1+
FROM ghcr.io/marcoieni/ubuntu:22.04
22

33
COPY scripts/cross-apt-packages.sh /scripts/
44
RUN sh /scripts/cross-apt-packages.sh

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ubuntu:22.04
1+
FROM ghcr.io/marcoieni/ubuntu:22.04
22

33
COPY scripts/cross-apt-packages.sh /scripts/
44
RUN sh /scripts/cross-apt-packages.sh

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# CentOS 7 has headers for kernel 3.10, but that's fine as long as we don't
33
# actually use newer APIs in rustc or std without a fallback. It's more
44
# important that we match glibc for ELF symbol versioning.
5-
FROM centos:7
5+
FROM ghcr.io/marcoieni/centos:7
66

77
WORKDIR /build
88

src/ci/docker/host-x86_64/x86_64-fuchsia/Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Fuchsia as an integration test of the toolchain. See the build-fuchsia.sh
33
# script in this directory for more details.
44

5-
FROM ubuntu:22.04
5+
FROM ghcr.io/marcoieni/ubuntu:22.04
66

77
ARG DEBIAN_FRONTEND=noninteractive
88
RUN apt-get update && apt-get install -y --no-install-recommends \
@@ -75,5 +75,7 @@ ENV RUST_CONFIGURE_ARGS \
7575
--set target.x86_64-unknown-fuchsia.linker=/usr/local/bin/ld.lld
7676

7777
ENV SCRIPT \
78+
echo "x install" && df -h / && \
7879
python3 ../x.py install --target $TARGETS compiler/rustc library/std clippy && \
80+
echo "build fuchsia" && df -h / && \
7981
bash ../src/ci/docker/host-x86_64/x86_64-fuchsia/build-fuchsia.sh

src/ci/docker/host-x86_64/x86_64-fuchsia/build-fuchsia.sh

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ jiri=.jiri_root/bin/jiri
4343
set -x
4444

4545
if [ -z "$KEEP_CHECKOUT" ]; then
46+
echo "downloading jiri" && df -h /
4647
# This script will:
4748
# - create a directory named "fuchsia" if it does not exist
4849
# - download "jiri" to "fuchsia/.jiri_root/bin"
@@ -52,11 +53,13 @@ if [ -z "$KEEP_CHECKOUT" ]; then
5253

5354
cd $checkout
5455

56+
echo "running jiri init" && df -h /
5557
$jiri init \
5658
-partial=true \
5759
-analytics-opt=false \
5860
.
5961

62+
echo "running jiri import" && df -h /
6063
$jiri import \
6164
-name=integration \
6265
-revision=$INTEGRATION_SHA \
@@ -65,24 +68,41 @@ if [ -z "$KEEP_CHECKOUT" ]; then
6568
"https://fuchsia.googlesource.com/integration"
6669

6770
if [ -d ".git" ]; then
71+
echo "Wipe out any local changes" && df -h /
6872
# Wipe out any local changes if we're reusing a checkout.
6973
git checkout --force JIRI_HEAD
7074
fi
7175

76+
echo "running jiri update" && df -h /
7277
$jiri update -autoupdate=false
7378

7479
echo integration commit = $(git -C integration rev-parse HEAD)
7580

7681
for git_ref in "${PICK_REFS[@]}"; do
82+
echo "running git fetch" && df -h /
7783
git fetch https://fuchsia.googlesource.com/fuchsia $git_ref
84+
echo "running git cherry-pick" && df -h /
7885
git cherry-pick --no-commit FETCH_HEAD
7986
done
8087
else
81-
echo Reusing existing Fuchsia checkout
88+
echo Reusing existing Fuchsia checkout && df -h /
8289
cd $checkout
8390
fi
8491

8592
# Run the script inside the Fuchsia checkout responsible for building Fuchsia.
8693
# You can change arguments to the build by setting KEEP_CHECKOUT=1 above and
8794
# modifying them in build_fuchsia_from_rust_ci.sh.
95+
echo "running build_fuchsia_from_rust_ci.sh" && df -h /
96+
97+
# Start background monitoring of disk space
98+
(
99+
while true; do
100+
df -h /
101+
sleep 20
102+
done
103+
) &
104+
MONITOR_PID=$!
105+
88106
bash scripts/rust/build_fuchsia_from_rust_ci.sh
107+
108+
kill $MONITOR_PID

src/ci/docker/host-x86_64/x86_64-gnu-debug/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ubuntu:22.04
1+
FROM ghcr.io/marcoieni/ubuntu:22.04
22

33
ARG DEBIAN_FRONTEND=noninteractive
44
RUN apt-get update && apt-get install -y --no-install-recommends \

src/ci/docker/host-x86_64/x86_64-gnu-distcheck/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ubuntu:22.04
1+
FROM ghcr.io/marcoieni/ubuntu:22.04
22

33
ARG DEBIAN_FRONTEND=noninteractive
44
RUN apt-get update && apt-get install -y --no-install-recommends \

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ubuntu:22.04
1+
FROM ghcr.io/marcoieni/ubuntu:22.04
22

33
ARG DEBIAN_FRONTEND=noninteractive
44
RUN apt-get update && apt-get install -y --no-install-recommends \

0 commit comments

Comments
 (0)