about summary refs log tree commit diff
path: root/src/ci/scripts
diff options
context:
space:
mode:
authorPietro Albini <pietro@pietroalbini.org>2020-03-20 17:02:10 +0100
committerPietro Albini <pietro@pietroalbini.org>2020-03-24 15:36:10 +0100
commit1ba762a193f8db56f4229c6dd3b2a1f0df62170a (patch)
tree3bce797761dc96fc99665ec1f3d2667329e27614 /src/ci/scripts
parentb9c3633847cd74f514ebb3197876e8181a003f10 (diff)
downloadrust-1ba762a193f8db56f4229c6dd3b2a1f0df62170a.tar.gz
rust-1ba762a193f8db56f4229c6dd3b2a1f0df62170a.zip
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.
Diffstat (limited to 'src/ci/scripts')
-rwxr-xr-xsrc/ci/scripts/symlink-build-dir.sh12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/ci/scripts/symlink-build-dir.sh b/src/ci/scripts/symlink-build-dir.sh
index 904fd3b60f8..737a30206af 100755
--- a/src/ci/scripts/symlink-build-dir.sh
+++ b/src/ci/scripts/symlink-build-dir.sh
@@ -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