Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[macos ci] move out tensorflow #20388

Merged
merged 3 commits into from
Sep 29, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions scripts/azure-pipelines/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,16 @@ stages:
- template: osx/azure-pipelines.yml
parameters:
poolName: $(osx-pool)
${{ if eq(variables['Build.Reason'], 'PullRequest') }}:
mode: AllPorts
${{ if ne(variables['Build.Reason'], 'PullRequest') }}:
mode: CorePorts
BillyONeal marked this conversation as resolved.
Show resolved Hide resolved
- ${{ if ne(variables['Build.Reason'], 'PullRequest') }}:
- template: osx/azure-pipelines.yml
parameters:
poolName: $(osx-pool)
mode: ExtraPorts
jobName: x64_osx_tensorflow

- template: linux/azure-pipelines.yml
parameters:
Expand Down
4 changes: 3 additions & 1 deletion scripts/azure-pipelines/generate-skip-list.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ The path to the ci.baseline.txt file.
Param(
[string]$Triplet,
[string]$BaselineFile,
[switch]$SkipFailures = $false
[switch]$SkipFailures = $false,
[String[]]$AdditionalSkips = @()
)

$ErrorActionPreference = 'Stop'
Expand Down Expand Up @@ -80,4 +81,5 @@ if ($SkipFailures) {
$skip_list = $baselineForTriplet `
| Where-Object { $_ -match $targetRegex } `
| ForEach-Object { $_ -replace ":.*$" }
$skip_list += $AdditionalSkips
[string]::Join(",", $skip_list)
41 changes: 36 additions & 5 deletions scripts/azure-pipelines/osx/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,21 @@
# SPDX-License-Identifier: MIT
#

parameters:
- name: poolName
type: string
- name: mode
type: string
values:
- 'AllPorts' # PR mode
- 'CorePorts' # CI, excluding tensorflow
- 'ExtraPorts' # only tensorflow
BillyONeal marked this conversation as resolved.
Show resolved Hide resolved
- name: jobName
type: string
default: x64_osx

jobs:
- job: x64_osx
- job: "${{ parameters.jobName }}"
pool:
name: ${{ parameters.poolName }}
workspace:
Expand All @@ -20,6 +33,18 @@ jobs:
- group: vcpkg-asset-caching-credentials
- name: X_VCPKG_ASSET_SOURCES
value: "x-azurl,$(root-url),$(sas),readwrite"
- name: PowershellExtraArguments
${{ if eq(parameters.mode, 'AllPorts') }}:
value: ''
${{ if eq(parameters.mode, 'CorePorts') }}:
value: "-AdditionalSkips @('tensorflow', 'tensorflow-cc')"
${{ if eq(parameters.mode, 'ExtraPorts') }}:
value: "-OnlyTest @('tensorflow', 'tensorflow-cc')"
- name: Postfix
${{ if eq(parameters.mode, 'ExtraPorts') }}:
value: '-tensorflow'
${{ if ne(parameters.mode, 'ExtraPorts') }}:
value: ''

steps:
- bash: df -h
Expand All @@ -39,7 +64,13 @@ jobs:
inputs:
failOnStderr: true
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
- bash: |
df -h
Expand All @@ -49,15 +80,15 @@ jobs:
displayName: 'Publish Artifact: failure logs for x64-osx'
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)/failure-logs'
ArtifactName: 'failure logs for x64-osx'
ArtifactName: 'failure logs for x64-osx${{ variables.Postfix }}'
condition: always()
- bash: |
python3 scripts/file_script.py /Users/vagrant/Data/installed/vcpkg/info/
displayName: 'Build a file list for all packages'
condition: always()
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: file lists for x64-osx'
displayName: 'Publish Artifact: file lists for x64-osx${{ variables.Postfix }}'
condition: always()
inputs:
PathtoPublish: scripts/list_files
ArtifactName: 'file lists for x64-osx'
ArtifactName: 'file lists for x64-osx${{ variables.Postfix }}'
51 changes: 33 additions & 18 deletions scripts/azure-pipelines/test-modified-ports.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,10 @@ Param(
$ArchivesRoot = $null,
[Parameter(ParameterSetName='BinarySourceStub')]
$BinarySourceStub = $null,
$BuildReason = $null,
[switch]
$PassingIsPassing = $false
[String]$BuildReason = $null,
[String[]]$AdditionalSkips = @(),
[String[]]$OnlyTest = $null,
[switch]$PassingIsPassing = $false
)

if (-Not ((Test-Path "triplets/$Triplet.cmake") -or (Test-Path "triplets/community/$Triplet.cmake"))) {
Expand Down Expand Up @@ -124,25 +125,39 @@ if ($LASTEXITCODE -ne 0)
$skipList = . "$PSScriptRoot/generate-skip-list.ps1" `
-Triplet $Triplet `
-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.
# 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
$OnlyTest | % {
$portName = $_
& "./vcpkg$executableExtension" install --triplet $Triplet @commonArgs $portName
[System.Console]::Error.WriteLine( `
"REGRESSION: ${portName}:$triplet. If expected, remove ${portName} from the OnlyTest list." `
)
}
}
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
}

if ($LASTEXITCODE -ne 0)
{
throw "vcpkg ci failed"
}
if ($LASTEXITCODE -ne 0)
{
throw "vcpkg ci failed"
}

& "$PSScriptRoot/analyze-test-results.ps1" -logDir $xmlResults `
-triplet $Triplet `
-baselineFile .\scripts\ci.baseline.txt `
-passingIsPassing:$PassingIsPassing
& "$PSScriptRoot/analyze-test-results.ps1" -logDir $xmlResults `
-triplet $Triplet `
-baselineFile .\scripts\ci.baseline.txt `
-passingIsPassing:$PassingIsPassing
}