ci: Set ZIG_GLOBAL_CACHE_DIR and ZIG_LOCAL_CACHE_DIR earlier.
Otherwise the disk just keeps getting filled up. Also remove some pointless cleanup commands since the actions/checkout workflow step already cleans the repository by default.
This commit is contained in:
committed by
Andrew Kelley
parent
798bb0bc61
commit
1cbfdb4244
@@ -30,17 +30,16 @@ if ((git rev-parse --is-shallow-repository) -eq "true") {
|
||||
git fetch --unshallow # `git describe` won't work on a shallow repo
|
||||
}
|
||||
|
||||
Write-Output "Building from source..."
|
||||
Remove-Item -Path 'build-debug' -Recurse -Force -ErrorAction Ignore
|
||||
New-Item -Path 'build-debug' -ItemType Directory
|
||||
Set-Location -Path 'build-debug'
|
||||
|
||||
# Override the cache directories because they won't actually help other CI runs
|
||||
# which will be testing alternate versions of zig, and ultimately would just
|
||||
# fill up space on the hard drive for no reason.
|
||||
$Env:ZIG_GLOBAL_CACHE_DIR="$(Get-Location)\zig-global-cache"
|
||||
$Env:ZIG_LOCAL_CACHE_DIR="$(Get-Location)\zig-local-cache"
|
||||
|
||||
Write-Output "Building from source..."
|
||||
New-Item -Path 'build-debug' -ItemType Directory
|
||||
Set-Location -Path 'build-debug'
|
||||
|
||||
# CMake gives a syntax error when file paths with backward slashes are used.
|
||||
# Here, we use forward slashes only to work around this.
|
||||
& cmake .. `
|
||||
|
||||
Reference in New Issue
Block a user