2020-03-18 00:44:48 +03:00
|
|
|
variables:
|
|
|
|
- template: eng/common-variables.yml
|
|
|
|
- name: Build.Repository.Clean
|
|
|
|
value: true
|
|
|
|
|
2020-05-14 19:07:02 +03:00
|
|
|
# CI and PR triggers
|
|
|
|
trigger:
|
|
|
|
batch: true
|
|
|
|
branches:
|
|
|
|
include:
|
|
|
|
- master
|
|
|
|
|
2020-03-18 00:44:48 +03:00
|
|
|
pr:
|
2020-03-26 01:17:05 +03:00
|
|
|
branches:
|
|
|
|
include:
|
|
|
|
- master
|
2020-03-18 00:44:48 +03:00
|
|
|
|
2020-03-19 02:21:18 +03:00
|
|
|
stages:
|
2020-05-12 09:40:47 +03:00
|
|
|
- stage: Build_Windows_NT
|
|
|
|
displayName: Build Windows
|
2020-03-19 02:21:18 +03:00
|
|
|
jobs:
|
2020-03-26 01:17:05 +03:00
|
|
|
- template: /eng/common/templates/jobs/jobs.yml
|
2020-03-19 02:21:18 +03:00
|
|
|
parameters:
|
|
|
|
enableTelemetry: true
|
|
|
|
enablePublishBuildArtifacts: true
|
|
|
|
enableMicrobuild: true
|
|
|
|
enablePublishUsingPipelines: true
|
2020-03-26 01:17:05 +03:00
|
|
|
enablePublishBuildAssets: true
|
2020-03-19 02:21:18 +03:00
|
|
|
helixRepo: dotnet/xharness
|
2020-04-21 02:17:47 +03:00
|
|
|
|
2020-03-26 01:17:05 +03:00
|
|
|
jobs:
|
|
|
|
- job: Windows_NT
|
|
|
|
pool:
|
|
|
|
${{ if eq(variables._RunAsInternal, True) }}:
|
|
|
|
name: NetCoreInternal-Pool
|
|
|
|
queue: BuildPool.Server.Amd64.VS2019
|
2020-03-19 02:21:18 +03:00
|
|
|
${{ if eq(variables._RunAsPublic, True) }}:
|
2020-03-26 01:17:05 +03:00
|
|
|
name: NetCorePublic-Pool
|
|
|
|
queue: BuildPool.Server.Amd64.VS2019.Open
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2020-04-21 02:17:47 +03:00
|
|
|
Release:
|
2020-03-26 01:17:05 +03:00
|
|
|
_BuildConfig: Release
|
|
|
|
${{ if eq(variables._RunAsPublic, True) }}:
|
2020-04-21 02:17:47 +03:00
|
|
|
Debug:
|
2020-03-26 01:17:05 +03:00
|
|
|
_BuildConfig: Debug
|
|
|
|
steps:
|
2020-04-23 18:52:17 +03:00
|
|
|
- ${{ if eq(variables._RunAsPublic, False) }}:
|
|
|
|
- script: eng\common\CIBuild.cmd
|
|
|
|
-configuration $(_BuildConfig)
|
|
|
|
-prepareMachine
|
|
|
|
$(_InternalBuildArgs)
|
|
|
|
/p:Test=false
|
|
|
|
name: Build
|
|
|
|
displayName: Build
|
|
|
|
condition: succeeded()
|
2020-04-21 02:17:47 +03:00
|
|
|
|
2020-04-23 18:52:17 +03:00
|
|
|
- ${{ if eq(variables._RunAsPublic, True) }}:
|
|
|
|
- script: eng\common\CIBuild.cmd
|
|
|
|
-configuration $(_BuildConfig)
|
|
|
|
-prepareMachine
|
|
|
|
$(_InternalBuildArgs)
|
|
|
|
name: Build
|
|
|
|
displayName: Build and run tests
|
|
|
|
condition: succeeded()
|
|
|
|
|
|
|
|
- task: PublishTestResults@2
|
|
|
|
displayName: 'Publish Unit Test Results'
|
|
|
|
inputs:
|
|
|
|
testResultsFormat: xUnit
|
|
|
|
testResultsFiles: '$(Build.SourcesDirectory)/artifacts/TestResults/**/*.xml'
|
|
|
|
mergeTestResults: true
|
|
|
|
searchFolder: $(system.defaultworkingdirectory)
|
|
|
|
testRunTitle: XHarness unit tests - $(Agent.JobName)
|
|
|
|
condition: succeededOrFailed()
|
2020-04-21 02:17:47 +03:00
|
|
|
|
2020-07-30 18:43:52 +03:00
|
|
|
- ${{ if eq(variables._RunAsPublic, False) }}:
|
|
|
|
- task: ComponentGovernanceComponentDetection@0
|
|
|
|
displayName: Component Governance scan
|
|
|
|
inputs:
|
|
|
|
ignoreDirectories: '$(Build.SourcesDirectory)/.packages,$(Build.SourcesDirectory)/artifacts/obj/Microsoft.DotNet.XHarness.CLI/$(_BuildConfig)/netcoreapp3.1/android-tools-unzipped'
|
2020-03-18 00:44:48 +03:00
|
|
|
|
2020-07-30 11:02:18 +03:00
|
|
|
- ${{ if eq(variables._RunAsPublic, True) }}:
|
|
|
|
- stage: Build_OSX
|
|
|
|
displayName: Build OSX
|
|
|
|
dependsOn:
|
|
|
|
jobs:
|
|
|
|
- template: /eng/common/templates/jobs/jobs.yml
|
|
|
|
parameters:
|
|
|
|
enableTelemetry: true
|
|
|
|
enablePublishBuildArtifacts: true
|
|
|
|
enableMicrobuild: true
|
|
|
|
enablePublishUsingPipelines: true
|
|
|
|
enablePublishBuildAssets: true
|
|
|
|
helixRepo: dotnet/xharness
|
2020-04-21 02:17:47 +03:00
|
|
|
|
2020-07-30 11:02:18 +03:00
|
|
|
jobs:
|
|
|
|
- job: OSX
|
|
|
|
pool:
|
|
|
|
name: Hosted macOS
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
Release:
|
|
|
|
_BuildConfig: Release
|
|
|
|
${{ if eq(variables._RunAsPublic, True) }}:
|
|
|
|
Debug:
|
|
|
|
_BuildConfig: Debug
|
|
|
|
steps:
|
|
|
|
- ${{ if eq(variables._RunAsPublic, False) }}:
|
|
|
|
- script: eng/common/cibuild.sh
|
|
|
|
--configuration $(_BuildConfig)
|
|
|
|
--prepareMachine
|
|
|
|
$(_InternalBuildArgs)
|
|
|
|
/p:Test=false
|
|
|
|
name: Build
|
|
|
|
displayName: Build
|
|
|
|
condition: succeeded()
|
2020-04-23 18:52:17 +03:00
|
|
|
|
2020-07-30 11:02:18 +03:00
|
|
|
- ${{ if eq(variables._RunAsPublic, True) }}:
|
|
|
|
- script: eng/common/cibuild.sh
|
|
|
|
--configuration $(_BuildConfig)
|
|
|
|
--prepareMachine
|
|
|
|
$(_InternalBuildArgs)
|
|
|
|
name: Build
|
|
|
|
displayName: Build and run tests
|
|
|
|
condition: succeeded()
|
2020-05-18 19:21:24 +03:00
|
|
|
|
2020-07-30 11:02:18 +03:00
|
|
|
- bash: |
|
|
|
|
targetDir=$(Build.ArtifactStagingDirectory)/Microsoft.DotNet.XHarness.SimulatorInstaller.IntegrationTests.OSX.$(_BuildConfig)
|
|
|
|
mkdir $targetDir
|
|
|
|
cp tests/integration-tests/iOS/helix-payloads/simulatorinstaller-integration-tests.sh $targetDir
|
|
|
|
cp artifacts/packages/$(_BuildConfig)/Shipping/Microsoft.DotNet.XHarness.SimulatorInstaller*.nupkg $targetDir
|
|
|
|
displayName: Prepare the SimulatorInstaller IntegrationTests artifact
|
|
|
|
workingDirectory: $(Build.SourcesDirectory)
|
|
|
|
condition: and(succeeded(), eq(variables['_BuildConfig'], 'Debug'))
|
2020-05-12 09:40:47 +03:00
|
|
|
|
2020-07-30 11:02:18 +03:00
|
|
|
- publish: $(Build.ArtifactStagingDirectory)/Microsoft.DotNet.XHarness.SimulatorInstaller.IntegrationTests.OSX.$(_BuildConfig)
|
|
|
|
artifact: Microsoft.DotNet.XHarness.SimulatorInstaller.IntegrationTests.OSX.$(_BuildConfig)
|
|
|
|
displayName: Publish the SimulatorInstaller IntegrationTests artifact
|
|
|
|
condition: and(succeeded(), eq(variables['_BuildConfig'], 'Debug'))
|
2020-06-15 18:54:03 +03:00
|
|
|
|
2020-07-30 11:02:18 +03:00
|
|
|
- publish: $(Build.SourcesDirectory)/artifacts/packages/$(_BuildConfig)/Shipping/Microsoft.DotNet.XHarness.CLI.1.0.0-ci.nupkg
|
|
|
|
artifact: Microsoft.DotNet.XHarness.CLI.$(_BuildConfig)
|
|
|
|
displayName: Publish XHarness CLI for Helix Testing
|
|
|
|
condition: and(succeeded(), eq(variables['_BuildConfig'], 'Debug'))
|
2020-04-21 02:17:47 +03:00
|
|
|
|
2020-07-30 11:02:18 +03:00
|
|
|
- task: PublishTestResults@2
|
|
|
|
displayName: 'Publish Unit Test Results'
|
|
|
|
inputs:
|
|
|
|
testResultsFormat: xUnit
|
|
|
|
testResultsFiles: '$(Build.SourcesDirectory)/artifacts/TestResults/**/*.xml'
|
|
|
|
mergeTestResults: true
|
|
|
|
searchFolder: $(system.defaultworkingdirectory)
|
|
|
|
testRunTitle: XHarness unit tests - $(Agent.JobName)
|
|
|
|
condition: succeededOrFailed()
|
2020-04-21 02:17:47 +03:00
|
|
|
|
2020-06-15 18:54:03 +03:00
|
|
|
- stage: Test_CLI_Package_In_Helix_Android
|
2020-06-17 21:50:17 +03:00
|
|
|
displayName: 'CLI Android Integration tests (Helix SDK)'
|
2020-06-15 18:54:03 +03:00
|
|
|
dependsOn: Build_OSX
|
|
|
|
jobs:
|
|
|
|
- template: /eng/common/templates/jobs/jobs.yml
|
|
|
|
parameters:
|
|
|
|
workspace:
|
|
|
|
clean: all
|
2020-06-17 21:50:17 +03:00
|
|
|
jobs:
|
2020-06-15 18:54:03 +03:00
|
|
|
- job: Linux
|
|
|
|
pool:
|
|
|
|
vmimage: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
Build_Debug:
|
|
|
|
_BuildConfig: Debug
|
|
|
|
preSteps:
|
|
|
|
- checkout: self
|
|
|
|
clean: true
|
|
|
|
displayName: Submit Helix Job
|
|
|
|
steps:
|
|
|
|
- task: DownloadPipelineArtifact@2
|
|
|
|
inputs:
|
|
|
|
source: current
|
|
|
|
artifact: Microsoft.DotNet.XHarness.CLI.Debug
|
|
|
|
path: $(Build.SourcesDirectory)/artifacts/packages/$(_BuildConfig)/Shipping/
|
2020-06-17 21:50:17 +03:00
|
|
|
|
2020-06-15 18:54:03 +03:00
|
|
|
- script: eng/common/build.sh
|
|
|
|
--configuration $(_BuildConfig)
|
|
|
|
--prepareMachine
|
|
|
|
--ci
|
|
|
|
--restore
|
|
|
|
--test
|
|
|
|
--projects $(Build.SourcesDirectory)/tests/integration-tests/Android/Android.Helix.SDK.Tests.proj
|
2020-09-22 23:39:33 +03:00
|
|
|
/bl:$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)/Android.Helix.SDK.Tests.binlog
|
2020-06-15 18:54:03 +03:00
|
|
|
/p:RestoreUsingNuGetTargets=false
|
|
|
|
displayName: Run Helix Tests
|
|
|
|
env:
|
|
|
|
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
|
|
|
|
HelixAccessToken: ''
|
|
|
|
|
|
|
|
- stage: Test_CLI_Package_In_Helix_iOS
|
2020-06-17 21:50:17 +03:00
|
|
|
displayName: 'CLI iOS Integration tests (Helix SDK)'
|
2020-06-15 18:54:03 +03:00
|
|
|
dependsOn: Build_OSX
|
|
|
|
jobs:
|
|
|
|
- template: /eng/common/templates/jobs/jobs.yml
|
|
|
|
parameters:
|
|
|
|
workspace:
|
|
|
|
clean: all
|
2020-06-17 21:50:17 +03:00
|
|
|
jobs:
|
2020-06-15 18:54:03 +03:00
|
|
|
- job: OSX
|
|
|
|
pool:
|
|
|
|
name: Hosted macOS
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
Build_Debug:
|
|
|
|
_BuildConfig: Debug
|
|
|
|
preSteps:
|
|
|
|
- checkout: self
|
|
|
|
clean: true
|
|
|
|
displayName: Submit Helix Job
|
|
|
|
steps:
|
|
|
|
- task: DownloadPipelineArtifact@2
|
|
|
|
inputs:
|
|
|
|
source: current
|
|
|
|
artifact: Microsoft.DotNet.XHarness.CLI.Debug
|
|
|
|
path: $(Build.SourcesDirectory)/artifacts/packages/$(_BuildConfig)/Shipping/
|
2020-06-17 21:50:17 +03:00
|
|
|
|
2020-06-15 18:54:03 +03:00
|
|
|
- script: eng/common/build.sh
|
|
|
|
--configuration $(_BuildConfig)
|
|
|
|
--prepareMachine
|
|
|
|
--ci
|
|
|
|
--restore
|
|
|
|
--test
|
|
|
|
--projects $(Build.SourcesDirectory)/tests/integration-tests/iOS/iOS.Helix.SDK.Tests.proj
|
2020-09-22 23:39:33 +03:00
|
|
|
/bl:$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)/iOS.Helix.SDK.Tests.binlog
|
2020-06-15 18:54:03 +03:00
|
|
|
/p:RestoreUsingNuGetTargets=false
|
|
|
|
displayName: Run Helix Tests
|
|
|
|
env:
|
|
|
|
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
|
|
|
|
HelixAccessToken: ''
|
|
|
|
|
2020-06-29 20:01:49 +03:00
|
|
|
- stage: Test_CLI_Package_In_Helix_WASM
|
|
|
|
displayName: 'CLI WASM Integration tests (Helix SDK)'
|
|
|
|
dependsOn: Build_OSX
|
|
|
|
jobs:
|
|
|
|
- template: /eng/common/templates/jobs/jobs.yml
|
|
|
|
parameters:
|
|
|
|
workspace:
|
|
|
|
clean: all
|
|
|
|
jobs:
|
|
|
|
- job: OSX
|
|
|
|
pool:
|
|
|
|
name: Hosted macOS
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
Build_Debug:
|
|
|
|
_BuildConfig: Debug
|
|
|
|
preSteps:
|
|
|
|
- checkout: self
|
|
|
|
clean: true
|
|
|
|
displayName: Submit Helix Job
|
|
|
|
steps:
|
|
|
|
- task: DownloadPipelineArtifact@2
|
|
|
|
inputs:
|
|
|
|
source: current
|
|
|
|
artifact: Microsoft.DotNet.XHarness.CLI.Debug
|
|
|
|
path: $(Build.SourcesDirectory)/artifacts/packages/$(_BuildConfig)/Shipping/
|
|
|
|
|
|
|
|
- script: eng/common/build.sh
|
|
|
|
--configuration $(_BuildConfig)
|
|
|
|
--prepareMachine
|
|
|
|
--ci
|
|
|
|
--restore
|
|
|
|
--test
|
|
|
|
--projects $(Build.SourcesDirectory)/tests/integration-tests/WASM/WASM.Helix.SDK.Tests.proj
|
2020-09-22 23:39:33 +03:00
|
|
|
/bl:$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)/WASM.Helix.SDK.Tests.binlog
|
2020-06-29 20:01:49 +03:00
|
|
|
/p:RestoreUsingNuGetTargets=false
|
|
|
|
displayName: Run Helix Tests
|
|
|
|
env:
|
|
|
|
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
|
|
|
|
HelixAccessToken: ''
|
|
|
|
|
2020-05-18 19:21:24 +03:00
|
|
|
- stage: Test_SimulatorInstaller
|
2020-06-17 21:50:17 +03:00
|
|
|
displayName: SimulatorInstaller Integration Tests
|
2020-05-18 19:21:24 +03:00
|
|
|
dependsOn: Build_OSX
|
|
|
|
jobs:
|
|
|
|
- job: integration_tests
|
|
|
|
displayName: SimulatorInstaller Integration Tests
|
|
|
|
pool:
|
|
|
|
name: Hosted macOS
|
|
|
|
variables:
|
|
|
|
_BuildConfig: debug
|
|
|
|
steps:
|
|
|
|
- download: current
|
|
|
|
artifact: Microsoft.DotNet.XHarness.SimulatorInstaller.IntegrationTests.OSX.Debug
|
|
|
|
|
|
|
|
- template: /eng/common/templates/steps/send-to-helix.yml
|
|
|
|
parameters:
|
|
|
|
DisplayNamePrefix: Run Tests
|
2020-05-21 19:07:24 +03:00
|
|
|
HelixBaseUri: https://helix.dot.net/
|
2020-05-18 19:21:24 +03:00
|
|
|
HelixType: test/product/
|
|
|
|
IncludeDotNetCli: true
|
|
|
|
DotNetCliPackageType: sdk
|
|
|
|
DotNetCliVersion: 3.1.201
|
|
|
|
WaitForWorkItemCompletion: true
|
2020-05-21 19:07:24 +03:00
|
|
|
HelixTargetQueues: osx.1015.amd64.open
|
2020-05-18 19:21:24 +03:00
|
|
|
Creator: xharness
|
|
|
|
EnableXUnitReporter: false
|
|
|
|
WorkItemDirectory: $(Pipeline.Workspace)/Microsoft.DotNet.XHarness.SimulatorInstaller.IntegrationTests.OSX.Debug
|
2020-05-20 17:50:01 +03:00
|
|
|
WorkItemCommand: sudo ./simulatorinstaller-integration-tests.sh
|
2020-05-18 19:21:24 +03:00
|
|
|
WorkItemTimeout: 00:05:00
|
|
|
|
env:
|
|
|
|
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
|
|
|
|
HelixAccessToken: ''
|
2020-05-12 09:40:47 +03:00
|
|
|
|
2020-03-26 01:17:05 +03:00
|
|
|
- ${{ if eq(variables._RunAsInternal, True) }}:
|
|
|
|
- template: eng\common\templates\post-build\post-build.yml
|
2020-03-19 02:21:18 +03:00
|
|
|
parameters:
|
2020-09-30 18:29:51 +03:00
|
|
|
publishingInfraVersion: 3
|
2020-03-26 01:17:05 +03:00
|
|
|
enableSymbolValidation: true
|
|
|
|
# Reenable once this issue is resolved: https://github.com/dotnet/arcade/issues/2912
|
|
|
|
enableSourceLinkValidation: false
|
2020-05-12 09:40:47 +03:00
|
|
|
validateDependsOn:
|
|
|
|
- Build_Windows_NT
|
2020-03-26 01:17:05 +03:00
|
|
|
publishDependsOn:
|
|
|
|
- Validate
|
|
|
|
# This is to enable SDL runs part of Post-Build Validation Stage
|
|
|
|
SDLValidationParameters:
|
|
|
|
enable: false
|
|
|
|
continueOnError: false
|
|
|
|
params: ' -SourceToolsList @("policheck","credscan")
|
|
|
|
-TsaInstanceURL $(_TsaInstanceURL)
|
|
|
|
-TsaProjectName $(_TsaProjectName)
|
|
|
|
-TsaNotificationEmail $(_TsaNotificationEmail)
|
|
|
|
-TsaCodebaseAdmin $(_TsaCodebaseAdmin)
|
|
|
|
-TsaBugAreaPath $(_TsaBugAreaPath)
|
|
|
|
-TsaIterationPath $(_TsaIterationPath)
|
|
|
|
-TsaRepositoryName "Arcade"
|
|
|
|
-TsaCodebaseName "Arcade"
|
|
|
|
-TsaPublish $True'
|