Skip to content

Commit 1ba762a

Browse files
committed
ci: fix out of disk space errors on linux GHA
The /mnt mount point has 53GB of free disk space at the time of writing this commit, so this moves the build there to avoid running out of disk space during builds.
1 parent b9c3633 commit 1ba762a

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/ci/scripts/symlink-build-dir.sh

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#!/bin/bash
2-
# We've had issues with the default drive in use running out of space during a
3-
# build, and it looks like the `C:` drive has more space than the default `D:`
4-
# drive. We should probably confirm this with the azure pipelines team at some
5-
# point, but this seems to fix our "disk space full" problems.
2+
# We've had multiple issues with the default disk running out of disk space
3+
# during builds, and it looks like other disks mounted in the VMs have more
4+
# space available. This script synlinks the build directory to those other
5+
# disks, in the CI providers and OSes affected by this.
66

77
set -euo pipefail
88
IFS=$'\n\t'
@@ -12,4 +12,8 @@ source "$(cd "$(dirname "$0")" && pwd)/../shared.sh"
1212
if isWindows && isAzurePipelines; then
1313
cmd //c "mkdir c:\\MORE_SPACE"
1414
cmd //c "mklink /J build c:\\MORE_SPACE"
15+
elif isLinux && isGitHubActions; then
16+
sudo mkdir -p /mnt/more-space
17+
sudo chown -R "$(whoami):" /mnt/more-space
18+
ln -s /mnt/more-space obj
1519
fi

0 commit comments

Comments
 (0)