Skip to content

Commit

Permalink
ci: avoid symlinking the build directory on self-hosted builders
Browse files Browse the repository at this point in the history
  • Loading branch information
pietroalbini committed Jul 23, 2020
1 parent 4825e12 commit cb76f82
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/ci/scripts/symlink-build-dir.sh
Expand Up @@ -12,7 +12,7 @@ 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
elif isLinux && isGitHubActions && ! isSelfHostedGitHubActions; then
sudo mkdir -p /mnt/more-space
sudo chown -R "$(whoami):" /mnt/more-space

Expand Down
5 changes: 5 additions & 0 deletions src/ci/shared.sh
Expand Up @@ -38,6 +38,11 @@ function isGitHubActions {
[[ "${GITHUB_ACTIONS-false}" = "true" ]]
}


function isSelfHostedGitHubActions {
[[ "${RUST_GHA_SELF_HOSTED-false}" = "true" ]]
}

function isMacOS {
[[ "${OSTYPE}" = "darwin"* ]]
}
Expand Down

0 comments on commit cb76f82

Please sign in to comment.