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.
This commit is contained in:
Pietro Albini 2020-03-20 17:02:10 +01:00
parent b9c3633847
commit 1ba762a193
No known key found for this signature in database
GPG Key ID: 3E06ABE80BAAF19C

View File

@ -1,8 +1,8 @@
#!/bin/bash
# We've had issues with the default drive in use running out of space during a
# build, and it looks like the `C:` drive has more space than the default `D:`
# drive. We should probably confirm this with the azure pipelines team at some
# point, but this seems to fix our "disk space full" problems.
# We've had multiple issues with the default disk running out of disk space
# during builds, and it looks like other disks mounted in the VMs have more
# space available. This script synlinks the build directory to those other
# disks, in the CI providers and OSes affected by this.
set -euo pipefail
IFS=$'\n\t'
@ -12,4 +12,8 @@ source "$(cd "$(dirname "$0")" && pwd)/../shared.sh"
if isWindows && isAzurePipelines; then
cmd //c "mkdir c:\\MORE_SPACE"
cmd //c "mklink /J build c:\\MORE_SPACE"
elif isLinux && isGitHubActions; then
sudo mkdir -p /mnt/more-space
sudo chown -R "$(whoami):" /mnt/more-space
ln -s /mnt/more-space obj
fi