Skip to content

Commit 5babd25

Browse files
tonyhutterpcd1193182
authored andcommitted
CI: Free 35GB of unused files on the runner
Free 35GB of unused files, mostly from unused development environments. This helps with the out of disk space problems we were seeing on FreeBSD runners. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: George Melikov <mail@gmelikov.ru> Signed-off-by: Tony Hutter <hutter2@llnl.gov> Closes #18400 ZFS-CI-Type: full
1 parent bfe1e7d commit 5babd25

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

.github/workflows/scripts/qemu-1-setup.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,27 @@
66

77
set -eu
88

9+
# The default runner has a bunch of development tools and other things
10+
# that we do not need. Remove them here to free up a total of 35GB.
11+
#
12+
# First remove packages - this frees up ~10GB
13+
echo "Disk space before purge:"
14+
df -h /
15+
sudo docker image prune --all --force
16+
sudo docker builder prune -a
17+
unneeded="microsoft-edge-stable|azure-cli|google-cloud|google-chrome-stable|"\
18+
"temurin|llvm|firefox|mysql-server|snapd|android|dotnet|haskell|ghcup|"\
19+
"powershell|julia|swift|miniconda|chromium"
20+
sudo apt-get -y remove $(dpkg-query -f '${binary:Package}\n' -W | grep -E "'$unneeded'")
21+
sudo apt-get -y autoremove
22+
23+
# Next, remove unneeded files in /usr. This frees up an additional 25GB.
24+
sudo rm -fr /usr/local/lib/android /usr/share/dotnet /usr/local/.ghcup \
25+
/usr/share/swift /usr/local/share/powershell /usr/local/julia* \
26+
/usr/share/miniconda /usr/local/share/chromium
27+
echo "Disk space after:"
28+
df -h /
29+
930
# The default 'azure.archive.ubuntu.com' mirrors can be really slow.
1031
# Prioritize the official Ubuntu mirrors.
1132
#

0 commit comments

Comments
 (0)