[macos ci] move out tensorflow (#20388)

* [macos ci] move out tensorflow

* rename ExtraPorts and CorePorts

Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
This commit is contained in:
nicole mazzuca 2021-09-29 13:15:25 -07:00 committed by GitHub
parent 9b6135efaf
commit 45315bc3aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 86 additions and 28 deletions

View File

@ -52,6 +52,16 @@ jobs:
- template: osx/azure-pipelines.yml - template: osx/azure-pipelines.yml
parameters: parameters:
poolName: $(osx-pool) poolName: $(osx-pool)
${{ if eq(variables['Build.Reason'], 'PullRequest') }}:
mode: AllPorts
${{ if ne(variables['Build.Reason'], 'PullRequest') }}:
mode: NonTensorflow
- ${{ if ne(variables['Build.Reason'], 'PullRequest') }}:
- template: osx/azure-pipelines.yml
parameters:
poolName: $(osx-pool)
mode: OnlyTensorflow
jobName: x64_osx_tensorflow
- template: linux/azure-pipelines.yml - template: linux/azure-pipelines.yml
parameters: parameters:

View File

@ -20,7 +20,8 @@ The path to the ci.baseline.txt file.
Param( Param(
[string]$Triplet, [string]$Triplet,
[string]$BaselineFile, [string]$BaselineFile,
[switch]$SkipFailures = $false [switch]$SkipFailures = $false,
[String[]]$AdditionalSkips = @()
) )
$ErrorActionPreference = 'Stop' $ErrorActionPreference = 'Stop'
@ -80,4 +81,5 @@ if ($SkipFailures) {
$skip_list = $baselineForTriplet ` $skip_list = $baselineForTriplet `
| Where-Object { $_ -match $targetRegex } ` | Where-Object { $_ -match $targetRegex } `
| ForEach-Object { $_ -replace ":.*$" } | ForEach-Object { $_ -replace ":.*$" }
$skip_list += $AdditionalSkips
[string]::Join(",", $skip_list) [string]::Join(",", $skip_list)

View File

@ -2,8 +2,21 @@
# SPDX-License-Identifier: MIT # SPDX-License-Identifier: MIT
# #
parameters:
- name: poolName
type: string
- name: mode
type: string
values:
- 'AllPorts'
- 'NonTensorflow'
- 'OnlyTensorflow'
- name: jobName
type: string
default: x64_osx
jobs: jobs:
- job: x64_osx - job: "${{ parameters.jobName }}"
pool: pool:
name: ${{ parameters.poolName }} name: ${{ parameters.poolName }}
workspace: workspace:
@ -20,6 +33,18 @@ jobs:
- group: vcpkg-asset-caching-credentials - group: vcpkg-asset-caching-credentials
- name: X_VCPKG_ASSET_SOURCES - name: X_VCPKG_ASSET_SOURCES
value: "x-azurl,$(root-url),$(sas),readwrite" value: "x-azurl,$(root-url),$(sas),readwrite"
- name: PowershellExtraArguments
${{ if eq(parameters.mode, 'AllPorts') }}:
value: ''
${{ if eq(parameters.mode, 'NonTensorflow') }}:
value: "-AdditionalSkips @('tensorflow', 'tensorflow-cc')"
${{ if eq(parameters.mode, 'OnlyTensorflow') }}:
value: "-OnlyTest @('tensorflow', 'tensorflow-cc')"
- name: Postfix
${{ if eq(parameters.mode, 'OnlyTensorflow') }}:
value: '-tensorflow'
${{ if ne(parameters.mode, 'OnlyTensorflow') }}:
value: ''
steps: steps:
- bash: df -h - bash: df -h
@ -39,7 +64,13 @@ 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 "${{ variables.BINARY_SOURCE_STUB }}"
-WorkingRoot "${{ variables.WORKING_ROOT }}"
-ArtifactStagingDirectory "$(Build.ArtifactStagingDirectory)"
${{ variables.PowershellExtraArguments }}
pwsh: true pwsh: true
- bash: | - bash: |
df -h df -h
@ -49,15 +80,15 @@ jobs:
displayName: 'Publish Artifact: failure logs for x64-osx' displayName: 'Publish Artifact: failure logs for x64-osx'
inputs: inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)/failure-logs' PathtoPublish: '$(Build.ArtifactStagingDirectory)/failure-logs'
ArtifactName: 'failure logs for x64-osx' ArtifactName: 'failure logs for x64-osx${{ variables.Postfix }}'
condition: ne(variables['FAILURE_LOGS_EMPTY'], 'True') condition: ne(variables['FAILURE_LOGS_EMPTY'], 'True')
- bash: | - bash: |
python3 scripts/file_script.py /Users/vagrant/Data/installed/vcpkg/info/ python3 scripts/file_script.py /Users/vagrant/Data/installed/vcpkg/info/
displayName: 'Build a file list for all packages' displayName: 'Build a file list for all packages'
condition: always() condition: always()
- task: PublishBuildArtifacts@1 - task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: file lists for x64-osx' displayName: 'Publish Artifact: file lists for x64-osx${{ variables.Postfix }}'
condition: always() condition: always()
inputs: inputs:
PathtoPublish: scripts/list_files PathtoPublish: scripts/list_files
ArtifactName: 'file lists for x64-osx' ArtifactName: 'file lists for x64-osx${{ variables.Postfix }}'

View File

@ -46,9 +46,10 @@ Param(
$ArchivesRoot = $null, $ArchivesRoot = $null,
[Parameter(ParameterSetName='BinarySourceStub')] [Parameter(ParameterSetName='BinarySourceStub')]
$BinarySourceStub = $null, $BinarySourceStub = $null,
$BuildReason = $null, [String]$BuildReason = $null,
[switch] [String[]]$AdditionalSkips = @(),
$PassingIsPassing = $false [String[]]$OnlyTest = $null,
[switch]$PassingIsPassing = $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"))) {
@ -124,28 +125,42 @@ if ($LASTEXITCODE -ne 0)
$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 `
-AdditionalSkips $AdditionalSkips
if ($Triplet -in @('x64-windows', 'x64-osx', 'x64-linux')) if ($null -ne $OnlyTest)
{ {
# WORKAROUND: These triplets are native-targetting which triggers an issue in how vcpkg handles the skip list. $OnlyTest | % {
# The workaround is to pass the skip list as host-excludes as well. $portName = $_
& "./vcpkg$executableExtension" ci $Triplet --x-xunit=$xmlFile --exclude=$skipList --host-exclude=$skipList --failure-logs=$failureLogs @commonArgs & "./vcpkg$executableExtension" install --triplet $Triplet @commonArgs $portName
[System.Console]::Error.WriteLine( `
"REGRESSION: ${portName}:$triplet. If expected, remove ${portName} from the OnlyTest list." `
)
}
} }
else else
{ {
& "./vcpkg$executableExtension" ci $Triplet --x-xunit=$xmlFile --exclude=$skipList --failure-logs=$failureLogs @commonArgs 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.
# 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
}
else
{
& "./vcpkg$executableExtension" ci $Triplet --x-xunit=$xmlFile --exclude=$skipList --failure-logs=$failureLogs @commonArgs
}
$failureLogsEmpty = ((Test-Path $failureLogs) -and (Get-ChildItem $failureLogs).count -eq 0)
Write-Host "##vso[task.setvariable variable=FAILURE_LOGS_EMPTY]$failureLogsEmpty"
if ($LASTEXITCODE -ne 0)
{
throw "vcpkg ci failed"
}
& "$PSScriptRoot/analyze-test-results.ps1" -logDir $xmlResults `
-triplet $Triplet `
-baselineFile .\scripts\ci.baseline.txt `
-passingIsPassing:$PassingIsPassing
} }
$failureLogsEmpty = ((Test-Path $failureLogs) -and (Get-ChildItem $failureLogs).count -eq 0)
Write-Host "##vso[task.setvariable variable=FAILURE_LOGS_EMPTY]$failureLogsEmpty"
if ($LASTEXITCODE -ne 0)
{
throw "vcpkg ci failed"
}
& "$PSScriptRoot/analyze-test-results.ps1" -logDir $xmlResults `
-triplet $Triplet `
-baselineFile .\scripts\ci.baseline.txt `
-passingIsPassing:$PassingIsPassing