Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 2m28s
Foundation / checks (network) (push) Successful in 8m16s
Foundation / checks (client) (push) Successful in 12m14s
Foundation / checks (tsan) (push) Successful in 7m50s
Foundation / checks (checks) (push) Successful in 31m45s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (postgres) (push) Canceled after 25m13s
ADR-0090 records the maintainer's selection of msquic 2.6.2 with OpenSSL 3.5.9 LTS built from pinned, checksum-verified sources on Windows and Linux (plus the xdp-for-windows headers msquic needs on Windows), the trust, threading and channel model, and the known gap that OpenSSL's verifier also trusts its default paths. Adds the opt-in quic preset, explicit preparation, and a loopback smoke test (datagram, stream, untrusted CA and wrong name refused) passing on MSVC and GCC. windows-check picks up newly installed Perl/NASM and pins cl. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
59 lines
3.4 KiB
PowerShell
59 lines
3.4 KiB
PowerShell
param(
|
|
[ValidateSet('debug', 'release', 'analysis', 'asan', 'tsan', 'client', 'client-probe', 'network', 'client-network', 'client-package', 'quic')]
|
|
[string]$Preset = 'debug',
|
|
[ValidateSet('configure', 'build', 'test', 'format', 'check')]
|
|
[string]$Action = 'check',
|
|
# Extra configure-time cache entries, NAME=VALUE (e.g. EVO_BUILD_IDENTITY=g0123abcd).
|
|
[ValidatePattern('^[A-Z][A-Z0-9_]*=[0-9A-Za-z.+-]*$')]
|
|
[string[]]$Define = @()
|
|
)
|
|
$ErrorActionPreference = 'Stop'
|
|
$repositoryRoot = Split-Path -Parent $PSScriptRoot
|
|
$vswherePath = Join-Path ${env:ProgramFiles(x86)} 'Microsoft Visual Studio\Installer\vswhere.exe'
|
|
if (!(Test-Path -LiteralPath $vswherePath)) { throw 'Visual Studio Installer/vswhere is required' }
|
|
$visualStudioRoot = & $vswherePath -latest -version '[17.0,18.0)' -products '*' -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath
|
|
if (!$visualStudioRoot) { throw 'Visual Studio 2022 C++ build tools are required' }
|
|
$developerScript = Join-Path $visualStudioRoot 'Common7\Tools\VsDevCmd.bat'
|
|
# cmd only initializes compiler environment; all filesystem work stays in PowerShell/CMake.
|
|
$configuredRoot = if ($env:VSINSTALLDIR) { $env:VSINSTALLDIR.TrimEnd('\') } else { '' }
|
|
if (!$env:VSCMD_VER -or $env:VSCMD_ARG_TGT_ARCH -ne 'x64' -or $configuredRoot -ne $visualStudioRoot.TrimEnd('\')) {
|
|
$environmentCommand = 'call "{0}" -no_logo -arch=x64 -host_arch=x64 && set' -f $developerScript
|
|
$environmentLines = & $env:ComSpec /d /c $environmentCommand
|
|
if ($LASTEXITCODE -ne 0) { throw 'Visual Studio environment initialization failed' }
|
|
foreach ($line in $environmentLines) {
|
|
if ($line -match '^([^=]+)=(.*)$') {
|
|
[Environment]::SetEnvironmentVariable($matches[1], $matches[2], 'Process')
|
|
}
|
|
}
|
|
}
|
|
$cmakeRoot = Join-Path $visualStudioRoot 'Common7\IDE\CommonExtensions\Microsoft\CMake'
|
|
$llvmRoot = Join-Path $visualStudioRoot 'VC\Tools\Llvm\x64\bin'
|
|
$env:Path = ((@("$cmakeRoot\CMake\bin", "$cmakeRoot\Ninja", $llvmRoot) + $env:Path.Split(';')) | Select-Object -Unique) -join ';'
|
|
# Tools installed after this shell started (Strawberry Perl and NASM for the msquic
|
|
# OpenSSL build, ADR-0090) come from the registry PATH, appended after the MSVC tools.
|
|
$registryPath = @([Environment]::GetEnvironmentVariable('Path', 'Machine'), [Environment]::GetEnvironmentVariable('Path', 'User')) -join ';'
|
|
$nasmDirectories = @("$env:LOCALAPPDATA\bin\NASM", "$env:ProgramFiles\NASM") | Where-Object { Test-Path -LiteralPath $_ }
|
|
$env:Path = (($env:Path.Split(';') + $registryPath.Split(';') + $nasmDirectories) | Where-Object { $_ } | Select-Object -Unique) -join ';'
|
|
# Strawberry Perl puts MinGW gcc/g++ on PATH: new build directories must still use MSVC.
|
|
$env:CC = 'cl'
|
|
$env:CXX = 'cl'
|
|
Push-Location -LiteralPath $repositoryRoot
|
|
try {
|
|
if ($Action -in @('configure', 'check')) {
|
|
& cmake --preset $Preset @($Define | ForEach-Object { "-D$_" })
|
|
if ($LASTEXITCODE -ne 0) { throw 'CMake configure failed' }
|
|
}
|
|
if ($Action -in @('build', 'check')) {
|
|
& cmake --build --preset $Preset
|
|
if ($LASTEXITCODE -ne 0) { throw 'Build failed' }
|
|
}
|
|
if ($Action -in @('test', 'check')) {
|
|
& ctest --preset $Preset
|
|
if ($LASTEXITCODE -ne 0) { throw 'Tests failed' }
|
|
}
|
|
if ($Action -eq 'format') {
|
|
& cmake --build --preset $Preset --target format-check
|
|
if ($LASTEXITCODE -ne 0) { throw 'Formatting check failed' }
|
|
}
|
|
} finally { Pop-Location }
|