Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
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
61 changes: 52 additions & 9 deletions diagnostics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ extends:
parameters:
stages:
- stage: build
displayName: Build and Test Diagnostics
displayName: Build Diagnostics
jobs:

############################
Expand All @@ -79,10 +79,11 @@ extends:
jobTemplate: ${{ variables.jobTemplate }}
name: Windows
osGroup: Windows_NT
buildOnly: ${{ parameters.buildOnly }}
buildOnly: true
buildConfigs:
- configuration: Debug
architecture: x64
artifactUploadPath: bin/Windows_NT.x64.Debug
- configuration: Release
architecture: x64
artifactUploadPath: bin
Expand Down Expand Up @@ -134,14 +135,15 @@ extends:
parameters:
jobTemplate: ${{ variables.jobTemplate }}
osGroup: MacOS
buildOnly: ${{ parameters.buildOnly }}
buildOnly: true
buildConfigs:
- configuration: Release
architecture: x64
artifactUploadPath: bin/osx.x64.Release
- ${{ if in(variables['Build.Reason'], 'PullRequest') }}:
- configuration: Debug
architecture: x64
artifactUploadPath: bin/osx.x64.Debug

- template: /eng/pipelines/build.yml
parameters:
Expand Down Expand Up @@ -212,13 +214,47 @@ extends:
artifactUploadPath: bin/linux.arm64.Release
artifactTargetPath: bin/linux-musl.arm64.Release

############################
# #
# Test only legs #
# #
############################
############################
# #
# Test stage #
# #
############################

- ${{ if ne(parameters.buildOnly, true) }}:
- stage: test
displayName: Test Diagnostics
dependsOn: build
jobs:

- template: /eng/pipelines/build.yml
parameters:
jobTemplate: ${{ variables.jobTemplate }}
name: Windows_Test
osGroup: Windows_NT
dependsOn: Windows
testOnly: true
buildConfigs:
- configuration: Debug
architecture: x64
- configuration: Release
architecture: x64
- configuration: Release
architecture: x86

- template: /eng/pipelines/build.yml
parameters:
jobTemplate: ${{ variables.jobTemplate }}
name: MacOS_Test
osGroup: MacOS
dependsOn: MacOS
testOnly: true
buildConfigs:
- configuration: Release
architecture: x64
- ${{ if in(variables['Build.Reason'], 'PullRequest') }}:
- configuration: Debug
architecture: x64

- ${{ if ne(parameters.buildOnly, true) }}:
- template: /eng/pipelines/build.yml
parameters:
jobTemplate: ${{ variables.jobTemplate }}
Expand Down Expand Up @@ -267,9 +303,16 @@ extends:
# - configuration: Debug
# architecture: x64

############################
# #
# Package stage #
# #
############################

- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- stage: package
displayName: Package, Sign, and Generate BAR Manifests
dependsOn: build
jobs:
- template: /eng/common/templates-official/job/job.yml
parameters:
Expand Down
23 changes: 18 additions & 5 deletions eng/pipelines/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ jobs:
${{ if ne(parameters.strategy, '') }}:
'error, we can no longer support the strategy feature in the new pipeline system. Please remove the strategy from the job template.': error

${{ if ne(parameters.dependsOn, '') }}:
${{ if and(ne(parameters.dependsOn, ''), ne(parameters.testOnly, true)) }}:
dependsOn: ${{ parameters.dependsOn }}_${{ config.architecture }}_${{ config.configuration }}

workspace:
Expand All @@ -133,6 +133,19 @@ jobs:
- ${{ if ne(parameters.osGroup, 'Windows_NT') }}:
- _buildScript: $(Build.SourcesDirectory)/build.sh

# Native artifact folder names used by the test-only legs.
# _downloadOSFolder: the folder name as published by the build leg.
# _localOSFolder: the folder name expected by the build script on the test machine.
- ${{ if eq(parameters.osGroup, 'Windows_NT') }}:
- _downloadOSFolder: Windows_NT
- _localOSFolder: Windows_NT
- ${{ elseif eq(parameters.osGroup, 'MacOS') }}:
- _downloadOSFolder: osx
- _localOSFolder: osx
- ${{ else }}:
- _downloadOSFolder: linux${{ parameters.osSuffix }}
- _localOSFolder: linux

- ${{ if and(eq(parameters.testOnly, 'true'), eq(parameters.buildOnly, 'true')) }}:
'error, testOnly and buildOnly cannot be true at the same time': error

Expand All @@ -157,8 +170,8 @@ jobs:

steps:
- ${{ if eq(parameters.testOnly, true) }}:
- ${{ if ne(parameters.osGroup, 'Linux') }}:
- 'error, testOnly is only supported on Linux': error
- ${{ if notIn(parameters.osGroup, 'Windows_NT', 'MacOS', 'Linux') }}:
- 'error, testOnly is only supported on Windows_NT, MacOS, and Linux': error
- task: DownloadPipelineArtifact@2
displayName: 'Download Build Artifacts'
inputs:
Expand All @@ -168,8 +181,8 @@ jobs:
- task: CopyFiles@2
displayName: 'Binplace Downloaded Product'
inputs:
sourceFolder: $(Build.ArtifactStagingDirectory)/__download__/Build_${{ parameters.dependsOn }}_${{ config.architecture }}_${{ config.configuration }}/bin/linux${{ parameters.osSuffix }}.${{ config.architecture }}.${{ config.configuration }}
targetFolder: '$(Build.SourcesDirectory)/artifacts/bin/linux.${{ config.architecture }}.${{ config.configuration }}'
sourceFolder: $(Build.ArtifactStagingDirectory)/__download__/Build_${{ parameters.dependsOn }}_${{ config.architecture }}_${{ config.configuration }}/bin/$(_downloadOSFolder).${{ config.architecture }}.${{ config.configuration }}
targetFolder: '$(Build.SourcesDirectory)/artifacts/bin/$(_localOSFolder).${{ config.architecture }}.${{ config.configuration }}'

- script: $(_buildScript)
-ci
Expand Down
Loading