зеркало из https://github.com/microsoft/msquic.git
Small Refactor of Build Files (#407)
This commit is contained in:
Родитель
ca3e14f450
Коммит
80fa7359ae
|
@ -18,11 +18,63 @@ pr:
|
|||
|
||||
name: 0.$(Date:yyyy).$(Date:MM).$(DayOfMonth).$(Rev:rr).0
|
||||
|
||||
stages:
|
||||
|
||||
#
|
||||
# Merge to Integration
|
||||
#
|
||||
|
||||
- stage: integrate
|
||||
displayName: Integrate Branch
|
||||
dependsOn: []
|
||||
condition: |
|
||||
and
|
||||
(
|
||||
not(startsWith(variables['Build.SourceBranch'], 'refs/pull')),
|
||||
not(startsWith(variables['Build.SourceBranch'], 'refs/heads/integration/'))
|
||||
)
|
||||
jobs:
|
||||
- job: integrate
|
||||
displayName: Integrate Branch
|
||||
pool:
|
||||
vmImage: windows-latest
|
||||
variables:
|
||||
runCodesignValidationInjection: false
|
||||
steps:
|
||||
- checkout: self
|
||||
persistCredentials: true
|
||||
- task: PowerShell@2
|
||||
displayName: Integrate Branch
|
||||
inputs:
|
||||
filePath: .azure/scripts/integrate-branch.ps1
|
||||
arguments: -Branch $(Build.SourceBranch)
|
||||
|
||||
#
|
||||
# Builds
|
||||
#
|
||||
|
||||
stages:
|
||||
- stage: build_winkernel
|
||||
displayName: Build Windows Drivers
|
||||
dependsOn: []
|
||||
condition: |
|
||||
or
|
||||
(
|
||||
startsWith(variables['Build.SourceBranch'], 'refs/pull'),
|
||||
startsWith(variables['Build.SourceBranch'], 'refs/heads/integration/')
|
||||
)
|
||||
jobs:
|
||||
- template: ./templates/build-config-winkernel.yml
|
||||
parameters:
|
||||
arch: x64
|
||||
- template: ./templates/build-config-winkernel.yml
|
||||
parameters:
|
||||
arch: x86
|
||||
- template: ./templates/build-config-winkernel.yml
|
||||
parameters:
|
||||
arch: arm
|
||||
- template: ./templates/build-config-winkernel.yml
|
||||
parameters:
|
||||
arch: arm64
|
||||
|
||||
- stage: build_windows
|
||||
displayName: Build Windows
|
||||
|
@ -59,29 +111,6 @@ stages:
|
|||
arch: arm64
|
||||
tls: schannel
|
||||
|
||||
- stage: build_winkernel
|
||||
displayName: Build Windows Drivers
|
||||
dependsOn: []
|
||||
condition: |
|
||||
or
|
||||
(
|
||||
startsWith(variables['Build.SourceBranch'], 'refs/pull'),
|
||||
startsWith(variables['Build.SourceBranch'], 'refs/heads/integration/')
|
||||
)
|
||||
jobs:
|
||||
- template: ./templates/build-config-winkernel.yml
|
||||
parameters:
|
||||
arch: x64
|
||||
- template: ./templates/build-config-winkernel.yml
|
||||
parameters:
|
||||
arch: x86
|
||||
- template: ./templates/build-config-winkernel.yml
|
||||
parameters:
|
||||
arch: arm
|
||||
- template: ./templates/build-config-winkernel.yml
|
||||
parameters:
|
||||
arch: arm64
|
||||
|
||||
#
|
||||
# Build Verification Tests
|
||||
#
|
||||
|
@ -117,32 +146,3 @@ stages:
|
|||
condition: and(startsWith(variables['Build.SourceBranch'], 'refs/heads/integration/'), succeeded())
|
||||
jobs:
|
||||
- template: ./templates/create-package.yml
|
||||
|
||||
#
|
||||
# Merge to Integration
|
||||
#
|
||||
|
||||
- stage: integrate
|
||||
displayName: Integrate Branch
|
||||
dependsOn: []
|
||||
condition: |
|
||||
and
|
||||
(
|
||||
not(startsWith(variables['Build.SourceBranch'], 'refs/pull')),
|
||||
not(startsWith(variables['Build.SourceBranch'], 'refs/heads/integration/'))
|
||||
)
|
||||
jobs:
|
||||
- job: integrate
|
||||
displayName: Integrate Branch
|
||||
pool:
|
||||
vmImage: windows-latest
|
||||
variables:
|
||||
runCodesignValidationInjection: false
|
||||
steps:
|
||||
- checkout: self
|
||||
persistCredentials: true
|
||||
- task: PowerShell@2
|
||||
displayName: Integrate Branch
|
||||
inputs:
|
||||
filePath: .azure/scripts/integrate-branch.ps1
|
||||
arguments: -Branch $(Build.SourceBranch)
|
||||
|
|
|
@ -23,6 +23,34 @@ name: 0.$(Date:yyyy).$(Date:MM).$(DayOfMonth).$(Rev:rr).0
|
|||
|
||||
stages:
|
||||
|
||||
- stage: build_dbgext
|
||||
displayName: Build WinDbg Extension
|
||||
dependsOn: []
|
||||
jobs:
|
||||
- template: ./templates/build-config-dbgext.yml
|
||||
parameters:
|
||||
arch: x64
|
||||
- template: ./templates/build-config-dbgext.yml
|
||||
parameters:
|
||||
arch: x86
|
||||
|
||||
- stage: build_winkernel
|
||||
displayName: Build Windows Drivers
|
||||
dependsOn: []
|
||||
jobs:
|
||||
- template: ./templates/build-config-winkernel.yml
|
||||
parameters:
|
||||
arch: x64
|
||||
- template: ./templates/build-config-winkernel.yml
|
||||
parameters:
|
||||
arch: x86
|
||||
- template: ./templates/build-config-winkernel.yml
|
||||
parameters:
|
||||
arch: arm
|
||||
- template: ./templates/build-config-winkernel.yml
|
||||
parameters:
|
||||
arch: arm64
|
||||
|
||||
- stage: build_windows
|
||||
displayName: Build Windows
|
||||
dependsOn: []
|
||||
|
@ -66,34 +94,6 @@ stages:
|
|||
arch: x64
|
||||
tls: mitls
|
||||
|
||||
- stage: build_winkernel
|
||||
displayName: Build Windows Drivers
|
||||
dependsOn: []
|
||||
jobs:
|
||||
- template: ./templates/build-config-winkernel.yml
|
||||
parameters:
|
||||
arch: x64
|
||||
- template: ./templates/build-config-winkernel.yml
|
||||
parameters:
|
||||
arch: x86
|
||||
- template: ./templates/build-config-winkernel.yml
|
||||
parameters:
|
||||
arch: arm
|
||||
- template: ./templates/build-config-winkernel.yml
|
||||
parameters:
|
||||
arch: arm64
|
||||
|
||||
- stage: build_dbgext
|
||||
displayName: Build WinDbg Extension
|
||||
dependsOn: []
|
||||
jobs:
|
||||
- template: ./templates/build-config-dbgext.yml
|
||||
parameters:
|
||||
arch: x64
|
||||
- template: ./templates/build-config-dbgext.yml
|
||||
parameters:
|
||||
arch: x86
|
||||
|
||||
- stage: build_linux
|
||||
displayName: Build Linux
|
||||
dependsOn: []
|
||||
|
@ -115,35 +115,6 @@ stages:
|
|||
tls: stub
|
||||
extraBuildArgs: -DisableLogs -SanitizeAddress
|
||||
|
||||
#
|
||||
# Mirror
|
||||
#
|
||||
|
||||
- stage: mirror
|
||||
displayName: Mirror
|
||||
dependsOn:
|
||||
- build_windows
|
||||
- build_winkernel
|
||||
- build_dbgext
|
||||
- build_linux
|
||||
condition: and(succeeded(), in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI'), not(startsWith(variables['Build.SourceBranch'], 'refs/heads/feature/')))
|
||||
jobs:
|
||||
- job: mirror
|
||||
displayName: Mirror branch
|
||||
pool:
|
||||
vmImage: windows-latest
|
||||
steps:
|
||||
- checkout: self
|
||||
persistCredentials: true
|
||||
- task: PowerShell@2
|
||||
displayName: Sync Changes to AzDO Mirror Branch
|
||||
inputs:
|
||||
pwsh: true
|
||||
filePath: .azure/scripts/sync-mirror.ps1
|
||||
arguments: -Branch $(Build.SourceBranch)
|
||||
env:
|
||||
AzDO_PAT: $(AzDO_PAT)
|
||||
|
||||
#
|
||||
# Build Verification Tests
|
||||
#
|
||||
|
@ -233,3 +204,32 @@ stages:
|
|||
platform: linux
|
||||
arch: x64
|
||||
tls: openssl
|
||||
|
||||
#
|
||||
# Mirror
|
||||
#
|
||||
|
||||
- stage: mirror
|
||||
displayName: Mirror
|
||||
dependsOn:
|
||||
- build_windows
|
||||
- build_winkernel
|
||||
- build_dbgext
|
||||
- build_linux
|
||||
condition: and(in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI'), not(startsWith(variables['Build.SourceBranch'], 'refs/heads/feature/')), succeeded())
|
||||
jobs:
|
||||
- job: mirror
|
||||
displayName: Mirror branch
|
||||
pool:
|
||||
vmImage: windows-latest
|
||||
steps:
|
||||
- checkout: self
|
||||
persistCredentials: true
|
||||
- task: PowerShell@2
|
||||
displayName: Sync Changes to AzDO Mirror Branch
|
||||
inputs:
|
||||
pwsh: true
|
||||
filePath: .azure/scripts/sync-mirror.ps1
|
||||
arguments: -Branch $(Build.SourceBranch)
|
||||
env:
|
||||
AzDO_PAT: $(AzDO_PAT)
|
||||
|
|
|
@ -1,44 +0,0 @@
|
|||
<#
|
||||
|
||||
.SYNOPSIS
|
||||
This installs procdump in the build directory on the local machine.
|
||||
|
||||
.EXAMPLE
|
||||
install-procdump.ps1
|
||||
|
||||
#>
|
||||
|
||||
Set-StrictMode -Version 'Latest'
|
||||
$PSDefaultParameterValues['*:ErrorAction'] = 'Stop'
|
||||
|
||||
# Root directory of the project.
|
||||
$RootDir = Split-Path (Split-Path $PSScriptRoot -Parent) -Parent
|
||||
|
||||
# Installation directory for procdump.
|
||||
$ToolsDir = Join-Path $RootDir "bld" "tools"
|
||||
if (!(Test-Path $ToolsDir)) {
|
||||
New-Item -Path $ToolsDir -ItemType Directory -Force | Out-Null
|
||||
}
|
||||
|
||||
# Install procdump on Windows if not already present.
|
||||
if ($IsWindows -and !(Test-Path (Join-Path $ToolsDir "procdump64.exe"))) {
|
||||
|
||||
Write-Host "[$(Get-Date)] Installing procdump..."
|
||||
|
||||
# Create installation directory.
|
||||
New-Item -Path $ToolsDir -ItemType Directory -Force | Out-Null
|
||||
|
||||
# Download the zip file.
|
||||
$ZipFile = Join-Path $ToolsDir "Procdump.zip"
|
||||
Invoke-WebRequest -Uri https://download.sysinternals.com/files/Procdump.zip -OutFile $ZipFile
|
||||
|
||||
# Extract the zip file.
|
||||
Expand-Archive -Path $ZipFile $ToolsDir
|
||||
|
||||
# Delete the unused files.
|
||||
Remove-Item -Path $ZipFile
|
||||
Remove-Item -Path (Join-Path $ToolsDir "Eula.txt")
|
||||
Remove-Item -Path (Join-Path $ToolsDir "procdump.exe")
|
||||
|
||||
Write-Host "[$(Get-Date)] procdump installed."
|
||||
}
|
|
@ -80,11 +80,6 @@ if (!(Test-Path $Path)) {
|
|||
Write-Error "$($Path) does not exist!"
|
||||
}
|
||||
|
||||
# Make sure procdump is installed on Windows.
|
||||
if ($IsWindows -and !(Test-Path ($RootDir + "\bld\tools\procdump64.exe"))) {
|
||||
Write-Error "Procdump not installed!`n `nRun the following to install it:`n `n $(Join-Path $RootDir ".azure" "scripts" "install-procdump.ps1")`n"
|
||||
}
|
||||
|
||||
# Root directory of the project.
|
||||
$RootDir = Split-Path (Split-Path $PSScriptRoot -Parent) -Parent
|
||||
|
||||
|
@ -120,6 +115,9 @@ $SuccessXmlText = @"
|
|||
</testsuites>
|
||||
"@
|
||||
|
||||
# Path to the WER registry key used for collecting dumps.
|
||||
$WerDumpRegPath = "HKLM:\Software\Microsoft\Windows\Windows Error Reporting\LocalDumps\$ExeName"
|
||||
|
||||
# Asynchronously starts the executable with the given arguments.
|
||||
function Start-Executable {
|
||||
$Now = (Get-Date -UFormat "%Y-%m-%dT%T")
|
||||
|
@ -137,8 +135,11 @@ function Start-Executable {
|
|||
$pinfo.Arguments = "-g -G $($Path) $($Arguments)"
|
||||
}
|
||||
} else {
|
||||
$pinfo.FileName = $RootDir + "\bld\tools\procdump64.exe"
|
||||
$pinfo.Arguments = "-ma -e -b -l -accepteula -x $($LogDir) $($Path) $($Arguments)"
|
||||
$pinfo.FileName = $Path
|
||||
$pinfo.Arguments = $Arguments
|
||||
# Enable WER dump collection.
|
||||
New-ItemProperty -Path $WerDumpRegPath -Name DumpType -PropertyType DWord -Value 2 -Force | Out-Null
|
||||
New-ItemProperty -Path $WerDumpRegPath -Name DumpFolder -PropertyType ExpandString -Value $LogDir -Force | Out-Null
|
||||
}
|
||||
} else {
|
||||
if ($Debugger) {
|
||||
|
@ -169,30 +170,56 @@ function Start-Executable {
|
|||
}
|
||||
}
|
||||
|
||||
# Uses CDB.exe to print the crashing callstack in the dump file.
|
||||
function PrintDumpCallStack($DumpFile) {
|
||||
$env:_NT_SYMBOL_PATH = Split-Path $Path
|
||||
$Output = cdb.exe -z $File -c "kn;q" | Join-String -Separator "`n"
|
||||
Write-Host "=================================================================================="
|
||||
Write-Host " $(Split-Path $DumpFile -Leaf)"
|
||||
Write-Host "=================================================================================="
|
||||
try {
|
||||
$Output = ($Output | Select-String -Pattern " # Child-SP(?s).*quit:").Matches[0].Groups[0].Value
|
||||
$Output -replace "quit:", "=================================================================================="
|
||||
} catch {
|
||||
Log "Failed to extract callstack"
|
||||
$Output
|
||||
}
|
||||
}
|
||||
|
||||
# Waits for the executable to finish and processes the results.
|
||||
function Wait-Executable($Exe) {
|
||||
$stdout = $null
|
||||
$stderr = $null
|
||||
$ProcessCrashed = $false
|
||||
$KeepOutput = $KeepOutputOnSuccess
|
||||
|
||||
try {
|
||||
if (!$Debugger) {
|
||||
$stdout = $Exe.Process.StandardOutput.ReadToEnd()
|
||||
$stderr = $Exe.Process.StandardError.ReadToEnd()
|
||||
if ($isWindows) {
|
||||
$ProcessCrashed = $stdout.Contains("Dump 1 complete")
|
||||
} else {
|
||||
$ProcessCrashed = $stderr.Contains("Aborted")
|
||||
if (!$isWindows) {
|
||||
$KeepOutput = $stderr.Contains("Aborted")
|
||||
}
|
||||
}
|
||||
$Exe.Process.WaitForExit()
|
||||
if ($Exe.Process.ExitCode -ne 0) {
|
||||
Log "Process had nonzero exit code: $($Exe.Process.ExitCode)"
|
||||
$KeepOutput = $true
|
||||
}
|
||||
$DumpFiles = (Get-ChildItem $LogDir) | Where-Object { $_.Extension -eq ".dmp" }
|
||||
if ($DumpFiles) {
|
||||
Log "Dump file(s) generated"
|
||||
foreach ($File in $DumpFiles) {
|
||||
PrintDumpCallStack($File)
|
||||
}
|
||||
$KeepOutput = $true
|
||||
}
|
||||
} catch {
|
||||
Log "Treating exception as crash!"
|
||||
$ProcessCrashed = $true
|
||||
Log "Treating exception as failure!"
|
||||
$KeepOutput = $true
|
||||
throw
|
||||
} finally {
|
||||
$XmlText = $null
|
||||
if ($ProcessCrashed) {
|
||||
if ($KeepOutput) {
|
||||
$XmlText = $FailXmlText;
|
||||
} else {
|
||||
$XmlText = $SuccessXmlText;
|
||||
|
@ -205,7 +232,7 @@ function Wait-Executable($Exe) {
|
|||
$XmlResults = [xml]($XmlText)
|
||||
$XmlResults.Save($LogDir + "-results.xml") | Out-Null
|
||||
}
|
||||
|
||||
|
||||
if ($ShowOutput) {
|
||||
if ($null -ne $stdout -and "" -ne $stdout) {
|
||||
Write-Host $stdout
|
||||
|
@ -215,8 +242,7 @@ function Wait-Executable($Exe) {
|
|||
}
|
||||
}
|
||||
|
||||
if ($ProcessCrashed -or $KeepOutputOnSuccess) {
|
||||
|
||||
if ($KeepOutput) {
|
||||
if ($LogProfile -ne "None") {
|
||||
if ($ConvertLogs) {
|
||||
& $LogScript -Stop -OutputDirectory $LogDir -ConvertToText
|
||||
|
@ -250,5 +276,15 @@ function Wait-Executable($Exe) {
|
|||
}
|
||||
}
|
||||
|
||||
# Initialize WER dump registry key if necessary.
|
||||
if ($IsWindows -and !(Test-Path $WerDumpRegPath)) {
|
||||
New-Item -Path $WerDumpRegPath -Force | Out-Null
|
||||
}
|
||||
|
||||
# Start the executable, wait for it to complete and then generate any output.
|
||||
Wait-Executable (Start-Executable)
|
||||
|
||||
if ($isWindows) {
|
||||
# Cleanup the WER registry.
|
||||
Remove-Item -Path $WerDumpRegPath -Force | Out-Null
|
||||
}
|
||||
|
|
|
@ -93,10 +93,7 @@ param (
|
|||
[switch]$CompressOutput = $false,
|
||||
|
||||
[Parameter(Mandatory = $false)]
|
||||
[switch]$NoProgress = $false,
|
||||
|
||||
[Parameter(Mandatory = $false)]
|
||||
[switch]$NoProcDump = $false
|
||||
[switch]$NoProgress = $false
|
||||
)
|
||||
|
||||
Set-StrictMode -Version 'Latest'
|
||||
|
@ -111,11 +108,6 @@ if (!(Test-Path $Path)) {
|
|||
Write-Error "$($Path) does not exist!"
|
||||
}
|
||||
|
||||
# Make sure procdump is installed on Windows.
|
||||
if ($IsWindows -and !(Test-Path ($RootDir + "\bld\tools\procdump64.exe"))) {
|
||||
Write-Error "Procdump not installed!`n `nRun the following to install it:`n `n $(Join-Path $RootDir ".azure" "scripts" "install-procdump.ps1")`n"
|
||||
}
|
||||
|
||||
# Root directory of the project.
|
||||
$RootDir = Split-Path (Split-Path $PSScriptRoot -Parent) -Parent
|
||||
|
||||
|
@ -222,15 +214,12 @@ function Start-TestExecutable([String]$Arguments, [String]$OutputDir) {
|
|||
} else {
|
||||
$pinfo.Arguments = "-g -G $($Path) $($Arguments)"
|
||||
}
|
||||
} elseif ($NoProcDump) {
|
||||
} else {
|
||||
$pinfo.FileName = $Path
|
||||
$pinfo.Arguments = $Arguments
|
||||
# Enable WER dump collection.
|
||||
New-ItemProperty -Path $WerDumpRegPath -Name DumpType -PropertyType DWord -Value 2 -Force | Out-Null
|
||||
New-ItemProperty -Path $WerDumpRegPath -Name DumpFolder -PropertyType ExpandString -Value $OutputDir -Force | Out-Null
|
||||
} else {
|
||||
$pinfo.FileName = $RootDir + "\bld\tools\procdump64.exe"
|
||||
$pinfo.Arguments = "-ma -e -b -l -accepteula -x $($OutputDir) $($Path) $($Arguments)"
|
||||
}
|
||||
} else {
|
||||
if ($Debugger) {
|
||||
|
@ -318,6 +307,22 @@ function Start-AllTestCases {
|
|||
}
|
||||
}
|
||||
|
||||
# Uses CDB.exe to print the crashing callstack in the dump file.
|
||||
function PrintDumpCallStack($DumpFile) {
|
||||
$env:_NT_SYMBOL_PATH = Split-Path $Path
|
||||
$Output = cdb.exe -z $File -c "kn;q" | Join-String -Separator "`n"
|
||||
Write-Host "=================================================================================="
|
||||
Write-Host " $(Split-Path $DumpFile -Leaf)"
|
||||
Write-Host "=================================================================================="
|
||||
try {
|
||||
$Output = ($Output | Select-String -Pattern " # Child-SP(?s).*quit:").Matches[0].Groups[0].Value
|
||||
$Output -replace "quit:", "=================================================================================="
|
||||
} catch {
|
||||
Log "Failed to extract callstack"
|
||||
$Output
|
||||
}
|
||||
}
|
||||
|
||||
# Waits for the executable to finish and processes the results.
|
||||
function Wait-TestCase($TestCase) {
|
||||
$stdout = $null
|
||||
|
@ -329,9 +334,7 @@ function Wait-TestCase($TestCase) {
|
|||
if (!$Debugger) {
|
||||
$stdout = $TestCase.Process.StandardOutput.ReadToEnd()
|
||||
$stderr = $TestCase.Process.StandardError.ReadToEnd()
|
||||
if ($isWindows) {
|
||||
$ProcessCrashed = $stdout.Contains("Dump 1 complete")
|
||||
} else {
|
||||
if (!$isWindows) {
|
||||
$ProcessCrashed = $stderr.Contains("Aborted")
|
||||
}
|
||||
$AnyTestFailed = $stdout.Contains("[ FAILED ]")
|
||||
|
@ -341,6 +344,18 @@ function Wait-TestCase($TestCase) {
|
|||
}
|
||||
}
|
||||
$TestCase.Process.WaitForExit()
|
||||
if ($TestCase.Process.ExitCode -ne 0) {
|
||||
Log "Process had nonzero exit code: $($TestCase.Process.ExitCode)"
|
||||
$ProcessCrashed = $true
|
||||
}
|
||||
$DumpFiles = (Get-ChildItem $TestCase.LogDir) | Where-Object { $_.Extension -eq ".dmp" }
|
||||
if ($DumpFiles) {
|
||||
Log "Dump file(s) generated"
|
||||
foreach ($File in $DumpFiles) {
|
||||
PrintDumpCallStack($File)
|
||||
}
|
||||
$ProcessCrashed = $true
|
||||
}
|
||||
} catch {
|
||||
Log "Treating exception as crash!"
|
||||
$ProcessCrashed = $true
|
||||
|
@ -452,14 +467,13 @@ if ($Debugger -and $ExecutionMode -eq "Parallel") {
|
|||
$ExecutionMode = "IsolatedSerial"
|
||||
}
|
||||
|
||||
# NoProcDump mode doesn't work for parallel right now.
|
||||
if ($NoProcDump -and $ExecutionMode -eq "Parallel") {
|
||||
Log "Warning: Disabling parallel execution for NoProcDump runs!"
|
||||
$ExecutionMode = "IsolatedSerial"
|
||||
# Parallel execution doesn't work well. Warn.
|
||||
if ($ExecutionMode -eq "Parallel") {
|
||||
Log "Warning: Parallel execution doesn't work very well"
|
||||
}
|
||||
|
||||
# Initialize WER dump registry key if necessary.
|
||||
if ($IsWindows -and $NoProcDump -and !(Test-Path $WerDumpRegPath)) {
|
||||
if ($IsWindows -and !(Test-Path $WerDumpRegPath)) {
|
||||
New-Item -Path $WerDumpRegPath -Force | Out-Null
|
||||
}
|
||||
|
||||
|
@ -512,7 +526,7 @@ try {
|
|||
}
|
||||
}
|
||||
} finally {
|
||||
if ($isWindows -and $NoProcDump) {
|
||||
if ($isWindows) {
|
||||
# Cleanup the WER registry.
|
||||
Remove-Item -Path $WerDumpRegPath -Force | Out-Null
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ jobs:
|
|||
inputs:
|
||||
pwsh: true
|
||||
filePath: scripts/test.ps1
|
||||
arguments: -NoProgress -NoProcDump -IsolationMode Isolated -LogProfile ${{ parameters.logProfile }} -ConvertLogs -GenerateXmlResults -Config ${{ parameters.config }} -Arch ${{ parameters.arch }} -Tls schannel ${{ parameters.extraArgs }}
|
||||
arguments: -NoProgress -IsolationMode Isolated -LogProfile ${{ parameters.logProfile }} -ConvertLogs -GenerateXmlResults -Config ${{ parameters.config }} -Arch ${{ parameters.arch }} -Tls schannel ${{ parameters.extraArgs }}
|
||||
|
||||
- template: ./upload-test-artifacts.yml
|
||||
parameters:
|
||||
|
|
|
@ -40,7 +40,7 @@ jobs:
|
|||
inputs:
|
||||
pwsh: true
|
||||
filePath: scripts/test.ps1
|
||||
arguments: -NoProgress -NoProcDump -IsolationMode Isolated -LogProfile ${{ parameters.logProfile }} -ConvertLogs -GenerateXmlResults -Config ${{ parameters.config }} -Arch ${{ parameters.arch }} -Tls ${{ parameters.tls }} ${{ parameters.extraArgs }}
|
||||
arguments: -NoProgress -IsolationMode Isolated -LogProfile ${{ parameters.logProfile }} -ConvertLogs -GenerateXmlResults -Config ${{ parameters.config }} -Arch ${{ parameters.arch }} -Tls ${{ parameters.tls }} ${{ parameters.extraArgs }}
|
||||
|
||||
- template: ./upload-test-artifacts.yml
|
||||
parameters:
|
||||
|
|
|
@ -23,6 +23,7 @@ mono_crash.*
|
|||
[Rr]eleases/
|
||||
x64/
|
||||
x86/
|
||||
[Ww][Ii][Nn]32/
|
||||
[Aa][Rr][Mm]/
|
||||
[Aa][Rr][Mm]64/
|
||||
bld/
|
||||
|
@ -31,6 +32,7 @@ bld/
|
|||
[Oo]bj/
|
||||
[Ll]og/
|
||||
[Ll]ogs/
|
||||
[Bb]uild/
|
||||
|
||||
# Visual Studio 2015/2017 cache/options directory
|
||||
.vs/
|
||||
|
@ -62,6 +64,9 @@ project.lock.json
|
|||
project.fragment.lock.json
|
||||
artifacts/
|
||||
|
||||
# ASP.NET Scaffolding
|
||||
ScaffoldingReadMe.txt
|
||||
|
||||
# StyleCop
|
||||
StyleCopReport.xml
|
||||
|
||||
|
@ -77,7 +82,8 @@ StyleCopReport.xml
|
|||
*.pdb
|
||||
*.ipdb
|
||||
*.pgc
|
||||
*.pgd
|
||||
# This project uses .pgd for PGO build support.
|
||||
#*.pgd
|
||||
*.rsp
|
||||
*.sbr
|
||||
*.tlb
|
||||
|
@ -128,9 +134,6 @@ _ReSharper*/
|
|||
*.[Rr]e[Ss]harper
|
||||
*.DotSettings.user
|
||||
|
||||
# JustCode is a .NET coding add-in
|
||||
.JustCode
|
||||
|
||||
# TeamCity is a build add-in
|
||||
_TeamCity*
|
||||
|
||||
|
@ -141,6 +144,9 @@ _TeamCity*
|
|||
.axoCover/*
|
||||
!.axoCover/settings.json
|
||||
|
||||
# Coverlet is a free, cross platform Code Coverage Tool
|
||||
coverage*[.json, .xml, .info]
|
||||
|
||||
# Visual Studio code coverage results
|
||||
*.coverage
|
||||
*.coveragexml
|
||||
|
@ -351,4 +357,7 @@ healthchecksdb
|
|||
MigrationBackup/
|
||||
|
||||
# Ionide (cross platform F# VS Code tools) working folder
|
||||
.ionide/
|
||||
.ionide/
|
||||
|
||||
# Fody - auto-generated XML schema
|
||||
FodyWeavers.xsd
|
||||
|
|
|
@ -48,17 +48,17 @@ else()
|
|||
set(QUIC_PLATFORM "linux")
|
||||
endif()
|
||||
|
||||
set(QUIC_ARCH "x64" CACHE STRING "CPU architecture to build for")
|
||||
set(QUIC_BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR})
|
||||
set(QUIC_OUTPUT_DIR ${QUIC_BUILD_DIR}/bin/$<IF:$<CONFIG:Debug>,Debug,Release> CACHE STRING "Output directory for build artifacts")
|
||||
|
||||
set(QUIC_BUILD_DIR ${CMAKE_CURRENT_SOURCE_DIR}/bld/${QUIC_PLATFORM}/${QUIC_ARCH}_${QUIC_TLS})
|
||||
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${QUIC_BUILD_DIR}/obj/$<IF:$<CONFIG:Debug>,Debug,Release>)
|
||||
|
||||
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${QUIC_BUILD_DIR}/obj)
|
||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/artifacts/${QUIC_PLATFORM}/${QUIC_ARCH}_$<IF:$<CONFIG:Debug>,Debug,Release>_${QUIC_TLS})
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/artifacts/${QUIC_PLATFORM}/${QUIC_ARCH}_$<IF:$<CONFIG:Debug>,Debug,Release>_${QUIC_TLS})
|
||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE ${CMAKE_CURRENT_SOURCE_DIR}/artifacts/${QUIC_PLATFORM}/${QUIC_ARCH}_Release_${QUIC_TLS})
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_CURRENT_SOURCE_DIR}/artifacts/${QUIC_PLATFORM}/${QUIC_ARCH}_Release_${QUIC_TLS})
|
||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG ${CMAKE_CURRENT_SOURCE_DIR}/artifacts/${QUIC_PLATFORM}/${QUIC_ARCH}_Debug_${QUIC_TLS})
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_CURRENT_SOURCE_DIR}/artifacts/${QUIC_PLATFORM}/${QUIC_ARCH}_Debug_${QUIC_TLS})
|
||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${QUIC_OUTPUT_DIR})
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${QUIC_OUTPUT_DIR})
|
||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE ${QUIC_OUTPUT_DIR})
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${QUIC_OUTPUT_DIR})
|
||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG ${QUIC_OUTPUT_DIR})
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${QUIC_OUTPUT_DIR})
|
||||
|
||||
set(CLANG_GCC_WARNING_FLAGS -Werror -Wall -Wextra -Wformat=2 -Wno-type-limits -Wno-unknown-pragmas -Wno-unused-value CACHE INTERNAL "")
|
||||
set(MSVC_WARNING_FLAGS /WX /W4 /sdl CACHE INTERNAL "")
|
||||
|
|
|
@ -113,7 +113,7 @@ For more info, take a look at the [build.ps1](../scripts/build.ps1) script.
|
|||
|
||||
## Build Output
|
||||
|
||||
By default the build output should go to in the `bld` folder and the final build binaries in the `artifacts` folder. Under that it will create per-platform folders, and then sub folders for architecture/tls combinations. This allows for building different platforms and configurations at the same time.
|
||||
By default the build output should go to in the `build` folder and the final build binaries in the `artifacts` folder. Under that it will create per-platform folders, and then sub folders for architecture/tls combinations. This allows for building different platforms and configurations at the same time.
|
||||
|
||||
# Building with CMake
|
||||
|
||||
|
@ -141,15 +141,15 @@ sudo apt-get install lttng-tools
|
|||
### Windows
|
||||
|
||||
```
|
||||
mkdir bld && cd bld
|
||||
cmake -g 'Visual Studio 16 2019' -A x64 -DQUIC_ARCH=x64 -DQUIC_TLS=schannel ..
|
||||
mkdir build && cd build
|
||||
cmake -g 'Visual Studio 16 2019' -A x64 ..
|
||||
```
|
||||
|
||||
### Linux
|
||||
|
||||
```
|
||||
mkdir bld && cd bld
|
||||
cmake -g 'Linux Makefiles' -A x64 -DQUIC_ARCH=x64 -DQUIC_TLS=openssl ..
|
||||
mkdir build && cd build
|
||||
cmake -g 'Linux Makefiles' ..
|
||||
```
|
||||
|
||||
## Running a Build
|
||||
|
|
|
@ -99,7 +99,7 @@ $RootDir = Split-Path $PSScriptRoot -Parent
|
|||
|
||||
# Important directory paths.
|
||||
$BaseArtifactsDir = Join-Path $RootDir "artifacts"
|
||||
$BaseBuildDir = Join-Path $RootDir "bld"
|
||||
$BaseBuildDir = Join-Path $RootDir "build"
|
||||
$SrcDir = Join-Path $RootDir "src"
|
||||
$ArtifactsDir = $null
|
||||
$BuildDir = $null
|
||||
|
@ -155,8 +155,8 @@ function CMake-Generate {
|
|||
} else {
|
||||
$Arguments += " 'Linux Makefiles'"
|
||||
}
|
||||
$Arguments += " -DQUIC_ARCH=" + $Arch
|
||||
$Arguments += " -DQUIC_TLS=" + $Tls
|
||||
$Arguments += " -DQUIC_OUTPUT_DIR=" + $ArtifactsDir
|
||||
if ($DisableLogs) {
|
||||
$Arguments += " -DQUIC_ENABLE_LOGGING=off"
|
||||
}
|
||||
|
|
|
@ -26,10 +26,6 @@ param (
|
|||
Set-StrictMode -Version 'Latest'
|
||||
$PSDefaultParameterValues['*:ErrorAction'] = 'Stop'
|
||||
|
||||
# Important directories.
|
||||
$RootDir = Split-Path $PSScriptRoot -Parent
|
||||
$ScriptsDir = Join-Path $RootDir ".azure" "scripts"
|
||||
|
||||
if ($IsWindows) {
|
||||
|
||||
if ($Configuration -eq "Dev") {
|
||||
|
@ -39,17 +35,6 @@ if ($IsWindows) {
|
|||
}
|
||||
|
||||
if ($Configuration -eq "Test" -or $Configuration -eq "Dev") {
|
||||
# Disable SChannel TLS 1.3 (client and server).
|
||||
$TlsServerKeyPath = "HKLM\System\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.3\Server"
|
||||
reg.exe add $TlsServerKeyPath /v DisabledByDefault /t REG_DWORD /d 1 /f | Out-Null
|
||||
reg.exe add $TlsServerKeyPath /v Enabled /t REG_DWORD /d 0 /f | Out-Null
|
||||
$TlsClientKeyPath = "HKLM\System\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.3\Client"
|
||||
reg.exe add $TlsClientKeyPath /v DisabledByDefault /t REG_DWORD /d 1 /f | Out-Null
|
||||
reg.exe add $TlsClientKeyPath /v Enabled /t REG_DWORD /d 0 /f | Out-Null
|
||||
|
||||
# Run procdump installation script.
|
||||
& (Join-Path $ScriptsDir "install-procdump.ps1")
|
||||
|
||||
# Enable SChannel TLS 1.3 (client and server).
|
||||
$TlsServerKeyPath = "HKLM\System\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.3\Server"
|
||||
reg.exe add $TlsServerKeyPath /v DisabledByDefault /t REG_DWORD /d 0 /f | Out-Null
|
||||
|
|
|
@ -125,10 +125,7 @@ param (
|
|||
[switch]$CompressOutput = $false,
|
||||
|
||||
[Parameter(Mandatory = $false)]
|
||||
[switch]$NoProgress = $false,
|
||||
|
||||
[Parameter(Mandatory = $false)]
|
||||
[switch]$NoProcDump = $false
|
||||
[switch]$NoProgress = $false
|
||||
)
|
||||
|
||||
Set-StrictMode -Version 'Latest'
|
||||
|
@ -204,9 +201,6 @@ if ($CompressOutput) {
|
|||
if ($NoProgress) {
|
||||
$TestArguments += " -NoProgress"
|
||||
}
|
||||
if ($NoProcDump) {
|
||||
$TestArguments += " -NoProcDump"
|
||||
}
|
||||
|
||||
# Run the script.
|
||||
Invoke-Expression ($RunTest + " -Path $($MsQuicCoreTest) " + $TestArguments)
|
||||
|
|
|
@ -83,7 +83,7 @@
|
|||
<DebuggerFlavor>DbgengKernelDebugger</DebuggerFlavor>
|
||||
<EnableInf2cat>false</EnableInf2cat>
|
||||
<OutDir>$(SolutionDir)artifacts\winkernel\$(Platform)_$(Configuration)_schannel\</OutDir>
|
||||
<IntDir>$(SolutionDir)bld\winkernel\$(Platform)_$(Configuration)_schannel\obj\$(ProjectName)\</IntDir>
|
||||
<IntDir>$(SolutionDir)build\winkernel\$(Platform)_$(Configuration)_schannel\obj\$(ProjectName)\</IntDir>
|
||||
<SignMode>Off</SignMode>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
|
@ -94,10 +94,10 @@
|
|||
<AdditionalOptions>/kernel /NOOPTIDATA %(AdditionalOptions)</AdditionalOptions>
|
||||
</Link>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>..\..\inc;$(SolutionDir)bld\winkernel\$(Platform)_$(Configuration)_schannel\inc;$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\inc;$(SolutionDir)build\winkernel\$(Platform)_$(Configuration)_schannel\inc;$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<AdditionalIncludeDirectories>..\..\inc;$(SolutionDir)bld\winkernel\$(Platform)_$(Configuration)_schannel\inc;$(UM_IncludePath);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\inc;$(SolutionDir)build\winkernel\$(Platform)_$(Configuration)_schannel\inc;$(UM_IncludePath);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ResourceCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'">
|
||||
|
|
|
@ -136,12 +136,12 @@
|
|||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<TargetName>core</TargetName>
|
||||
<OutDir>$(SolutionDir)bld\winkernel\$(Platform)_$(Configuration)_schannel\bin\</OutDir>
|
||||
<IntDir>$(SolutionDir)bld\winkernel\$(Platform)_$(Configuration)_schannel\obj\$(ProjectName)\</IntDir>
|
||||
<OutDir>$(SolutionDir)build\winkernel\$(Platform)_$(Configuration)_schannel\bin\</OutDir>
|
||||
<IntDir>$(SolutionDir)build\winkernel\$(Platform)_$(Configuration)_schannel\obj\$(ProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>..\inc;$(SolutionDir)bld\winkernel\$(Platform)_$(Configuration)_schannel\inc;$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\inc;$(SolutionDir)build\winkernel\$(Platform)_$(Configuration)_schannel\inc;$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'">
|
||||
|
|
|
@ -77,16 +77,16 @@
|
|||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<TargetName>platform</TargetName>
|
||||
<IntDir>$(SolutionDir)bld\winkernel\$(Platform)_$(Configuration)_schannel\obj\$(ProjectName)\</IntDir>
|
||||
<OutDir>$(SolutionDir)bld\winkernel\$(Platform)_$(Configuration)_schannel\bin\</OutDir>
|
||||
<IntDir>$(SolutionDir)build\winkernel\$(Platform)_$(Configuration)_schannel\obj\$(ProjectName)\</IntDir>
|
||||
<OutDir>$(SolutionDir)build\winkernel\$(Platform)_$(Configuration)_schannel\bin\</OutDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>..\inc;$(SolutionDir)bld\winkernel\$(Platform)_$(Configuration)_schannel\inc;$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\inc;$(SolutionDir)build\winkernel\$(Platform)_$(Configuration)_schannel\inc;$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<PreBuildEvent>
|
||||
<Command>mkdir $(SolutionDir)bld\winkernel\$(Platform)_$(Configuration)_schannel\inc
|
||||
mc.exe -um -h $(SolutionDir)bld\winkernel\$(Platform)_$(Configuration)_schannel\inc -r $(SolutionDir)bld\winkernel\$(Platform)_$(Configuration)_schannel\inc $(SolutionDir)src\manifest\MsQuicEtw.man</Command>
|
||||
<Command>mkdir $(SolutionDir)build\winkernel\$(Platform)_$(Configuration)_schannel\inc
|
||||
mc.exe -um -h $(SolutionDir)build\winkernel\$(Platform)_$(Configuration)_schannel\inc -r $(SolutionDir)build\winkernel\$(Platform)_$(Configuration)_schannel\inc $(SolutionDir)src\manifest\MsQuicEtw.man</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'">
|
||||
|
|
|
@ -84,7 +84,7 @@
|
|||
<DebuggerFlavor>DbgengKernelDebugger</DebuggerFlavor>
|
||||
<EnableInf2cat>false</EnableInf2cat>
|
||||
<OutDir>$(SolutionDir)artifacts\winkernel\$(Platform)_$(Configuration)_schannel\</OutDir>
|
||||
<IntDir>$(SolutionDir)bld\winkernel\$(Platform)_$(Configuration)_schannel\obj\$(ProjectName)\</IntDir>
|
||||
<IntDir>$(SolutionDir)build\winkernel\$(Platform)_$(Configuration)_schannel\obj\$(ProjectName)\</IntDir>
|
||||
<SignMode>Off</SignMode>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
|
@ -93,7 +93,7 @@
|
|||
<AdditionalDependencies>cng.lib;ksecdd.lib;msnetioid.lib;netio.lib;wdmsec.lib;uuid.lib;msquic.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>..\..;..\..\..\inc;$(SolutionDir)bld\winkernel\$(Platform)_$(Configuration)_schannel\inc;$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..;..\..\..\inc;$(SolutionDir)build\winkernel\$(Platform)_$(Configuration)_schannel\inc;$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'">
|
||||
|
|
|
@ -81,12 +81,12 @@
|
|||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<TargetName>testlib</TargetName>
|
||||
<IntDir>$(SolutionDir)bld\winkernel\$(Platform)_$(Configuration)_schannel\obj\$(ProjectName)\</IntDir>
|
||||
<OutDir>$(SolutionDir)bld\winkernel\$(Platform)_$(Configuration)_schannel\bin\</OutDir>
|
||||
<IntDir>$(SolutionDir)build\winkernel\$(Platform)_$(Configuration)_schannel\obj\$(ProjectName)\</IntDir>
|
||||
<OutDir>$(SolutionDir)build\winkernel\$(Platform)_$(Configuration)_schannel\bin\</OutDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>..\;..\..\inc;..\..\..\submodules\wil\include;$(SolutionDir)bld\winkernel\$(Platform)_$(Configuration)_schannel\inc;$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\;..\..\inc;..\..\..\submodules\wil\include;$(SolutionDir)build\winkernel\$(Platform)_$(Configuration)_schannel\inc;$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'">
|
||||
|
|
|
@ -54,7 +54,7 @@
|
|||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<OutDir>$(SolutionDir)artifacts\windbg\$(Platform)_$(Configuration)\</OutDir>
|
||||
<IntDir>$(SolutionDir)bld\windbg\$(Platform)_$(Configuration)\obj\$(ProjectName)\</IntDir>
|
||||
<IntDir>$(SolutionDir)build\windbg\$(Platform)_$(Configuration)\obj\$(ProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
|
|
Загрузка…
Ссылка в новой задаче