mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Updated build script to keep build output
This commit is contained in:
parent
fde3a6b73f
commit
235ec2565f
2 changed files with 17 additions and 4 deletions
18
ci/build.ps1
18
ci/build.ps1
|
@ -5,7 +5,9 @@ param(
|
|||
)
|
||||
|
||||
$SourceDirectory = (Convert-Path "$PSScriptRoot/../").Replace("\", "/")
|
||||
$WorkingDirectory = $pwd.Path
|
||||
$WorkingDirectory = "$pwd"
|
||||
$BuildOutputDirectory = "$SourceDirectory/out/build/x64/$BuildType"
|
||||
$InstallDirectory = "$SourceDirectory/out/install/x64/$BuildType"
|
||||
|
||||
$commands = @()
|
||||
if (!(Get-Command cl)) {
|
||||
|
@ -18,7 +20,7 @@ cmake.exe
|
|||
-S "$SourceDirectory"
|
||||
-B "$WorkingDirectory"
|
||||
-DCMAKE_BUILD_TYPE:STRING=$BuildType
|
||||
-DCMAKE_INSTALL_PREFIX:PATH="$SourceDirectory/out/install/$BuildType"
|
||||
-DCMAKE_INSTALL_PREFIX:PATH="$InstallDirectory"
|
||||
-DDISABLE_PYTHON_BINDINGS=1 `
|
||||
2>&1
|
||||
"@.Replace("`r`n", "")
|
||||
|
@ -30,4 +32,14 @@ cmake.exe --build $WorkingDirectory --config $BuildType
|
|||
$commands += @"
|
||||
cmake.exe --install $WorkingDirectory
|
||||
"@
|
||||
cmd /c ($commands -join " && ")
|
||||
cmd /c ($commands -join " && ")
|
||||
|
||||
Write-Host "Copying build output to $BuildOutputDirectory..."
|
||||
mkdir $BuildOutputDirectory -Force | Out-Null
|
||||
Get-ChildItem $WorkingDirectory -Recurse -Attributes !ReparsePoint | foreach {
|
||||
$path = $_.FullName.Replace("$pwd", $BuildOutputDirectory)
|
||||
$parent = Split-Path -Parent $path
|
||||
mkdir $parent -Force | Out-Null
|
||||
Copy-Item $_.FullName -Destination $path -Force
|
||||
}
|
||||
Write-Host "Done."
|
|
@ -42,6 +42,7 @@ RUN choco install python -y
|
|||
# Can't install a proper msys2 because it caused console hanging in the container during docker build.
|
||||
RUN choco install msysgit -y
|
||||
RUN choco install sed -y
|
||||
RUN choco install powershell-core -y
|
||||
|
||||
# Set working environment.
|
||||
RUN setx /M PATH "%PATH%;C:\\Program Files\\Git\\bin"
|
||||
|
@ -53,4 +54,4 @@ ADD default C:\Users\ContainerAdministrator\.conan\profiles\default
|
|||
|
||||
# Define the entry point for the docker container.
|
||||
# This entry point starts the developer command prompt and launches the PowerShell shell.
|
||||
ENTRYPOINT ["C:\\BuildTools\\VC\\Auxiliary\\Build\\vcvars64.bat", "&&", "powershell.exe", "-NoLogo", "-ExecutionPolicy", "Unrestricted"]
|
||||
ENTRYPOINT ["C:\\BuildTools\\VC\\Auxiliary\\Build\\vcvars64.bat", "&&", "pwsh.exe", "-NoLogo", "-ExecutionPolicy", "Unrestricted"]
|
Loading…
Add table
Add a link
Reference in a new issue