mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-28 11:21:12 +08:00
Add "cascades" enforcement (#20140)
* Add "cascades" enforcement as requested by https://github.com/microsoft/vcpkg/pull/20074#issuecomment-916565430 * Add counts. * Fix arm-uwp count. * Update counts. * Update counts
This commit is contained in:
parent
0209a276fb
commit
5395ad9a4f
@ -45,7 +45,7 @@ jobs:
|
|||||||
inputs:
|
inputs:
|
||||||
failOnStderr: true
|
failOnStderr: true
|
||||||
filePath: 'scripts/azure-pipelines/test-modified-ports.ps1'
|
filePath: 'scripts/azure-pipelines/test-modified-ports.ps1'
|
||||||
arguments: '-Triplet x64-linux -BuildReason $(Build.Reason) -BinarySourceStub "$(X_VCPKG_BINARY_SOURCE_STUB)" -WorkingRoot ${{ variables.WORKING_ROOT }} -ArtifactStagingDirectory $(Build.ArtifactStagingDirectory)'
|
arguments: '-Triplet x64-linux -BuildReason $(Build.Reason) -BinarySourceStub "$(X_VCPKG_BINARY_SOURCE_STUB)" -WorkingRoot ${{ variables.WORKING_ROOT }} -ArtifactStagingDirectory $(Build.ArtifactStagingDirectory) -EnforceCascades'
|
||||||
pwsh: true
|
pwsh: true
|
||||||
- bash: |
|
- bash: |
|
||||||
df -h
|
df -h
|
||||||
|
@ -39,7 +39,7 @@ jobs:
|
|||||||
inputs:
|
inputs:
|
||||||
failOnStderr: true
|
failOnStderr: true
|
||||||
filePath: 'scripts/azure-pipelines/test-modified-ports.ps1'
|
filePath: 'scripts/azure-pipelines/test-modified-ports.ps1'
|
||||||
arguments: '-Triplet x64-osx -BuildReason $(Build.Reason) -BinarySourceStub "$(BINARY_SOURCE_STUB)" -WorkingRoot ${{ variables.WORKING_ROOT }} -ArtifactStagingDirectory $(Build.ArtifactStagingDirectory)'
|
arguments: '-Triplet x64-osx -BuildReason $(Build.Reason) -BinarySourceStub "$(BINARY_SOURCE_STUB)" -WorkingRoot ${{ variables.WORKING_ROOT }} -ArtifactStagingDirectory $(Build.ArtifactStagingDirectory) -EnforceCascades'
|
||||||
pwsh: true
|
pwsh: true
|
||||||
- bash: |
|
- bash: |
|
||||||
df -h
|
df -h
|
||||||
|
@ -30,6 +30,9 @@ not, binary caching will default to read-write mode.
|
|||||||
.PARAMETER PassingIsPassing
|
.PARAMETER PassingIsPassing
|
||||||
Indicates that 'Passing, remove from fail list' results should not be emitted as failures. (For example, this is used
|
Indicates that 'Passing, remove from fail list' results should not be emitted as failures. (For example, this is used
|
||||||
when using vcpkg to test a prerelease MSVC++ compiler)
|
when using vcpkg to test a prerelease MSVC++ compiler)
|
||||||
|
|
||||||
|
.PARAMETER EnforceCascades
|
||||||
|
Enforces that the cascade count from ci.baseline.txt and "supports" is consistent with last known values.
|
||||||
#>
|
#>
|
||||||
|
|
||||||
[CmdletBinding(DefaultParameterSetName="ArchivesRoot")]
|
[CmdletBinding(DefaultParameterSetName="ArchivesRoot")]
|
||||||
@ -48,7 +51,9 @@ Param(
|
|||||||
$BinarySourceStub = $null,
|
$BinarySourceStub = $null,
|
||||||
$BuildReason = $null,
|
$BuildReason = $null,
|
||||||
[switch]
|
[switch]
|
||||||
$PassingIsPassing = $false
|
$PassingIsPassing = $false,
|
||||||
|
[switch]
|
||||||
|
$EnforceCascades = $false
|
||||||
)
|
)
|
||||||
|
|
||||||
if (-Not ((Test-Path "triplets/$Triplet.cmake") -or (Test-Path "triplets/community/$Triplet.cmake"))) {
|
if (-Not ((Test-Path "triplets/$Triplet.cmake") -or (Test-Path "triplets/community/$Triplet.cmake"))) {
|
||||||
@ -116,21 +121,59 @@ $xmlFile = Join-Path $xmlResults "$Triplet.xml"
|
|||||||
$failureLogs = Join-Path $ArtifactStagingDirectory 'failure-logs'
|
$failureLogs = Join-Path $ArtifactStagingDirectory 'failure-logs'
|
||||||
|
|
||||||
& "./vcpkg$executableExtension" x-ci-clean @commonArgs
|
& "./vcpkg$executableExtension" x-ci-clean @commonArgs
|
||||||
|
if ($LASTEXITCODE -ne 0)
|
||||||
|
{
|
||||||
|
throw "vcpkg clean failed"
|
||||||
|
}
|
||||||
|
|
||||||
$skipList = . "$PSScriptRoot/generate-skip-list.ps1" `
|
$skipList = . "$PSScriptRoot/generate-skip-list.ps1" `
|
||||||
-Triplet $Triplet `
|
-Triplet $Triplet `
|
||||||
-BaselineFile "$PSScriptRoot/../ci.baseline.txt" `
|
-BaselineFile "$PSScriptRoot/../ci.baseline.txt" `
|
||||||
-SkipFailures:$skipFailures
|
-SkipFailures:$skipFailures
|
||||||
|
|
||||||
|
$ciArgs = $commonArgs
|
||||||
|
if ($EnforceCascades) {
|
||||||
|
if ($Triplet -eq 'x86-windows') {
|
||||||
|
$cascades = 28
|
||||||
|
} elseif ($Triplet -eq 'x64-windows') {
|
||||||
|
$cascades = 21
|
||||||
|
} elseif ($Triplet -eq 'x64-windows-static') {
|
||||||
|
$cascades = 59
|
||||||
|
} elseif ($Triplet -eq 'x64-windows-static-md') {
|
||||||
|
$cascades = 53
|
||||||
|
} elseif ($Triplet -eq 'x64-uwp') {
|
||||||
|
$cascades = 345
|
||||||
|
} elseif ($Triplet -eq 'arm64-windows') {
|
||||||
|
$cascades = 228
|
||||||
|
} elseif ($Triplet -eq 'arm-uwp') {
|
||||||
|
$cascades = 345
|
||||||
|
} elseif ($Triplet -eq 'x64-osx') {
|
||||||
|
$cascades = 61
|
||||||
|
} elseif ($Triplet -eq 'x64-linux') {
|
||||||
|
$cascades = 31
|
||||||
|
} else {
|
||||||
|
throw "Unknown triplet ($Triplet); could not determine expected cascade count. Update test-modified-ports.ps1."
|
||||||
|
}
|
||||||
|
|
||||||
|
$ciArgs += @("--x-skipped-cascade-count=$cascades")
|
||||||
|
}
|
||||||
|
|
||||||
if ($Triplet -in @('x64-windows', 'x64-osx', 'x64-linux'))
|
if ($Triplet -in @('x64-windows', 'x64-osx', 'x64-linux'))
|
||||||
{
|
{
|
||||||
# WORKAROUND: These triplets are native-targetting which triggers an issue in how vcpkg handles the skip list.
|
# WORKAROUND: These triplets are native-targetting which triggers an issue in how vcpkg handles the skip list.
|
||||||
# The workaround is to pass the skip list as host-excludes as well.
|
# The workaround is to pass the skip list as host-excludes as well.
|
||||||
& "./vcpkg$executableExtension" ci $Triplet --x-xunit=$xmlFile --exclude=$skipList --host-exclude=$skipList --failure-logs=$failureLogs @commonArgs
|
& "./vcpkg$executableExtension" ci $Triplet --x-xunit=$xmlFile --exclude=$skipList --host-exclude=$skipList --failure-logs=$failureLogs @ciArgs
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
& "./vcpkg$executableExtension" ci $Triplet --x-xunit=$xmlFile --exclude=$skipList --failure-logs=$failureLogs @commonArgs
|
& "./vcpkg$executableExtension" ci $Triplet --x-xunit=$xmlFile --exclude=$skipList --failure-logs=$failureLogs @ciArgs
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($LASTEXITCODE -ne 0)
|
||||||
|
{
|
||||||
|
throw "vcpkg ci failed"
|
||||||
|
}
|
||||||
|
|
||||||
& "$PSScriptRoot/analyze-test-results.ps1" -logDir $xmlResults `
|
& "$PSScriptRoot/analyze-test-results.ps1" -logDir $xmlResults `
|
||||||
-triplet $Triplet `
|
-triplet $Triplet `
|
||||||
-baselineFile .\scripts\ci.baseline.txt `
|
-baselineFile .\scripts\ci.baseline.txt `
|
||||||
|
@ -39,7 +39,7 @@ jobs:
|
|||||||
inputs:
|
inputs:
|
||||||
failOnStderr: true
|
failOnStderr: true
|
||||||
filePath: 'scripts/azure-pipelines/test-modified-ports.ps1'
|
filePath: 'scripts/azure-pipelines/test-modified-ports.ps1'
|
||||||
arguments: '-Triplet ${{ parameters.triplet }} -BuildReason $(Build.Reason) -BinarySourceStub "$(X_VCPKG_BINARY_SOURCE_STUB)" -WorkingRoot ${{ variables.WORKING_ROOT }} -ArtifactStagingDirectory $(Build.ArtifactStagingDirectory)'
|
arguments: '-Triplet ${{ parameters.triplet }} -BuildReason $(Build.Reason) -BinarySourceStub "$(X_VCPKG_BINARY_SOURCE_STUB)" -WorkingRoot ${{ variables.WORKING_ROOT }} -ArtifactStagingDirectory $(Build.ArtifactStagingDirectory) -EnforceCascades'
|
||||||
pwsh: true
|
pwsh: true
|
||||||
- task: PowerShell@2
|
- task: PowerShell@2
|
||||||
displayName: 'Validate version files'
|
displayName: 'Validate version files'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user