Skip to content
Merged
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
16 changes: 16 additions & 0 deletions eng/pipelines/common/platform-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,22 @@ jobs:
managedTestBuildOsGroup: OSX
${{ insert }}: ${{ parameters.jobParameters }}

- ${{ if containsValue(parameters.platforms, 'WebAssembly_wasm') }}:
- template: xplat-setup.yml
parameters:
jobTemplate: ${{ parameters.jobTemplate }}
helixQueuesTemplate: ${{ parameters.helixQueuesTemplate }}
osGroup: WebAssembly
archType: wasm
platform: WebAssembly_wasm
container:
image: ubuntu-16.04-a50a721-20191023143845
registry: mcr
jobParameters:
stagedBuild: ${{ parameters.stagedBuild }}
buildConfig: ${{ parameters.buildConfig }}
${{ insert }}: ${{ parameters.jobParameters }}

# FreeBSD

# FreeBSD machines are currently offline. Re-enable in the official build when
Expand Down
164 changes: 90 additions & 74 deletions eng/pipelines/libraries/.azure-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ trigger:
- src/coreclr/*
- eng/pipelines/coreclr/*
- eng/pipelines/installer/*
- eng/pipelines/common/*

pr:
branches:
Expand All @@ -43,30 +42,6 @@ pr:
- src/coreclr/*
- eng/pipelines/coreclr/*
- eng/pipelines/installer/*
- eng/pipelines/common/*

resources:
containers:
- container: centos7_container
image: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-7-f39df28-20191023143754

- container: centos6_container
image: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-6-f39df28-20191023143802

- container: alpine_39_container
image: mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.9-WithNode-0fc54a3-20190918214015

- container: alpine_37_arm64_container
image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-cross-arm64-alpine-406629a-20191023143847

- container: ubuntu_1604_arm64_cross_container
image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-cross-arm64-cfdd435-20191023143847

- container: ubuntu_1604_arm_cross_container
image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-cross-14.04-23cacb0-20191023143847

- container: ubuntu_1604
image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-a50a721-20191023143845

variables:
- template: variables.yml
Expand All @@ -83,55 +58,96 @@ variables:
- name: _DotNetValidationArtifactsCategory
value: .NETCore

stages:
# Windows legs
- template: ${{ variables['pipelinesPath'] }}/windows.yml
parameters:
isOfficialBuild: ${{ and(ne(variables['System.TeamProject'], 'public'), notIn(variables['Build.Reason'], 'PullRequest')) }}
fullMatrix: ${{ notIn(variables['Build.Reason'], 'PullRequest') }}

# Linux legs
- template: ${{ variables['pipelinesPath'] }}/linux.yml
parameters:
isOfficialBuild: ${{ and(ne(variables['System.TeamProject'], 'public'), notIn(variables['Build.Reason'], 'PullRequest')) }}
fullMatrix: ${{ notIn(variables['Build.Reason'], 'PullRequest') }}
jobs:
- template: /eng/pipelines/common/checkout-job.yml

# MacOS legs
- template: ${{ variables['pipelinesPath'] }}/macos.yml
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
isOfficialBuild: ${{ and(ne(variables['System.TeamProject'], 'public'), notIn(variables['Build.Reason'], 'PullRequest')) }}
fullMatrix: ${{ notIn(variables['Build.Reason'], 'PullRequest') }}

# FreeBSD leg is only for official builds
# - template: ${{ variables['pipelinesPath'] }}/freebsd.yml
# parameters:
# isOfficialBuild: ${{ and(ne(variables['System.TeamProject'], 'public'), notIn(variables['Build.Reason'], 'PullRequest')) }}
# fullMatrix: ${{ notIn(variables['Build.Reason'], 'PullRequest') }}

# Publish and validation steps. Only run in official builds
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notIn(variables['Build.Reason'], 'PullRequest')) }}:
- template: ${{ variables['pipelinesPath'] }}/pre-publish.yml
jobTemplate: /eng/pipelines/libraries/build-job.yml
buildConfig: Release
platforms:
- Linux_rhel6_x64
- Windows_NT_x86
- ${{ if eq(variables['isFullMatrix'], true) }}:
- OSX_x64
- Windows_NT_x64
- Linux_x64
- Linux_arm
- Linux_arm64
- Linux_musl_x64
- Linux_musl_arm64
helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml
jobParameters:
isOfficialBuild: ${{ variables['isOfficialBuild'] }}
isFullMatrix: ${{ variables['isFullMatrix'] }}
framework: netcoreapp
${{ if eq(variables['isOfficialBuild'], false) }}:
runTests: true
testScope: innerloop

- ${{ if eq(variables['isFullMatrix'], false) }}:
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
dependsOn:
- WindowsStage
- LinuxStage
- MacOSStage
# - FreeBSD

- template: eng\common\templates\post-build\post-build.yml
parameters:
validateDependsOn:
- PrePublish
enableSymbolValidation: false # https://github.com/dotnet/arcade/issues/2871
SDLValidationParameters:
enable: true
params: ' -SourceToolsList @("policheck","credscan")
-TsaInstanceURL "$(TsaInstanceURL)"
-TsaProjectName "$(TsaProjectName)"
-TsaNotificationEmail "$(TsaNotificationEmail)"
-TsaCodebaseAdmin "$(TsaCodebaseAdmin)"
-TsaBugAreaPath "$(TsaBugAreaPath)"
-TsaIterationPath "$(TsaIterationPath)"
-TsaRepositoryName "CoreFX"
-TsaCodebaseName "CoreFX"
-TsaPublish $True'
jobTemplate: /eng/pipelines/libraries/build-job.yml
buildConfig: Debug
platforms:
- Windows_NT_x64
- OSX_x64
- Linux_x64
- Linux_musl_x64
helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml
jobParameters:
isOfficialBuild: ${{ variables['isOfficialBuild'] }}
isFullMatrix: ${{ variables['isFullMatrix'] }}
testScope: innerloop
framework: netcoreapp
runTests: true

- template: /eng/pipelines/common/platform-matrix.yml
parameters:
jobTemplate: /eng/pipelines/libraries/build-job.yml
${{ if eq(variables['isFullMatrix'], false) }}:
buildConfig: Debug
${{ if eq(variables['isFullMatrix'], true) }}:
buildConfig: Release
platforms:
- WebAssembly_wasm
- ${{ if eq(variables['isFullMatrix'], false) }}:
- Linux_arm
- Linux_arm64
- Linux_musl_arm64
jobParameters:
isOfficialBuild: ${{ variables['isOfficialBuild'] }}
framework: netcoreapp

- template: /eng/pipelines/common/platform-matrix.yml
parameters:
jobTemplate: /eng/pipelines/libraries/build-job.yml
buildConfig: Release
platforms:
- Windows_NT_x86
- ${{ if eq(variables['isFullMatrix'], true) }}:
- Windows_NT_x64
helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml
jobParameters:
isOfficialBuild: ${{ variables['isOfficialBuild'] }}
framework: netfx
${{ if eq(variables['isOfficialBuild'], false) }}:
runTests: true
testScope: innerloop

- template: /eng/pipelines/common/platform-matrix.yml
parameters:
jobTemplate: /eng/pipelines/libraries/build-job.yml
${{ if eq(variables['isFullMatrix'], false) }}:
buildConfig: Debug
${{ if eq(variables['isFullMatrix'], true) }}:
buildConfig: Release
platforms:
- Windows_NT_x64
helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml
jobParameters:
isOfficialBuild: ${{ variables['isOfficialBuild'] }}
framework: allConfigurations
${{ if eq(variables['isOfficialBuild'], false) }}:
runTests: true
105 changes: 105 additions & 0 deletions eng/pipelines/libraries/base-job.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
parameters:
buildConfig: ''
osGroup: ''
archType: ''
osSubgroup: ''
framework: ''
isOfficialBuild: false
timeoutInMinutes: 150
container: ''
steps: []
dependsOn: []
variables: {}
name: ''
displayName: ''
testScope: ''
pool: ''
stepName: ''

jobs:
- template: /eng/common/templates/job/job.yml
parameters:
name: ${{ format('libraries_{0}_{1}_{2}{3}_{4}_{5}', parameters.stepName, parameters.framework, parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }}
${{ if eq(parameters.framework, 'netcoreapp') }}:
displayName: ${{ format('{0} {1}{2} {3} {4}', parameters.stepName, parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }}
${{ if ne(parameters.framework, 'netcoreapp') }}:
displayName: ${{ format('{0} {1} {2} {3} {4}', parameters.stepName, parameters.osGroup, parameters.framework, parameters.archType, parameters.buildConfig) }}

enableTelemetry: ${{ parameters.isOfficialBuild }} # TODO: figure out if it's needed
container: ${{ parameters.container }}
helixRepo: dotnet/runtime
pool: ${{ parameters.pool }}
variables:
- _BuildConfig: ${{ parameters.buildConfig }}
- _msbuildCommonParameters: ''
- _stripSymbolsArg: ''
- _runtimeOSArg: ''
- _portableArg: ''
- _finalFrameworkArg: -framework ${{ parameters.framework }}
- _buildScript: $(buildScriptFileName)$(scriptExt)
- _warnAsErrorArg: ''
- _testScopeArg: ''

- ${{ if ne(parameters.testScope, '') }}:
- _testScopeArg: -testscope ${{ parameters.testScope }}

- ${{ if and(eq(parameters.osGroup, 'Linux'), eq(parameters.osSubGroup, '_rhel6')) }}:
- _runtimeOSArg: /p:RuntimeOS=rhel.6
- _portableArg: /p:PortableBuild=false

- ${{ if and(eq(parameters.osGroup, 'Linux'), eq(parameters.osSubGroup, '_musl')) }}:
- _runtimeOSArg: /p:RuntimeOS=linux-musl

- ${{ if and(eq(parameters.osGroup, 'Linux'), eq(parameters.osSubGroup, ''), eq(parameters.archType, 'arm')) }}:
- _runtimeOSArg: /p:RuntimeOS=ubuntu.16.04

- ${{ if and(or(eq(parameters.osGroup, 'Linux'), eq(parameters.osGroup, 'WebAssembly')), ne(parameters.container, '')) }}:
- _warnAsErrorArg: '-warnAsError false'

- ${{ if eq(parameters.osGroup, 'WebAssembly') }}:
- _runtimeOSArg: -os ${{ parameters.osGroup }}

- ${{ if eq(parameters.framework, 'allConfigurations' ) }}:
- _finalFrameworkArg: -allConfigurations

- ${{ if eq(parameters.isOfficialBuild, 'true') }}:
- _msbuildCommonParameters: /p:OfficialBuildId=$(Build.BuildNumber)

# Windows variables
- ${{ if eq(parameters.osGroup, 'Windows_NT') }}:
- _msbuildCommand: powershell -ExecutionPolicy ByPass -NoProfile eng\common\msbuild.ps1 -warnaserror:0 -ci
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we need warnaserror false here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually this was ported to xplat-setup and I can remove it. And I also think it was added for a reason I can’t remember anymore. So I will remove it in a follow up PR.

Copy link
Member

@ViktorHofer ViktorHofer Nov 26, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.

And I also think it was added for a reason I can’t remember anymore.

That's exactly what I was referring to above with "lack of context" :)

- _runtimeOSArg: /p:RuntimeOS=win10

# Non-Windows variables
- ${{ if ne(parameters.osGroup, 'Windows_NT') }}:
- _msbuildCommand: ./eng/common/msbuild.sh --warnaserror false --ci
- _buildScript: ./$(buildScriptFileName)$(scriptExt)
- ${{ if eq(parameters.isOfficialBuild, 'true') }}:
- _stripSymbolsArg: -stripSymbols

- _buildArguments: -configuration ${{ parameters.buildConfig }} -ci -arch ${{ parameters.archType }} $(_finalFrameworkArg) $(_stripSymbolsArg) $(_testScopeArg) $(_warnAsErrorArg) $(_runtimeOSArg) $(_portableArg) $(_msbuildCommonParameters)
- ${{ parameters.variables }}

dependsOn:
- checkout
- ${{ parameters.dependsOn }}
workspace:
clean: all

enablePublishBuildArtifacts: true
timeoutInMinutes: ${{ parameters.timeoutInMinutes }}

steps:
- checkout: none
clean: true

- download: current
artifact: Checkout_bundle
displayName: Download Checkout.bundle

- script: |
git clone $(Pipeline.Workspace)/Checkout_bundle/Checkout.bundle .
git remote set-url origin $(Build.Repository.Uri)
displayName: Clone the repository from Checkout.bundle

- ${{ parameters.steps }}
Loading