ci: avoid symlinking the build directory on self-hosted builders

This commit is contained in:
Pietro Albini 2020-07-06 15:12:27 +02:00
parent 4825e12fc9
commit cb76f82194
No known key found for this signature in database
GPG Key ID: 3E06ABE80BAAF19C
2 changed files with 6 additions and 1 deletions

View File

@ -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

View File

@ -38,6 +38,11 @@ function isGitHubActions {
[[ "${GITHUB_ACTIONS-false}" = "true" ]]
}
function isSelfHostedGitHubActions {
[[ "${RUST_GHA_SELF_HOSTED-false}" = "true" ]]
}
function isMacOS {
[[ "${OSTYPE}" = "darwin"* ]]
}