mirror of
https://github.com/microsoft/terminal.git
synced 2025-12-11 04:38:24 -06:00
Add support for ARM64 testing, reintroduce it in CI (#15761)
This pull request introduces the arm64 testing agents and a few build phases to use them. In addition to running the ARM64 tests in CI, it makes the following changes: - The x64 tests now run on equivalent x64 testing agents - We now run ARM64 builds (and tests!) on all pull requests - I've deduplicated a lot of the build and test stages - New queue-time parameters have been added to control various phases, for quick pipeline testing - A bunch of conditions have been promoted to compile-time checks to control the existence of stages and steps more tightly
This commit is contained in:
parent
d70794a246
commit
cbe915c554
@ -29,64 +29,36 @@ variables:
|
|||||||
# 0.0.1904.0900
|
# 0.0.1904.0900
|
||||||
name: 0.0.$(Date:yyMM).$(Date:dd)$(Rev:rr)
|
name: 0.0.$(Date:yyMM).$(Date:dd)$(Rev:rr)
|
||||||
|
|
||||||
|
parameters:
|
||||||
|
- name: auditMode
|
||||||
|
displayName: "Build in Audit Mode (x64)"
|
||||||
|
type: boolean
|
||||||
|
default: true
|
||||||
|
- name: runTests
|
||||||
|
displayName: "Run Unit and Feature Tests"
|
||||||
|
type: boolean
|
||||||
|
default: true
|
||||||
|
- name: submitHelix
|
||||||
|
displayName: "Submit to Helix for testing and PGO"
|
||||||
|
type: boolean
|
||||||
|
default: true
|
||||||
|
- name: buildPlatforms
|
||||||
|
type: object
|
||||||
|
default:
|
||||||
|
- x64
|
||||||
|
- x86
|
||||||
|
- arm64
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- stage: Audit_x64
|
- ${{ if eq(parameters.auditMode, true) }}:
|
||||||
displayName: Audit Mode
|
- stage: Audit_x64
|
||||||
dependsOn: []
|
displayName: Audit Mode
|
||||||
condition: succeeded()
|
dependsOn: []
|
||||||
jobs:
|
condition: succeeded()
|
||||||
- template: ./templates/build-console-audit-job.yml
|
jobs:
|
||||||
parameters:
|
- template: ./templates/build-console-audit-job.yml
|
||||||
platform: x64
|
parameters:
|
||||||
|
platform: x64
|
||||||
- stage: Build_x64
|
|
||||||
displayName: Build x64
|
|
||||||
dependsOn: []
|
|
||||||
condition: succeeded()
|
|
||||||
jobs:
|
|
||||||
- template: ./templates/build-console-ci.yml
|
|
||||||
parameters:
|
|
||||||
platform: x64
|
|
||||||
- stage: Build_x86
|
|
||||||
displayName: Build x86
|
|
||||||
dependsOn: []
|
|
||||||
jobs:
|
|
||||||
- template: ./templates/build-console-ci.yml
|
|
||||||
parameters:
|
|
||||||
platform: x86
|
|
||||||
- stage: Build_ARM64
|
|
||||||
displayName: Build ARM64
|
|
||||||
dependsOn: []
|
|
||||||
condition: not(eq(variables['Build.Reason'], 'PullRequest'))
|
|
||||||
jobs:
|
|
||||||
- template: ./templates/build-console-ci.yml
|
|
||||||
parameters:
|
|
||||||
platform: ARM64
|
|
||||||
|
|
||||||
- stage: Test_x64
|
|
||||||
displayName: Test x64
|
|
||||||
dependsOn: [Build_x64]
|
|
||||||
condition: succeeded()
|
|
||||||
jobs:
|
|
||||||
- template: ./templates/test-console-ci.yml
|
|
||||||
parameters:
|
|
||||||
platform: x64
|
|
||||||
- stage: Test_x86
|
|
||||||
displayName: Test x86
|
|
||||||
dependsOn: [Build_x86]
|
|
||||||
jobs:
|
|
||||||
- template: ./templates/test-console-ci.yml
|
|
||||||
parameters:
|
|
||||||
platform: x86
|
|
||||||
|
|
||||||
- stage: Helix_x64
|
|
||||||
displayName: Helix x64
|
|
||||||
dependsOn: [Build_x64]
|
|
||||||
condition: and(succeeded(), not(eq(variables['Build.Reason'], 'PullRequest')))
|
|
||||||
jobs:
|
|
||||||
- template: ./templates/console-ci-helix-job.yml
|
|
||||||
parameters:
|
|
||||||
platform: x64
|
|
||||||
|
|
||||||
- stage: Scripts
|
- stage: Scripts
|
||||||
displayName: Code Health Scripts
|
displayName: Code Health Scripts
|
||||||
@ -95,10 +67,38 @@ stages:
|
|||||||
jobs:
|
jobs:
|
||||||
- template: ./templates/check-formatting.yml
|
- template: ./templates/check-formatting.yml
|
||||||
|
|
||||||
|
- ${{ each platform in parameters.buildPlatforms }}:
|
||||||
|
- stage: Build_${{ platform }}
|
||||||
|
displayName: Build ${{ platform }}
|
||||||
|
dependsOn: []
|
||||||
|
condition: succeeded()
|
||||||
|
jobs:
|
||||||
|
- template: ./templates/build-console-ci.yml
|
||||||
|
parameters:
|
||||||
|
platform: ${{ platform }}
|
||||||
|
- ${{ if eq(parameters.runTests, true) }}:
|
||||||
|
- stage: Test_${{ platform }}
|
||||||
|
displayName: Test ${{ platform }}
|
||||||
|
dependsOn:
|
||||||
|
- Build_${{ platform }}
|
||||||
|
condition: succeeded()
|
||||||
|
jobs:
|
||||||
|
- template: ./templates/test-console-ci.yml
|
||||||
|
parameters:
|
||||||
|
platform: ${{ platform }}
|
||||||
|
|
||||||
- stage: CodeIndexer
|
- ${{ if and(containsValue(parameters.buildPlatforms, 'x64'), eq(parameters.submitHelix, true), ne(variables['Build.Reason'], 'PullRequest')) }}:
|
||||||
displayName: Github CodeNav Indexer
|
- stage: Helix_x64
|
||||||
dependsOn: [Build_x64]
|
displayName: Helix x64
|
||||||
condition: and(succeeded(), not(eq(variables['Build.Reason'], 'PullRequest')))
|
dependsOn: [Build_x64]
|
||||||
jobs:
|
jobs:
|
||||||
- template: ./templates/codenav-indexer.yml
|
- template: ./templates/console-ci-helix-job.yml
|
||||||
|
parameters:
|
||||||
|
platform: x64
|
||||||
|
|
||||||
|
- ${{ if and(containsValue(parameters.buildPlatforms, 'x64'), ne(variables['Build.Reason'], 'PullRequest')) }}:
|
||||||
|
- stage: CodeIndexer
|
||||||
|
displayName: Github CodeNav Indexer
|
||||||
|
dependsOn: [Build_x64]
|
||||||
|
jobs:
|
||||||
|
- template: ./templates/codenav-indexer.yml
|
||||||
|
|||||||
@ -13,14 +13,19 @@ jobs:
|
|||||||
BuildPlatform: ${{ parameters.platform }}
|
BuildPlatform: ${{ parameters.platform }}
|
||||||
pool:
|
pool:
|
||||||
${{ if eq(variables['System.CollectionUri'], 'https://dev.azure.com/ms/') }}:
|
${{ if eq(variables['System.CollectionUri'], 'https://dev.azure.com/ms/') }}:
|
||||||
name: SHINE-OSS-L
|
${{ if ne(parameters.platform, 'ARM64') }}:
|
||||||
|
name: SHINE-OSS-Testing-x64
|
||||||
|
${{ else }}:
|
||||||
|
name: SHINE-OSS-Testing-arm64
|
||||||
${{ if ne(variables['System.CollectionUri'], 'https://dev.azure.com/ms/') }}:
|
${{ if ne(variables['System.CollectionUri'], 'https://dev.azure.com/ms/') }}:
|
||||||
name: SHINE-INT-L
|
${{ if ne(parameters.platform, 'ARM64') }}:
|
||||||
demands: ImageOverride -equals SHINE-VS17-Latest
|
name: SHINE-INT-Testing-x64
|
||||||
|
${{ else }}:
|
||||||
|
name: SHINE-INT-Testing-arm64
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- checkout: self
|
- checkout: self
|
||||||
submodules: true
|
submodules: false
|
||||||
clean: true
|
clean: true
|
||||||
fetchDepth: 1
|
fetchDepth: 1
|
||||||
|
|
||||||
@ -43,15 +48,16 @@ jobs:
|
|||||||
targetType: filePath
|
targetType: filePath
|
||||||
filePath: build\scripts\Run-Tests.ps1
|
filePath: build\scripts\Run-Tests.ps1
|
||||||
arguments: -MatchPattern '*unit.test*.dll' -Platform '$(RationalizedBuildPlatform)' -Configuration '$(BuildConfiguration)' -LogPath '${{ parameters.testLogPath }}' -Root "$(System.ArtifactsDirectory)\\${{ parameters.artifactName }}\\$(BuildConfiguration)\\$(BuildPlatform)\\test"
|
arguments: -MatchPattern '*unit.test*.dll' -Platform '$(RationalizedBuildPlatform)' -Configuration '$(BuildConfiguration)' -LogPath '${{ parameters.testLogPath }}' -Root "$(System.ArtifactsDirectory)\\${{ parameters.artifactName }}\\$(BuildConfiguration)\\$(BuildPlatform)\\test"
|
||||||
condition: and(and(succeeded(), ne(variables['PGOBuildMode'], 'Instrument')), or(eq(variables['BuildPlatform'], 'x64'), eq(variables['BuildPlatform'], 'x86')))
|
condition: and(succeeded(), ne(variables['PGOBuildMode'], 'Instrument'))
|
||||||
|
|
||||||
- task: PowerShell@2
|
- ${{ if or(eq(parameters.platform, 'x64'), eq(parameters.platform, 'arm64')) }}:
|
||||||
displayName: 'Run Feature Tests (x64 only)'
|
- task: PowerShell@2
|
||||||
inputs:
|
displayName: 'Run Feature Tests'
|
||||||
targetType: filePath
|
inputs:
|
||||||
filePath: build\scripts\Run-Tests.ps1
|
targetType: filePath
|
||||||
arguments: -MatchPattern '*feature.test*.dll' -Platform '$(RationalizedBuildPlatform)' -Configuration '$(BuildConfiguration)' -LogPath '${{ parameters.testLogPath }}' -Root "$(System.ArtifactsDirectory)\\${{ parameters.artifactName }}\\$(BuildConfiguration)\\$(BuildPlatform)\\test"
|
filePath: build\scripts\Run-Tests.ps1
|
||||||
condition: and(and(succeeded(), ne(variables['PGOBuildMode'], 'Instrument')), eq(variables['BuildPlatform'], 'x64'))
|
arguments: -MatchPattern '*feature.test*.dll' -Platform '$(RationalizedBuildPlatform)' -Configuration '$(BuildConfiguration)' -LogPath '${{ parameters.testLogPath }}' -Root "$(System.ArtifactsDirectory)\\${{ parameters.artifactName }}\\$(BuildConfiguration)\\$(BuildPlatform)\\test"
|
||||||
|
condition: and(succeeded(), ne(variables['PGOBuildMode'], 'Instrument'))
|
||||||
|
|
||||||
- task: PowerShell@2
|
- task: PowerShell@2
|
||||||
displayName: 'Convert Test Logs from WTL to xUnit format'
|
displayName: 'Convert Test Logs from WTL to xUnit format'
|
||||||
@ -59,7 +65,7 @@ jobs:
|
|||||||
targetType: filePath
|
targetType: filePath
|
||||||
filePath: build\Helix\ConvertWttLogToXUnit.ps1
|
filePath: build\Helix\ConvertWttLogToXUnit.ps1
|
||||||
arguments: -WttInputPath '${{ parameters.testLogPath }}' -WttSingleRerunInputPath 'unused.wtl' -WttMultipleRerunInputPath 'unused2.wtl' -XUnitOutputPath 'onBuildMachineResults.xml' -TestNamePrefix '$(BuildConfiguration).$(BuildPlatform)'
|
arguments: -WttInputPath '${{ parameters.testLogPath }}' -WttSingleRerunInputPath 'unused.wtl' -WttMultipleRerunInputPath 'unused2.wtl' -XUnitOutputPath 'onBuildMachineResults.xml' -TestNamePrefix '$(BuildConfiguration).$(BuildPlatform)'
|
||||||
condition: and(ne(variables['PGOBuildMode'], 'Instrument'),or(eq(variables['BuildPlatform'], 'x64'), eq(variables['BuildPlatform'], 'x86')))
|
condition: ne(variables['PGOBuildMode'], 'Instrument')
|
||||||
|
|
||||||
- task: PublishTestResults@2
|
- task: PublishTestResults@2
|
||||||
displayName: 'Upload converted test logs'
|
displayName: 'Upload converted test logs'
|
||||||
@ -67,13 +73,9 @@ jobs:
|
|||||||
inputs:
|
inputs:
|
||||||
testResultsFormat: 'xUnit' # Options: JUnit, NUnit, VSTest, xUnit, cTest
|
testResultsFormat: 'xUnit' # Options: JUnit, NUnit, VSTest, xUnit, cTest
|
||||||
testResultsFiles: '**/onBuildMachineResults.xml'
|
testResultsFiles: '**/onBuildMachineResults.xml'
|
||||||
#searchFolder: '$(System.DefaultWorkingDirectory)' # Optional
|
|
||||||
#mergeTestResults: false # Optional
|
|
||||||
#failTaskOnFailedTests: false # Optional
|
|
||||||
testRunTitle: 'On Build Machine Tests' # Optional
|
testRunTitle: 'On Build Machine Tests' # Optional
|
||||||
buildPlatform: $(BuildPlatform) # Optional
|
buildPlatform: $(BuildPlatform) # Optional
|
||||||
buildConfiguration: $(BuildConfiguration) # Optional
|
buildConfiguration: $(BuildConfiguration) # Optional
|
||||||
#publishRunAttachments: true # Optional
|
|
||||||
|
|
||||||
- task: CopyFiles@2
|
- task: CopyFiles@2
|
||||||
displayName: 'Copy result logs to Artifacts'
|
displayName: 'Copy result logs to Artifacts'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user