Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.
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
58 changes: 43 additions & 15 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
trigger:
batch: true
branches:
include:
- master
- release/3.*
paths:
include:
- '*'
- docs/installer/manpages/*
- Documentation/manpages/*
exclude:
- Documentation/*
- src/coreclr/*
- src/libraries/*
- eng/pipelines/coreclr/*
- eng/pipelines/libraries/*
- docs/*
- README.md
- CONTRIBUTING.md
- LICENSE.TXT
Expand All @@ -18,8 +26,17 @@ pr:
- master
- release/3.*
paths:
include:
- '*'
- docs/installer/manpages/*
- Documentation/manpages/*
exclude:
- Documentation/*
- src/coreclr/*
- src/libraries/*
- eng/pipelines/coreclr/*
- eng/pipelines/libraries/*
- docs/*
- README.md
- CONTRIBUTING.md
- LICENSE.TXT
Expand Down Expand Up @@ -53,11 +70,22 @@ variables:
- name: SignType
value: $[ coalesce(variables.OfficialSignType, 'real') ]

- ${{ if contains(variables['Build.DefinitionName'], 'runtime') }}:
- name: pipelinesPath
value: /eng/pipelines/installer
- name: buildScriptFileName
value: installer
- ${{ if not(contains(variables['Build.DefinitionName'], 'runtime')) }}:
- name: pipelinesPath
value: /eng/pipelines
- name: buildScriptFileName
value: build

stages:
- stage: Build
jobs:
# -------- Build Bash legs (Linux and FreeBSD) --------
- template: /eng/pipelines/jobs/bash-build.yml
- template: ${{ variables['pipelinesPath'] }}/jobs/bash-build.yml
parameters:
crossBuild: true
name: Linux_Arm
Expand All @@ -67,7 +95,7 @@ stages:
skipTests: true
targetArchitecture: arm

- template: /eng/pipelines/jobs/bash-build.yml
- template: ${{ variables['pipelinesPath'] }}/jobs/bash-build.yml
parameters:
crossBuild: true
name: Linux_Arm64
Expand All @@ -79,7 +107,7 @@ stages:

# # Tizen build only for PR build
# - ${{ if eq(variables['Build.Reason'], 'PullRequest') }}:
# - template: /eng/pipelines/jobs/bash-build.yml
# - template: ${{ variables['pipelinesPath'] }}/jobs/bash-build.yml
# parameters:
# additionalMSBuildArgs: /p:OverridePackageSource=https:%2F%2Ftizen.myget.org/F/dotnet-core/api/v3/index.json /p:OutputRid=tizen.5.0.0-armel
# additionalRunArgs: -e ROOTFS_DIR=/crossrootfs/armel.tizen.build
Expand All @@ -91,7 +119,7 @@ stages:
# skipTests: true
# targetArchitecture: armel

- template: /eng/pipelines/jobs/bash-build.yml
- template: ${{ variables['pipelinesPath'] }}/jobs/bash-build.yml
parameters:
additionalMSBuildArgs: /p:OutputRid=linux-musl-arm64
crossBuild: true
Expand All @@ -102,15 +130,15 @@ stages:
skipTests: true
targetArchitecture: arm64

- template: /eng/pipelines/jobs/bash-build.yml
- template: ${{ variables['pipelinesPath'] }}/jobs/bash-build.yml
parameters:
additionalMSBuildArgs: /p:OutputRid=linux-musl-x64
name: Linux_x64_Alpine39
dockerImage: mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.9-WithNode-0fc54a3-20190918214015
portableBuild: false
targetArchitecture: x64

- template: /eng/pipelines/jobs/bash-build.yml
- template: ${{ variables['pipelinesPath'] }}/jobs/bash-build.yml
parameters:
name: Linux_x64_glibc
dockerImage: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-7-50f0d02-20190918214028
Expand All @@ -129,7 +157,7 @@ stages:
portableBuild: true
targetArchitecture: x64

- template: /eng/pipelines/jobs/bash-build.yml
- template: ${{ variables['pipelinesPath'] }}/jobs/bash-build.yml
parameters:
additionalMSBuildArgs: /p:OutputRid=rhel.6-x64
name: Linux_x64_Rhel6
Expand All @@ -138,34 +166,34 @@ stages:
targetArchitecture: x64

# -------- Build OSX (macOS) leg --------
- template: /eng/pipelines/jobs/osx-build.yml
- template: ${{ variables['pipelinesPath'] }}/jobs/osx-build.yml
parameters:
name: OSX

# -------- Build Windows legs --------
# Windows Arm
- template: /eng/pipelines/jobs/windows-build.yml
- template: ${{ variables['pipelinesPath'] }}/jobs/windows-build.yml
parameters:
name: Windows_Arm
skipTests: true
targetArchitecture: arm

# Windows Arm64
- template: /eng/pipelines/jobs/windows-build.yml
- template: ${{ variables['pipelinesPath'] }}/jobs/windows-build.yml
parameters:
name: Windows_Arm64
skipTests: true
targetArchitecture: arm64

# Windows x64
- template: /eng/pipelines/jobs/windows-build.yml
- template: ${{ variables['pipelinesPath'] }}/jobs/windows-build.yml
parameters:
name: Windows_x64
publishRidAgnosticPackages: true
targetArchitecture: x64

# Windows x86
- template: /eng/pipelines/jobs/windows-build.yml
- template: ${{ variables['pipelinesPath'] }}/jobs/windows-build.yml
parameters:
name: Windows_x86
targetArchitecture: x86
Expand All @@ -176,7 +204,7 @@ stages:
dependsOn: Build
jobs:
# Prep artifacts: sign them and upload pipeline artifacts expected by stages-based publishing.
- template: /eng/pipelines/jobs/prepare-signed-artifacts.yml
- template: ${{ variables['pipelinesPath'] }}/jobs/prepare-signed-artifacts.yml
parameters:
PublishRidAgnosticPackagesFromJobName: Windows_x64
# Publish to Build Asset Registry in order to generate the ReleaseConfigs artifact.
Expand All @@ -188,7 +216,7 @@ stages:
name: NetCoreInternal-Pool
queue: buildpool.windows.10.amd64.vs2017

- template: /eng/pipelines/stages/publish.yml
- template: ${{ variables['pipelinesPath'] }}/stages/publish.yml
parameters:
# Publish channel configuration. The publish template wraps Arcade publishing and adds some
# extras that aren't implemented in Arcade yet.
Expand Down
26 changes: 18 additions & 8 deletions eng/pipelines/jobs/bash-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ jobs:
${{ if ne(parameters.name, 'FreeBSD_x64')}}:
RunArguments: >-
docker run --privileged --rm
-v "$(Build.SourcesDirectory):/root/coresetup"
-w="/root/coresetup"
-v "$(Build.SourcesDirectory):/root/runtime"
-w="/root/runtime"
$(PreserveNuGetAuthDockerArgs)
${{ parameters.additionalRunArgs }}
${{ parameters.dockerImage }}
Expand All @@ -50,12 +50,15 @@ jobs:
RunArguments: export DotNetBootstrapCliTarPath=/dotnet-sdk-freebsd-x64.tar &&

${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
BuildScript: ./eng/install-nuget-credprovider-then-build.sh
MSBuildScript: /root/coresetup/eng/install-nuget-credprovider-then-msbuild.sh
${{ if not(contains(variables['Build.DefinitionName'], 'runtime')) }}:
BuildScript: ./eng/install-nuget-credprovider-then-build.sh
${{ if contains(variables['Build.DefinitionName'], 'runtime') }}:
BuildScript: ./eng/install-nuget-credprovider-then-build.sh --subsetCategory installer
MSBuildScript: /root/runtime/eng/install-nuget-credprovider-then-msbuild.sh

${{ if not(and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest'))) }}:
BuildScript: ./build.sh
MSBuildScript: /root/coresetup/eng/common/msbuild.sh
BuildScript: ./$(buildScriptFileName).sh
MSBuildScript: /root/runtime/eng/common/msbuild.sh

CommonMSBuildArgs: >-
/p:Configuration=$(_BuildConfig)
Expand Down Expand Up @@ -89,11 +92,16 @@ jobs:

DockerRunMSBuild: >-
docker run
-v $(Build.SourcesDirectory):/root/coresetup
-v $(Build.SourcesDirectory):/root/runtime
-v $(Build.StagingDirectory)/sharedFrameworkPublish/:/root/sharedFrameworkPublish/
-w=/root/coresetup
-w=/root/runtime
$(PreserveNuGetAuthDockerArgs)

${{ if contains(variables['Build.DefinitionName'], 'runtime') }}:
installersSubsetArg: --subset Installers
${{ if not(contains(variables['Build.DefinitionName'], 'runtime')) }}:
installersSubsetArg: /p:Subset=Installer

steps:

- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
Expand Down Expand Up @@ -139,6 +147,7 @@ jobs:
distroRid: ${{ packageBuild.imageRid }}
image: ${{ packageBuild.image }}
packageStepDescription: Runtime Deps, Runtime, Framework Packs installers
subsetArg: $(installersSubsetArg)

- ${{ each rid in packageBuild.rids }}:
# Build distro-dependent packages.
Expand All @@ -149,6 +158,7 @@ jobs:
outputRidArg: /p:OutputRid=${{ rid }}-${{ parameters.targetArchitecture }}
packageStepDescription: Runtime Deps installers
packagingArgs: /p:BuildDistroIndependentInstallers=false
subsetArg: $(installersSubsetArg)

# Files may be owned by root because builds don't set user ID. The next AzDO step runs 'find' in
# the source tree, which fails due to permissions in the 'NetCore*-Int-Pool' queues. This step
Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/jobs/osx-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- task: NuGetAuthenticate@0

- script: >-
$(Build.SourcesDirectory)/build.sh --ci --test
$(Build.SourcesDirectory)/$(buildScriptFileName).sh --ci --test
/p:OfficialBuildId=$(OfficialBuildId)
/p:StripSymbols=true
$(CommonMSBuildArgs)
Expand Down
7 changes: 4 additions & 3 deletions eng/pipelines/jobs/steps/build-linux-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ parameters:
outputRidArg: ''
packageStepDescription: null
packagingArgs: ''
subsetArg: ''

steps:
- ${{ if eq(parameters.buildTraversalBuildDependencies, true) }}:
Expand All @@ -13,7 +14,7 @@ steps:
df -h
$(DockerRunMSBuild) ${{ parameters.image }} $(MSBuildScript) \
--ci \
/root/coresetup/tools-local/tasks/installer.tasks/installer.tasks.csproj \
/root/runtime/tools-local/tasks/installer.tasks/installer.tasks.csproj \
/t:Restore /t:Build /t:CreateHostMachineInfoFile \
$(CommonMSBuildArgs) \
/bl:msbuild.${{ parameters.distroRid }}.traversaldependencies.binlog
Expand All @@ -24,12 +25,12 @@ steps:
df -h
$(DockerRunMSBuild) ${{ parameters.image }} $(BuildScript) \
--ci \
/p:Subset=Installer \
${{ parameters.subsetArg }} \
/p:UsePrebuiltPortableBinariesForInstallers=true \
$(PackagePortableBitsArgs) \
/p:GenerateProjectInstallers=true \
${{ parameters.packagingArgs }} \
$(CommonMSBuildArgs) \
${{ parameters.outputRidArg }} \
/bl:msbuild.${{ parameters.distroRid }}.installers.binlog
/bl:artifacts/log/$(_BuildConfig)/msbuild.${{ parameters.distroRid }}.installers.binlog
displayName: Package ${{ parameters.packageStepDescription }} - ${{ parameters.distroRid }}
7 changes: 7 additions & 0 deletions eng/pipelines/jobs/steps/upload-job-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,13 @@ steps:
continueOnError: true
condition: always()

- task: DeleteFiles@1
displayName: Delete broken symlinks.
inputs:
SourceFolder: '$(Build.SourcesDirectory)'
Contents: artifacts/obj/rhel.7-x64.Debug/packages/dotnet-host/5.0.0/rpmLayoutDirectory/package_root/usr/bin/dotnet
condition: succeededOrFailed()

- task: CopyFiles@2
displayName: Prepare BuildLogs staging directory
inputs:
Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/jobs/windows-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
displayName: Clear NuGet http cache (if exists)

- script: >-
build.cmd -ci -test
$(buildScriptFileName).cmd -ci -test
$(CommonMSBuildArgs)
$(MsbuildSigningArguments)
displayName: Build
Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/stages/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ stages:
variables:
- template: /eng/common/templates/post-build/common-variables.yml
jobs:
- template: /eng/pipelines/jobs/run-publish-project.yml
- template: $(pipelinesPath)/jobs/run-publish-project.yml
parameters:
projectName: publish-final
dependency: ${{ dependency }}
2 changes: 1 addition & 1 deletion src/corehost/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ if [ $__CrossBuild == 1 ]; then
fi
export TARGET_BUILD_ARCH=$__build_arch_lowcase
export __DistroRid=$__rid_plat
cmake "$DIR" -G "Unix Makefiles" $__cmake_defines -DCLI_CMAKE_HOST_VER=$__host_ver -DCLI_CMAKE_COMMON_HOST_VER=$__apphost_ver -DCLI_CMAKE_HOST_FXR_VER=$__fxr_ver -DCLI_CMAKE_HOST_POLICY_VER=$__policy_ver -DCLI_CMAKE_PKG_RID=$__base_rid -DCLI_CMAKE_COMMIT_HASH=$__commit_hash -DCMAKE_INSTALL_PREFIX=$__cmake_bin_prefix -DCMAKE_TOOLCHAIN_FILE=$DIR/../../cross/toolchain.cmake
cmake "$DIR" -G "Unix Makefiles" $__cmake_defines -DCLI_CMAKE_HOST_VER=$__host_ver -DCLI_CMAKE_COMMON_HOST_VER=$__apphost_ver -DCLI_CMAKE_HOST_FXR_VER=$__fxr_ver -DCLI_CMAKE_HOST_POLICY_VER=$__policy_ver -DCLI_CMAKE_PKG_RID=$__base_rid -DCLI_CMAKE_COMMIT_HASH=$__commit_hash -DCMAKE_INSTALL_PREFIX=$__cmake_bin_prefix -DCMAKE_TOOLCHAIN_FILE=$RootRepo/cross/toolchain.cmake
else
cmake "$DIR" -G "Unix Makefiles" $__cmake_defines -DCLI_CMAKE_HOST_VER=$__host_ver -DCLI_CMAKE_COMMON_HOST_VER=$__apphost_ver -DCLI_CMAKE_HOST_FXR_VER=$__fxr_ver -DCLI_CMAKE_HOST_POLICY_VER=$__policy_ver -DCLI_CMAKE_PKG_RID=$__base_rid -DCLI_CMAKE_COMMIT_HASH=$__commit_hash -DCMAKE_INSTALL_PREFIX=$__cmake_bin_prefix
fi
Expand Down
6 changes: 3 additions & 3 deletions src/signing/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

<PropertyGroup>
<TargetFramework>$(NETCoreAppFramework)</TargetFramework>
<IsRuntimeRepository Condition="Exists('$(MSBuildThisFileDirectory)..\..\..\.dotnet-runtime-placeholder')">true</IsRuntimeRepository>

<!-- Skip signing steps by default for non-official builds. -->
<SkipSigning Condition="'$(SkipSigning)' == '' and '$(OfficialBuild)' != 'true'">true</SkipSigning>
<!-- Skip signing steps by default for non-official builds. Skip signing in the runtime repository until we onboard unified signing scripts. -->
<SkipSigning Condition="('$(SkipSigning)' == '' and '$(OfficialBuild)' != 'true') or '$(IsRuntimeRepository)' == 'true'">true</SkipSigning>
</PropertyGroup>

</Project>