about summary refs log tree commit diff
path: root/src/ci/scripts
diff options
context:
space:
mode:
authorMark Rousskov <mark.simulacrum@gmail.com>2020-02-17 19:39:38 -0500
committerPietro Albini <pietro@pietroalbini.org>2020-02-18 11:34:59 +0100
commitc992ab23fa14a38c5565889d52ba3a3fb6e1e831 (patch)
tree7bece365542c38dbc626febfb8a3d6f4be1e3f95 /src/ci/scripts
parent0176a9eef845e7421b7e2f7ef015333a41a7c027 (diff)
downloadrust-c992ab23fa14a38c5565889d52ba3a3fb6e1e831.tar.gz
rust-c992ab23fa14a38c5565889d52ba3a3fb6e1e831.zip
Clean out some default-installed directories
This helps us have enough disk space for our builders to be able to complete
successfully. For now, the choices are ad-hoc and 'definitely not needed'. This
should never fail the build, as everything our build needs should be inside
Docker.
Diffstat (limited to 'src/ci/scripts')
-rwxr-xr-xsrc/ci/scripts/clean-disk.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/ci/scripts/clean-disk.sh b/src/ci/scripts/clean-disk.sh
new file mode 100755
index 00000000000..c50de37c492
--- /dev/null
+++ b/src/ci/scripts/clean-disk.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+# This script deletes some of the Azure-provided artifacts. We don't use these,
+# and disk space is at a premium on our builders.
+
+set -euo pipefail
+IFS=$'\n\t'
+
+source "$(cd "$(dirname "$0")" && pwd)/../shared.sh"
+
+# All the Linux builds happen inside Docker.
+if isLinux; then
+    # 6.7GB
+    sudo rm -rf /opt/ghc
+    # 16GB
+    sudo rm -rf /usr/share/dotnet
+fi