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 18:06:21 +0100
committerPietro Albini <pietro@pietroalbini.org>2020-03-24 15:36:13 +0100
commitba97ad35097146570508dff455f88a194daca3b6 (patch)
tree2d5701b10d1c3103eac9b70baa460756c155990a /src/ci/scripts
parent11aafa5305656ca3190d099c1bb92b47e587cd0c (diff)
downloadrust-ba97ad35097146570508dff455f88a194daca3b6.tar.gz
rust-ba97ad35097146570508dff455f88a194daca3b6.zip
ci: move the whole workspace directory on gha/linux
Moving just the `obj` directory created problems with mountpoints and
Docker containers, so this tries to symlink the parent directory.
Diffstat (limited to 'src/ci/scripts')
-rwxr-xr-xsrc/ci/scripts/symlink-build-dir.sh10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/ci/scripts/symlink-build-dir.sh b/src/ci/scripts/symlink-build-dir.sh
index 737a30206af..c77059c00ac 100755
--- a/src/ci/scripts/symlink-build-dir.sh
+++ b/src/ci/scripts/symlink-build-dir.sh
@@ -15,5 +15,13 @@ if isWindows && isAzurePipelines; then
 elif isLinux && isGitHubActions; then
     sudo mkdir -p /mnt/more-space
     sudo chown -R "$(whoami):" /mnt/more-space
-    ln -s /mnt/more-space obj
+
+    # Switch the whole workspace to the /mnt partition, which has more space.
+    # We don't just symlink the `obj` directory as doing that creates problems
+    # with the docker container.
+    current_dir="$(readlink -f "$(pwd)")"
+    cd /tmp
+    mv "${current_dir}" /mnt/more-space/workspace
+    ln -s /mnt/more-space/workspace "${current_dir}"
+    cd "${current_dir}"
 fi