Skip to content

Commit 125b328

Browse files
authored
Rollup merge of #69252 - Mark-Simulacrum:disk-try, r=JohnTitor
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.
2 parents 6d2b367 + 304d1a9 commit 125b328

File tree

3 files changed

+25
-0
lines changed

3 files changed

+25
-0
lines changed

src/ci/azure-pipelines/steps/run.yml

+3
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ steps:
3131
- bash: src/ci/scripts/setup-environment.sh
3232
displayName: Setup environment
3333

34+
- bash: src/ci/scripts/clean-disk.sh
35+
displayName: Clean disk
36+
3437
- bash: src/ci/scripts/should-skip-this.sh
3538
displayName: Decide whether to run this job
3639

src/ci/scripts/clean-disk.sh

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
# This script deletes some of the Azure-provided artifacts. We don't use these,
3+
# and disk space is at a premium on our builders.
4+
5+
set -euo pipefail
6+
IFS=$'\n\t'
7+
8+
source "$(cd "$(dirname "$0")" && pwd)/../shared.sh"
9+
10+
# All the Linux builds happen inside Docker.
11+
if isLinux; then
12+
# 6.7GB
13+
sudo rm -rf /opt/ghc
14+
# 16GB
15+
sudo rm -rf /usr/share/dotnet
16+
fi

src/ci/scripts/dump-environment.sh

+6
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,9 @@ set +o pipefail
1717
du . | sort -nr | head -n100
1818
set -o pipefail
1919
echo
20+
21+
echo "biggest files:"
22+
set +o pipefail
23+
du -h / 2>/dev/null | sort -hr | head -n100
24+
set -o pipefail
25+
echo

0 commit comments

Comments
 (0)