Skip to content

Commit 8c35a92

Browse files
committed
Auto merge of #76564 - pietroalbini:ci-avoid-wasting-10-minutes, r=Mark-Simulacrum
ci: avoid moving the build directory on GHA While waiting for a PR job to start testing my code, I noticed the symlink-build-dir step took 10 minutes to complete, so I investigated what caused that. It seems like something changed in the build environment between version 20200901.1 (where the step took 45 seconds) and version 20200908.1 (where the step took 10 minutes). At the time of writing this commit, the rust-lang organization is on vertsion 20200908.1, while the rust-lang-ci organization is at version 20200901.1 (and is not affected by this yet). There is no need for this step anymore on GHA, as our XL builders got an increase in the root paritition size, so this commit removes the code that moved stuff around on GHA (while keeping it on Azure). For the record, at the time of writing this, the disk situation is: ``` Filesystem Size Used Avail Use% Mounted on /dev/sda1 667G 60G 607G 9% / /dev/sdb1 110G 4.1G 101G 4% /mnt ``` r? `@Mark-Simulacrum`
2 parents 25b2f48 + a5cdc06 commit 8c35a92

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

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

-18
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,4 @@ 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 && ! isSelfHostedGitHubActions; then
16-
sudo mkdir -p /mnt/more-space
17-
sudo chown -R "$(whoami):" /mnt/more-space
18-
19-
# Switch the whole workspace to the /mnt partition, which has more space.
20-
# We don't just symlink the `obj` directory as doing that creates problems
21-
# with the docker container.
22-
current_dir="$(readlink -f "$(pwd)")"
23-
cd /tmp
24-
mv "${current_dir}" /mnt/more-space/workspace
25-
ln -s /mnt/more-space/workspace "${current_dir}"
26-
cd "${current_dir}"
27-
28-
# Move the Docker data directory to /mnt
29-
sudo systemctl stop docker.service
30-
sudo mv /var/lib/docker /mnt/docker
31-
sudo ln -s /mnt/docker /var/lib/docker
32-
sudo systemctl start docker.service
3315
fi

0 commit comments

Comments
 (0)