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
8 changes: 7 additions & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -400,13 +400,19 @@ stages:
configuration: Release
- name: compilerChange
value: $[dependencies.Determine_Changes.outputs['SetPathVars_compilers.containsChange']]
# Set NUGET_PACKAGES to fix issues with package Restore when building with `-ci`.
# Workaround for https://github.com/dotnet/arcade/issues/15970
- name: NUGET_PACKAGES
value: $(Build.SourcesDirectory)\.packages
steps:
- template: eng/pipelines/checkout-windows-task.yml

- powershell: eng/build.ps1 -configuration Release -prepareMachine -ci -restore -binaryLogName Restore.binlog
displayName: Restore

- powershell: eng/build.ps1 -configuration Release -prepareMachine -ci -build -pack -publish -sign -binaryLogName Build.binlog /p:DotnetPublishUsingPipelines=true /p:ContinuousIntegrationBuildCorrectness=true
# We additionally restore during the build because the Microsoft.DotNet.Build.Tasks.Feed package only restores when we pass `-publish`. See https://github.com/dotnet/arcade/blob/37ccfd66358af6a37a0ec385ec31d1d71bdd8723/src/Microsoft.DotNet.Arcade.Sdk/tools/Tools.proj#L61-L66
# Passing `-publish` during the restore step above fails due to no items needing published.
- powershell: eng/build.ps1 -configuration Release -prepareMachine -ci -restore -build -pack -publish -sign -binaryLogName Build.binlog /p:DotnetPublishUsingPipelines=true /p:ContinuousIntegrationBuildCorrectness=true
displayName: Build

# While this task is not executed in the official build, this serves as a PR check for whether symbol exclusions
Expand Down
12 changes: 6 additions & 6 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,13 @@
</Dependency>
</ProductDependencies>
<ToolsetDependencies>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="10.0.0-beta.25259.2">
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="10.0.0-beta.25358.3">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>80c4e4d26cb85c86f7e1be77d2d9eceeef0f3493</Sha>
<Sha>4e526204e83e615efe8eb5743be7fbccfa4e492a</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.XliffTasks" Version="10.0.0-beta.25259.2">
<Dependency Name="Microsoft.DotNet.XliffTasks" Version="10.0.0-beta.25358.3">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>80c4e4d26cb85c86f7e1be77d2d9eceeef0f3493</Sha>
<Sha>4e526204e83e615efe8eb5743be7fbccfa4e492a</Sha>
</Dependency>
<Dependency Name="Microsoft.DiaSymReader" Version="2.0.0">
<Uri>https://github.com/dotnet/symreader</Uri>
Expand All @@ -126,9 +126,9 @@
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>5d10d428050c0d6afef30a072c4ae68776621877</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="10.0.0-beta.25259.2">
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="10.0.0-beta.25358.3">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>80c4e4d26cb85c86f7e1be77d2d9eceeef0f3493</Sha>
<Sha>4e526204e83e615efe8eb5743be7fbccfa4e492a</Sha>
</Dependency>
<Dependency Name="Microsoft.CodeAnalysis.NetAnalyzers" Version="8.0.0-preview.23468.1">
<Uri>https://github.com/dotnet/roslyn-analyzers</Uri>
Expand Down
4 changes: 4 additions & 0 deletions eng/common/core-templates/steps/install-microbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ steps:
${{ if and(eq(parameters.enableMicrobuildForMacAndLinux, 'true'), ne(variables['Agent.Os'], 'Windows_NT')) }}:
azureSubscription: 'MicroBuild Signing Task (DevDiv)'
useEsrpCli: true
${{ elseif eq(variables['System.TeamProject'], 'DevDiv') }}:
ConnectedPMEServiceName: 6cc74545-d7b9-4050-9dfa-ebefcc8961ea
${{ else }}:
ConnectedPMEServiceName: 248d384a-b39b-46e3-8ad5-c2c210d5e7ca
env:
TeamName: $(_TeamName)
MicroBuildOutputFolderOverride: ${{ parameters.microBuildOutputFolder }}
Expand Down
6 changes: 0 additions & 6 deletions eng/common/core-templates/steps/source-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,6 @@ steps:
targetRidArgs='/p:TargetRid=${{ parameters.platform.targetRID }}'
fi

baseRidArgs=
if [ '${{ parameters.platform.baseRID }}' != '' ]; then
baseRidArgs='/p:BaseRid=${{ parameters.platform.baseRID }}'
fi

portableBuildArgs=
if [ '${{ parameters.platform.portableBuild }}' != '' ]; then
portableBuildArgs='/p:PortableBuild=${{ parameters.platform.portableBuild }}'
Expand All @@ -55,7 +50,6 @@ steps:
${{ parameters.platform.buildArguments }} \
$internalRuntimeDownloadArgs \
$targetRidArgs \
$baseRidArgs \
$portableBuildArgs \
displayName: Build

Expand Down
7 changes: 7 additions & 0 deletions eng/common/dotnet.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@echo off

:: This script is used to install the .NET SDK.
:: It will also invoke the SDK with any provided arguments.

powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0dotnet.ps1""" %*"
exit /b %ErrorLevel%
11 changes: 11 additions & 0 deletions eng/common/dotnet.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# This script is used to install the .NET SDK.
# It will also invoke the SDK with any provided arguments.

. $PSScriptRoot\tools.ps1
$dotnetRoot = InitializeDotNetCli -install:$true

# Invoke acquired SDK with args if they are provided
if ($args.count -gt 0) {
$env:DOTNET_NOLOGO=1
& "$dotnetRoot\dotnet.exe" $args
}
26 changes: 26 additions & 0 deletions eng/common/dotnet.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/usr/bin/env bash

# This script is used to install the .NET SDK.
# It will also invoke the SDK with any provided arguments.

source="${BASH_SOURCE[0]}"
# resolve $SOURCE until the file is no longer a symlink
while [[ -h $source ]]; do
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
source="$(readlink "$source")"

# if $source was a relative symlink, we need to resolve it relative to the path where the
# symlink file was located
[[ $source != /* ]] && source="$scriptroot/$source"
done
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"

source $scriptroot/tools.sh
InitializeDotNetCli true # install

# Invoke acquired SDK with args if they are provided
if [[ $# > 0 ]]; then
__dotnetDir=${_InitializeDotNetCli}
dotnetPath=${__dotnetDir}/dotnet
${dotnetPath} "$@"
fi
3 changes: 3 additions & 0 deletions eng/common/internal/NuGet.config
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,7 @@
<clear />
<add key="dotnet-core-internal-tooling" value="https://pkgs.dev.azure.com/devdiv/_packaging/dotnet-core-internal-tooling/nuget/v3/index.json" />
</packageSources>
<packageSourceMapping>
<clear />
</packageSourceMapping>
</configuration>
29 changes: 19 additions & 10 deletions eng/common/templates/vmr-build-pr.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,23 @@
# This pipeline is used for running the VMR verification of the PR changes in repo-level PRs.
#
# It will run a full set of verification jobs defined in:
# https://github.com/dotnet/dotnet/blob/10060d128e3f470e77265f8490f5e4f72dae738e/eng/pipelines/templates/stages/vmr-build.yml#L27-L38
#
# For repos that do not need to run the full set, you would do the following:
#
# 1. Copy this YML file to a repo-specific location, i.e. outside of eng/common.
#
# 2. Add `verifications` parameter to VMR template reference
#
# Examples:
# - For source-build stage 1 verification, add the following:
# verifications: [ "source-build-stage1" ]
#
# - For Windows only verifications, add the following:
# verifications: [ "unified-build-windows-x64", "unified-build-windows-x86" ]

trigger: none
pr:
branches:
include:
- main
- release/*
paths:
exclude:
- documentation/*
- README.md
- CODEOWNERS
pr: none

variables:
- template: /eng/common/templates/variables/pool-providers.yml@self
Expand Down
23 changes: 4 additions & 19 deletions eng/common/tools.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -765,28 +765,13 @@ function MSBuild() {

$toolsetBuildProject = InitializeToolset
$basePath = Split-Path -parent $toolsetBuildProject
$possiblePaths = @(
# new scripts need to work with old packages, so we need to look for the old names/versions
(Join-Path $basePath (Join-Path $buildTool.Framework 'Microsoft.DotNet.ArcadeLogging.dll')),
(Join-Path $basePath (Join-Path $buildTool.Framework 'Microsoft.DotNet.Arcade.Sdk.dll')),

# This list doesn't need to be updated anymore and can eventually be removed.
(Join-Path $basePath (Join-Path net9.0 'Microsoft.DotNet.ArcadeLogging.dll')),
(Join-Path $basePath (Join-Path net9.0 'Microsoft.DotNet.Arcade.Sdk.dll')),
(Join-Path $basePath (Join-Path net8.0 'Microsoft.DotNet.ArcadeLogging.dll')),
(Join-Path $basePath (Join-Path net8.0 'Microsoft.DotNet.Arcade.Sdk.dll'))
)
$selectedPath = $null
foreach ($path in $possiblePaths) {
if (Test-Path $path -PathType Leaf) {
$selectedPath = $path
break
}
}
$selectedPath = Join-Path $basePath (Join-Path $buildTool.Framework 'Microsoft.DotNet.ArcadeLogging.dll')

if (-not $selectedPath) {
Write-PipelineTelemetryError -Category 'Build' -Message 'Unable to find arcade sdk logger assembly.'
Write-PipelineTelemetryError -Category 'Build' -Message "Unable to find arcade sdk logger assembly: $selectedPath"
ExitWithExitCode 1
}

$args += "/logger:$selectedPath"
}

Expand Down
22 changes: 4 additions & 18 deletions eng/common/tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -447,27 +447,13 @@ function MSBuild {
fi

local toolset_dir="${_InitializeToolset%/*}"
# new scripts need to work with old packages, so we need to look for the old names/versions
local selectedPath=
local possiblePaths=()
possiblePaths+=( "$toolset_dir/net/Microsoft.DotNet.ArcadeLogging.dll" )
possiblePaths+=( "$toolset_dir/net/Microsoft.DotNet.Arcade.Sdk.dll" )

# This list doesn't need to be updated anymore and can eventually be removed.
possiblePaths+=( "$toolset_dir/net9.0/Microsoft.DotNet.ArcadeLogging.dll" )
possiblePaths+=( "$toolset_dir/net9.0/Microsoft.DotNet.Arcade.Sdk.dll" )
possiblePaths+=( "$toolset_dir/net8.0/Microsoft.DotNet.ArcadeLogging.dll" )
possiblePaths+=( "$toolset_dir/net8.0/Microsoft.DotNet.Arcade.Sdk.dll" )
for path in "${possiblePaths[@]}"; do
if [[ -f $path ]]; then
selectedPath=$path
break
fi
done
local selectedPath="$toolset_dir/net/Microsoft.DotNet.ArcadeLogging.dll"

if [[ -z "$selectedPath" ]]; then
Write-PipelineTelemetryError -category 'Build' "Unable to find arcade sdk logger assembly."
Write-PipelineTelemetryError -category 'Build' "Unable to find arcade sdk logger assembly: $selectedPath"
ExitWithExitCode 1
fi

args+=( "-logger:$selectedPath" )
fi

Expand Down
5 changes: 5 additions & 0 deletions eng/make-bootstrap.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ try {

if ($ci) {
$args += " /p:ContinuousIntegrationBuild=true"

# Set NUGET_PACKAGES to fix issues with package Restore when building with `-ci`.
# Workaround for https://github.com/dotnet/arcade/issues/15970
$env:NUGET_PACKAGES = Join-Path $RepoRoot '.packages\'
Copy link
Member

Choose a reason for hiding this comment

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

Arcade SDK sets the NuGetPackageRoot MSBuild property for CI builds to this path. However, the Restore task runs and does not take the MSBuild property into account. Restore does respect the NuGet environment variables however.

$env:RESTORENOCACHE = $true
}

Exec-DotNet "build $args $projectPath"
Expand Down
6 changes: 3 additions & 3 deletions global.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"vswhere": "3.1.7"
},
"msbuild-sdks": {
"Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.25259.2",
"Microsoft.DotNet.Helix.Sdk": "10.0.0-beta.25259.2",
"Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.25358.3",
"Microsoft.DotNet.Helix.Sdk": "10.0.0-beta.25358.3",
"Microsoft.Build.Traversal": "3.4.0"
}
}
}
Loading