Skip to content

[main] Source code updates from dotnet/dotnet #492

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
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
6 changes: 3 additions & 3 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<Dependencies>
<Source Uri="https://github.com/dotnet/dotnet" Mapping="source-build-externals" Sha="a4d6fdc935d5da12efb00a0b3b693ff1439e0b41" BarId="269082" />
<Source Uri="https://github.com/dotnet/dotnet" Mapping="source-build-externals" Sha="9d86ce59f05e31b1bccb0cd5604f803416796fe4" BarId="269499" />
<ToolsetDependencies>
<Dependency Name="Microsoft.Build" Version="17.14.0-preview-24619-01">
<Uri>https://github.com/dotnet/msbuild</Uri>
<Sha>e9b99f554a3c298e1106ea171f5a0462780af2c5</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="10.0.0-beta.25270.108">
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="10.0.0-beta.25274.104">
<Uri>https://github.com/dotnet/dotnet</Uri>
<Sha>a4d6fdc935d5da12efb00a0b3b693ff1439e0b41</Sha>
<Sha>9d86ce59f05e31b1bccb0cd5604f803416796fe4</Sha>
</Dependency>
</ToolsetDependencies>
</Dependencies>
3 changes: 3 additions & 0 deletions eng/common/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Param(
[switch] $publish,
[switch] $clean,
[switch][Alias('pb')]$productBuild,
[switch]$fromVMR,
[switch][Alias('bl')]$binaryLog,
[switch][Alias('nobl')]$excludeCIBinarylog,
[switch] $ci,
Expand Down Expand Up @@ -74,6 +75,7 @@ function Print-Usage() {
Write-Host " -nativeToolsOnMachine Sets the native tools on machine environment variable (indicating that the script should use native tools on machine)"
Write-Host " -nodeReuse <value> Sets nodereuse msbuild parameter ('true' or 'false')"
Write-Host " -buildCheck Sets /check msbuild parameter"
Write-Host " -fromVMR Set when building from within the VMR"
Write-Host ""

Write-Host "Command line arguments not listed above are passed thru to msbuild."
Expand Down Expand Up @@ -128,6 +130,7 @@ function Build {
/p:Test=$test `
/p:Pack=$pack `
/p:DotNetBuild=$productBuild `
/p:DotNetBuildFromVMR=$fromVMR `
/p:IntegrationTest=$integrationTest `
/p:PerformanceTest=$performanceTest `
/p:Sign=$sign `
Expand Down
14 changes: 10 additions & 4 deletions eng/common/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ usage()
echo " --nodeReuse <value> Sets nodereuse msbuild parameter ('true' or 'false')"
echo " --warnAsError <value> Sets warnaserror msbuild parameter ('true' or 'false')"
echo " --buildCheck <value> Sets /check msbuild parameter"
echo " --fromVMR Set when building from within the VMR"
echo ""
echo "Command line arguments not listed above are passed thru to msbuild."
echo "Arguments can also be passed in with a single hyphen."
Expand All @@ -64,6 +65,7 @@ restore=false
build=false
source_build=false
product_build=false
from_vmr=false
rebuild=false
test=false
integration_test=false
Expand All @@ -89,7 +91,7 @@ verbosity='minimal'
runtime_source_feed=''
runtime_source_feed_key=''

properties=''
properties=()
while [[ $# > 0 ]]; do
opt="$(echo "${1/#--/-}" | tr "[:upper:]" "[:lower:]")"
case "$opt" in
Expand Down Expand Up @@ -142,6 +144,9 @@ while [[ $# > 0 ]]; do
restore=true
pack=true
;;
-fromvmr|-from-vmr)
from_vmr=true
;;
-test|-t)
test=true
;;
Expand Down Expand Up @@ -187,7 +192,7 @@ while [[ $# > 0 ]]; do
shift
;;
*)
properties="$properties $1"
properties+=("$1")
;;
esac

Expand Down Expand Up @@ -221,7 +226,7 @@ function Build {
InitializeCustomToolset

if [[ ! -z "$projects" ]]; then
properties="$properties /p:Projects=$projects"
properties+=("/p:Projects=$projects")
fi

local bl=""
Expand All @@ -243,6 +248,7 @@ function Build {
/p:Build=$build \
/p:DotNetBuild=$product_build \
/p:DotNetBuildSourceOnly=$source_build \
/p:DotNetBuildFromVMR=$from_vmr \
/p:Rebuild=$rebuild \
/p:Test=$test \
/p:Pack=$pack \
Expand All @@ -251,7 +257,7 @@ function Build {
/p:Sign=$sign \
/p:Publish=$publish \
/p:RestoreStaticGraphEnableBinaryLogger=$binary_log \
$properties
"${properties[@]}"

ExitWithExitCode 0
}
Expand Down
3 changes: 0 additions & 3 deletions eng/common/core-templates/post-build/post-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,6 @@ stages:
buildId: $(AzDOBuildId)
artifactName: PackageArtifacts
checkDownloadedFiles: true
itemPattern: |
**
!**/Microsoft.SourceBuild.Intermediate.*.nupkg

# This is necessary whenever we want to publish/restore to an AzDO private feed
# Since sdk-task.ps1 tries to restore packages we need to do this authentication here
Expand Down
35 changes: 0 additions & 35 deletions eng/common/core-templates/steps/install-microbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,38 +48,3 @@ steps:
eq(variables['_SignType'], 'real')
)
))

# Workaround for ESRP CLI on Linux - https://github.com/dotnet/source-build/issues/4964
- ${{ if eq(parameters.enableMicrobuildForMacAndLinux, 'true') }}:
- task: UseDotNet@2
displayName: Install .NET 9.0 SDK for ESRP CLI Workaround
inputs:
packageType: sdk
version: 9.0.x
installationPath: ${{ parameters.microBuildOutputFolder }}/.dotnet
workingDirectory: ${{ parameters.microBuildOutputFolder }}
condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux'))

- task: PowerShell@2
displayName: Workaround for ESRP CLI on Linux
inputs:
targetType: 'inline'
script: |
Write-Host "Copying Linux Path"
$MBSIGN_APPFOLDER = '$(MBSIGN_APPFOLDER)'
$MBSIGN_APPFOLDER = ($MBSIGN_APPFOLDER -replace '/build', '')

$versionRegex = '\d+\.\d+\.\d+'
$package = Get-ChildItem -Path $MBSIGN_APPFOLDER -Directory |
Where-Object { $_.Name -match $versionRegex }

if ($package.Count -ne 1) {
Write-Host "There should be exactly one matching subfolder, but found $($package.Count)."
exit 1
}

$MBSIGN_APPFOLDER = $package[0].FullName + '/build'
$MBSIGN_APPFOLDER | Write-Host
$SignConfigPath = $MBSIGN_APPFOLDER + '/signconfig.xml'
Copy-Item -Path "$(MBSIGN_APPFOLDER)/signconfig.xml" -Destination $SignConfigPath -Force
condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux'))
8 changes: 4 additions & 4 deletions eng/common/tools.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ $ErrorActionPreference = 'Stop'
# Base-64 encoded SAS token that has permission to storage container described by $runtimeSourceFeed
[string]$runtimeSourceFeedKey = if (Test-Path variable:runtimeSourceFeedKey) { $runtimeSourceFeedKey } else { $null }

# True if the build is a product build
[bool]$productBuild = if (Test-Path variable:productBuild) { $productBuild } else { $false }
# True when the build is running within the VMR.
[bool]$fromVMR = if (Test-Path variable:fromVMR) { $fromVMR } else { $false }

function Create-Directory ([string[]] $path) {
New-Item -Path $path -Force -ItemType 'Directory' | Out-Null
Expand Down Expand Up @@ -850,8 +850,8 @@ function MSBuild-Core() {
}

# When running on Azure Pipelines, override the returned exit code to avoid double logging.
# Skip this when the build is a child of the VMR orchestrator build.
if ($ci -and $env:SYSTEM_TEAMPROJECT -ne $null -and !$productBuild) {
# Skip this when the build is a child of the VMR build.
if ($ci -and $env:SYSTEM_TEAMPROJECT -ne $null -and !$fromVMR) {
Write-PipelineSetResult -Result "Failed" -Message "msbuild execution failed."
# Exiting with an exit code causes the azure pipelines task to log yet another "noise" error
# The above Write-PipelineSetResult will cause the task to be marked as failure without adding yet another error
Expand Down
8 changes: 4 additions & 4 deletions eng/common/tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ fi
runtime_source_feed=${runtime_source_feed:-''}
runtime_source_feed_key=${runtime_source_feed_key:-''}

# True if the build is a product build
product_build=${product_build:-false}
# True when the build is running within the VMR.
from_vmr=${from_vmr:-false}

# Resolve any symlinks in the given path.
function ResolvePath {
Expand Down Expand Up @@ -506,8 +506,8 @@ function MSBuild-Core {
echo "Build failed with exit code $exit_code. Check errors above."

# When running on Azure Pipelines, override the returned exit code to avoid double logging.
# Skip this when the build is a child of the VMR orchestrator build.
if [[ "$ci" == true && -n ${SYSTEM_TEAMPROJECT:-} && "$product_build" != true ]]; then
# Skip this when the build is a child of the VMR build.
if [[ "$ci" == true && -n ${SYSTEM_TEAMPROJECT:-} && "$from_vmr" != true ]]; then
Write-PipelineSetResult -result "Failed" -message "msbuild execution failed."
# Exiting with an exit code causes the azure pipelines task to log yet another "noise" error
# The above Write-PipelineSetResult will cause the task to be marked as failure without adding yet another error
Expand Down
4 changes: 2 additions & 2 deletions global.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"tools": {
"dotnet": "10.0.100-preview.5.25265.106"
"dotnet": "10.0.100-preview.6.25272.112"
},
"msbuild-sdks": {
"Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.25270.108",
"Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.25274.104",
"Microsoft.Build.NoTargets": "3.7.0"
}
}