Skip to content

Commit

Permalink
Rollup merge of #69252 - Mark-Simulacrum:disk-try, r=JohnTitor
Browse files Browse the repository at this point in the history
Clean out unused directories for extra disk space

This cleans out some of the unused (but large) directories on our linux builders to hopefully allow them to complete without running out of disk space.
  • Loading branch information
JohnTitor authored Feb 18, 2020
2 parents 6d2b367 + 304d1a9 commit 125b328
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/ci/azure-pipelines/steps/run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
16 changes: 16 additions & 0 deletions src/ci/scripts/clean-disk.sh
Original file line number Diff line number Diff line change
@@ -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
6 changes: 6 additions & 0 deletions src/ci/scripts/dump-environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,9 @@ set +o pipefail
du . | sort -nr | head -n100
set -o pipefail
echo

echo "biggest files:"
set +o pipefail
du -h / 2>/dev/null | sort -hr | head -n100
set -o pipefail
echo

0 comments on commit 125b328

Please sign in to comment.