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.
This commit is contained in:
Mark Rousskov 2020-02-17 19:39:38 -05:00 committed by Pietro Albini
parent 0176a9eef8
commit c992ab23fa
No known key found for this signature in database
GPG Key ID: 3E06ABE80BAAF19C
2 changed files with 19 additions and 0 deletions

View File

@ -31,6 +31,9 @@ steps:
- bash: src/ci/scripts/setup-environment.sh
displayName: Setup environment
- bash: src/ci/scripts/clean-disk.sh
displayName: Clean disk
- bash: src/ci/scripts/should-skip-this.sh
displayName: Decide whether to run this job

16
src/ci/scripts/clean-disk.sh Executable file
View File

@ -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