Skip to content

[main] Update dependencies from dotnet/arcade #381

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 8 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
4 changes: 2 additions & 2 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<ProductDependencies>
</ProductDependencies>
<ToolsetDependencies>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="10.0.0-beta.25171.1">
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="10.0.0-beta.25259.2">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>235443a5c1136571cacdfd40576f263f26bf5b9b</Sha>
<Sha>80c4e4d26cb85c86f7e1be77d2d9eceeef0f3493</Sha>
</Dependency>
</ToolsetDependencies>
</Dependencies>
3 changes: 2 additions & 1 deletion eng/common/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ function Build {
/p:PerformanceTest=$performanceTest `
/p:Sign=$sign `
/p:Publish=$publish `
/p:RestoreStaticGraphEnableBinaryLogger=$binaryLog `
@properties
}

Expand Down Expand Up @@ -171,4 +172,4 @@ catch {
ExitWithExitCode 1
}

ExitWithExitCode 0
ExitWithExitCode 0
5 changes: 3 additions & 2 deletions eng/common/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ while [[ $# > 0 ]]; do
restore=true
pack=true
;;
-productBuild|-pb)
-productbuild|-pb)
build=true
product_build=true
restore=true
Expand Down Expand Up @@ -250,6 +250,7 @@ function Build {
/p:PerformanceTest=$performance_test \
/p:Sign=$sign \
/p:Publish=$publish \
/p:RestoreStaticGraphEnableBinaryLogger=$binary_log \
$properties

ExitWithExitCode 0
Expand All @@ -267,4 +268,4 @@ if [[ "$restore" == true ]]; then
InitializeNativeTools
fi

Build
Build
13 changes: 0 additions & 13 deletions eng/common/core-templates/job/job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,6 @@ jobs:
- ${{ if ne(parameters.enableTelemetry, 'false') }}:
- name: DOTNET_CLI_TELEMETRY_PROFILE
value: '$(Build.Repository.Uri)'
- ${{ if eq(parameters.enableRichCodeNavigation, 'true') }}:
- name: EnableRichCodeNavigation
value: 'true'
# Retry signature validation up to three times, waiting 2 seconds between attempts.
# See https://learn.microsoft.com/en-us/nuget/reference/errors-and-warnings/nu3028#retry-untrusted-root-failures
- name: NUGET_EXPERIMENTAL_CHAIN_BUILD_RETRY_POLICY
Expand Down Expand Up @@ -147,16 +144,6 @@ jobs:
- ${{ each step in parameters.steps }}:
- ${{ step }}

- ${{ if eq(parameters.enableRichCodeNavigation, true) }}:
- task: RichCodeNavIndexer@0
displayName: RichCodeNav Upload
inputs:
languages: ${{ coalesce(parameters.richCodeNavigationLanguage, 'csharp') }}
environment: ${{ coalesce(parameters.richCodeNavigationEnvironment, 'internal') }}
richNavLogOutputDirectory: $(Build.SourcesDirectory)/artifacts/bin
uploadRichNavArtifacts: ${{ coalesce(parameters.richCodeNavigationUploadArtifacts, false) }}
continueOnError: true

- ${{ each step in parameters.componentGovernanceSteps }}:
- ${{ step }}

Expand Down
24 changes: 15 additions & 9 deletions eng/common/core-templates/job/publish-build-assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ parameters:

is1ESPipeline: ''

# Optional: 🌤️ or not the build has assets it wants to publish to BAR
isAssetlessBuild: false

jobs:
- job: Asset_Registry_Publish

Expand Down Expand Up @@ -72,14 +75,15 @@ jobs:
- checkout: self
fetchDepth: 3
clean: true

- task: DownloadPipelineArtifact@2
displayName: Download Asset Manifests
inputs:
artifactName: AssetManifests
targetPath: '$(Build.StagingDirectory)/AssetManifests'
condition: ${{ parameters.condition }}
continueOnError: ${{ parameters.continueOnError }}

- ${{ if eq(parameters.isAssetlessBuild, 'false') }}:
- task: DownloadPipelineArtifact@2
displayName: Download Asset Manifests
inputs:
artifactName: AssetManifests
targetPath: '$(Build.StagingDirectory)/AssetManifests'
condition: ${{ parameters.condition }}
continueOnError: ${{ parameters.continueOnError }}

- task: NuGetAuthenticate@1

Expand All @@ -92,6 +96,7 @@ jobs:
scriptPath: $(Build.SourcesDirectory)/eng/common/sdk-task.ps1
arguments: -task PublishBuildAssets -restore -msbuildEngine dotnet
/p:ManifestsPath='$(Build.StagingDirectory)/AssetManifests'
/p:IsAssetlessBuild=${{ parameters.isAssetlessBuild }}
/p:MaestroApiEndpoint=https://maestro.dot.net
/p:OfficialBuildId=$(Build.BuildNumber)
condition: ${{ parameters.condition }}
Expand Down Expand Up @@ -124,7 +129,7 @@ jobs:
publishLocation: Container
artifactName: ReleaseConfigs

- ${{ if eq(parameters.publishAssetsImmediately, 'true') }}:
- ${{ if or(eq(parameters.publishAssetsImmediately, 'true'), eq(parameters.isAssetlessBuild, 'true')) }}:
- template: /eng/common/core-templates/post-build/setup-maestro-vars.yml
parameters:
BARBuildId: ${{ parameters.BARBuildId }}
Expand All @@ -145,6 +150,7 @@ jobs:
-WaitPublishingFinish true
-ArtifactsPublishingAdditionalParameters '${{ parameters.artifactsPublishingAdditionalParameters }}'
-SymbolPublishingAdditionalParameters '${{ parameters.symbolPublishingAdditionalParameters }}'
-SkipAssetsPublishing '${{ parameters.isAssetlessBuild }}'

- ${{ if eq(parameters.enablePublishBuildArtifacts, 'true') }}:
- template: /eng/common/core-templates/steps/publish-logs.yml
Expand Down
2 changes: 2 additions & 0 deletions eng/common/core-templates/job/source-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ parameters:
# Specifies the build script to invoke to perform the build in the repo. The default
# './build.sh' should work for typical Arcade repositories, but this is customizable for
# difficult situations.
# buildArguments: ''
# Specifies additional build arguments to pass to the build script.
# jobProperties: {}
# A list of job properties to inject at the top level, for potential extensibility beyond
# container and pool.
Expand Down
8 changes: 6 additions & 2 deletions eng/common/core-templates/jobs/jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ parameters:
# Optional: Publish the assets as soon as the publish to BAR stage is complete, rather doing so in a separate stage.
publishAssetsImmediately: false

# Optional: 🌤️ or not the build has assets it wants to publish to BAR
isAssetlessBuild: false

# Optional: If using publishAssetsImmediately and additional parameters are needed, can be used to send along additional parameters (normally sent to post-build.yml)
artifactsPublishingAdditionalParameters: ''
signingValidationAdditionalParameters: ''
Expand Down Expand Up @@ -93,7 +96,7 @@ jobs:
${{ parameter.key }}: ${{ parameter.value }}

- ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- ${{ if or(eq(parameters.enablePublishBuildAssets, true), eq(parameters.artifacts.publish.manifests, 'true'), ne(parameters.artifacts.publish.manifests, '')) }}:
- ${{ if or(eq(parameters.enablePublishBuildAssets, true), eq(parameters.artifacts.publish.manifests, 'true'), ne(parameters.artifacts.publish.manifests, ''), eq(parameters.isAssetlessBuild, true)) }}:
- template: ../job/publish-build-assets.yml
parameters:
is1ESPipeline: ${{ parameters.is1ESPipeline }}
Expand All @@ -109,7 +112,8 @@ jobs:
- Source_Build_Complete

runAsPublic: ${{ parameters.runAsPublic }}
publishAssetsImmediately: ${{ parameters.publishAssetsImmediately }}
publishAssetsImmediately: ${{ or(parameters.publishAssetsImmediately, parameters.isAssetlessBuild) }}
isAssetlessBuild: ${{ parameters.isAssetlessBuild }}
enablePublishBuildArtifacts: ${{ parameters.enablePublishBuildArtifacts }}
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
signingValidationAdditionalParameters: ${{ parameters.signingValidationAdditionalParameters }}
2 changes: 1 addition & 1 deletion eng/common/core-templates/jobs/source-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ parameters:
# This is the default platform provided by Arcade, intended for use by a managed-only repo.
defaultManagedPlatform:
name: 'Managed'
container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream9'
container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream-10-amd64'

# Defines the platforms on which to run build jobs. One job is created for each platform, and the
# object in this array is sent to the job template as 'platform'. If no platforms are specified,
Expand Down
6 changes: 6 additions & 0 deletions eng/common/core-templates/post-build/post-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ parameters:
artifactNames: ''
downloadArtifacts: true

- name: isAssetlessBuild
type: boolean
displayName: Is Assetless Build
default: false

# These parameters let the user customize the call to sdk-task.ps1 for publishing
# symbols & general artifacts as well as for signing validation
- name: symbolPublishingAdditionalParameters
Expand Down Expand Up @@ -320,3 +325,4 @@ stages:
-RequireDefaultChannels ${{ parameters.requireDefaultChannels }}
-ArtifactsPublishingAdditionalParameters '${{ parameters.artifactsPublishingAdditionalParameters }}'
-SymbolPublishingAdditionalParameters '${{ parameters.symbolPublishingAdditionalParameters }}'
-SkipAssetsPublishing '${{ parameters.isAssetlessBuild }}'
38 changes: 12 additions & 26 deletions eng/common/core-templates/steps/install-microbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,30 +11,6 @@ parameters:
steps:
- ${{ if eq(parameters.enableMicrobuild, 'true') }}:
- ${{ if eq(parameters.enableMicrobuildForMacAndLinux, 'true') }}:
# Install Python 3.12.x on when Python > 3.12.x is installed - https://github.com/dotnet/source-build/issues/4802
- script: |
version=$(python3 --version | awk '{print $2}')
major=$(echo $version | cut -d. -f1)
minor=$(echo $version | cut -d. -f2)

installPython=false
if [ "$major" -gt 3 ] || { [ "$major" -eq 3 ] && [ "$minor" -gt 12 ]; }; then
installPython=true
fi

echo "Python version: $version."
echo "Install Python 3.12.x: $installPython."
echo "##vso[task.setvariable variable=installPython;isOutput=true]$installPython"
name: InstallPython
displayName: 'Determine Python installation'
condition: and(succeeded(), ne(variables['Agent.Os'], 'Windows_NT'))

- task: UsePythonVersion@0
inputs:
versionSpec: '3.12.x'
displayName: 'Use Python 3.12.x'
condition: and(succeeded(), eq(variables['InstallPython.installPython'], 'true'), ne(variables['Agent.Os'], 'Windows_NT'))

# Needed to download the MicroBuild plugin nupkgs on Mac and Linux when nuget.exe is unavailable
- task: UseDotNet@2
displayName: Install .NET 8.0 SDK for MicroBuild Plugin
Expand Down Expand Up @@ -91,8 +67,18 @@ steps:
script: |
Write-Host "Copying Linux Path"
$MBSIGN_APPFOLDER = '$(MBSIGN_APPFOLDER)'
$MBSIGN_APPFOLDER = $MBSIGN_APPFOLDER -replace '/build', ''
$MBSIGN_APPFOLDER = $MBSIGN_APPFOLDER + '/1.1.1032' + '/build'
$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
Expand Down
61 changes: 3 additions & 58 deletions eng/common/core-templates/steps/source-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,6 @@ steps:
set -x
df -h

# If file changes are detected, set CopyWipIntoInnerSourceBuildRepo to copy the WIP changes into the inner source build repo.
internalRestoreArgs=
if ! git diff --quiet; then
internalRestoreArgs='/p:CopyWipIntoInnerSourceBuildRepo=true'
# The 'Copy WIP' feature of source build uses git stash to apply changes from the original repo.
# This only works if there is a username/email configured, which won't be the case in most CI runs.
git config --get user.email
if [ $? -ne 0 ]; then
git config user.email [email protected]
git config user.name dn-bot
fi
fi

# If building on the internal project, the internal storage variable may be available (usually only if needed)
# In that case, add variables to allow the download of internal runtimes if the specified versions are not found
# in the default public locations.
Expand All @@ -46,11 +33,6 @@ steps:
buildConfig='$(_BuildConfig)'
fi

officialBuildArgs=
if [ '${{ and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}' = 'True' ]; then
officialBuildArgs='/p:DotNetPublishUsingPipelines=true /p:OfficialBuildId=$(BUILD.BUILDNUMBER)'
fi

targetRidArgs=
if [ '${{ parameters.platform.targetRID }}' != '' ]; then
targetRidArgs='/p:TargetRid=${{ parameters.platform.targetRID }}'
Expand All @@ -66,68 +48,31 @@ steps:
baseOsArgs='/p:BaseOS=${{ parameters.platform.baseOS }}'
fi

publishArgs=
if [ '${{ parameters.platform.skipPublishValidation }}' != 'true' ]; then
publishArgs='--publish'
fi

assetManifestFileName=SourceBuild_RidSpecific.xml
if [ '${{ parameters.platform.name }}' != '' ]; then
assetManifestFileName=SourceBuild_${{ parameters.platform.name }}.xml
fi

portableBuildArgs=
if [ '${{ parameters.platform.portableBuild }}' != '' ]; then
portableBuildArgs='/p:PortableBuild=${{ parameters.platform.portableBuild }}'
fi

${{ coalesce(parameters.platform.buildScript, './build.sh') }} --ci \
--configuration $buildConfig \
--restore --build --pack $publishArgs -bl \
$officialBuildArgs \
--restore --build --pack -bl \
${{ parameters.platform.buildArguments }} \
$internalRuntimeDownloadArgs \
$internalRestoreArgs \
$targetRidArgs \
$runtimeOsArgs \
$baseOsArgs \
$portableBuildArgs \
/p:DotNetBuildSourceOnly=true \
/p:DotNetBuildRepo=true \
/p:AssetManifestFileName=$assetManifestFileName
displayName: Build

# Upload build logs for diagnosis.
- task: CopyFiles@2
displayName: Prepare BuildLogs staging directory
inputs:
SourceFolder: '$(Build.SourcesDirectory)'
Contents: |
**/*.log
**/*.binlog
artifacts/sb/prebuilt-report/**
TargetFolder: '$(Build.StagingDirectory)/BuildLogs'
CleanTargetFolder: true
continueOnError: true
condition: succeededOrFailed()

- template: /eng/common/core-templates/steps/publish-pipeline-artifacts.yml
parameters:
is1ESPipeline: ${{ parameters.is1ESPipeline }}
args:
displayName: Publish BuildLogs
targetPath: '$(Build.StagingDirectory)/BuildLogs'
targetPath: artifacts/log/${{ coalesce(variables._BuildConfig, 'Release') }}
artifactName: BuildLogs_SourceBuild_${{ parameters.platform.name }}_Attempt$(System.JobAttempt)
continueOnError: true
condition: succeededOrFailed()
sbomEnabled: false # we don't need SBOM for logs

# Manually inject component detection so that we can ignore the source build upstream cache, which contains
# a nupkg cache of input packages (a local feed).
# This path must match the upstream cache path in property 'CurrentRepoSourceBuiltNupkgCacheDir'
# in src\Microsoft.DotNet.Arcade.Sdk\tools\SourceBuild\SourceBuildArcade.targets
- template: /eng/common/core-templates/steps/component-governance.yml
parameters:
displayName: Component Detection (Exclude upstream cache)
is1ESPipeline: ${{ parameters.is1ESPipeline }}
componentGovernanceIgnoreDirectories: '$(Build.SourcesDirectory)/artifacts/sb/src/artifacts/obj/source-built-upstream-cache'
disableComponentGovernance: ${{ eq(variables['System.TeamProject'], 'public') }}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
parameters:
sourceIndexUploadPackageVersion: 2.0.0-20240522.1
sourceIndexProcessBinlogPackageVersion: 1.0.1-20240522.1
sourceIndexUploadPackageVersion: 2.0.0-20250425.2
sourceIndexProcessBinlogPackageVersion: 1.0.1-20250425.2
sourceIndexPackageSource: https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json
binlogPath: artifacts/log/Debug/Build.binlog

Expand Down
2 changes: 1 addition & 1 deletion eng/common/cross/arm64/tizen/tizen.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ diff -u -r a/usr/lib/libc.so b/usr/lib/libc.so
Use the shared library, but some functions are only in
the static library, so try that secondarily. */
OUTPUT_FORMAT(elf64-littleaarch64)
-GROUP ( /lib64/libc.so.6 /usr/lib64/libc_nonshared.a AS_NEEDED ( /lib/ld-linux-aarch64.so.1 ) )
-GROUP ( /lib64/libc.so.6 /usr/lib64/libc_nonshared.a AS_NEEDED ( /lib64/ld-linux-aarch64.so.1 ) )
+GROUP ( libc.so.6 libc_nonshared.a AS_NEEDED ( ld-linux-aarch64.so.1 ) )
9 changes: 2 additions & 7 deletions eng/common/cross/tizen-fetch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -156,13 +156,8 @@ fetch_tizen_pkgs()
done
}

if [ "$TIZEN_ARCH" == "riscv64" ]; then
BASE="Tizen-Base-RISCV"
UNIFIED="Tizen-Unified-RISCV"
else
BASE="Tizen-Base"
UNIFIED="Tizen-Unified"
fi
BASE="Tizen-Base"
UNIFIED="Tizen-Unified"

Inform "Initialize ${TIZEN_ARCH} base"
fetch_tizen_pkgs_init standard $BASE
Expand Down
2 changes: 1 addition & 1 deletion eng/common/darc-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ function InstallDarcCli {
fi
fi

local arcadeServicesSource="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json"
local arcadeServicesSource="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json"

echo "Installing Darc CLI version $darcVersion..."
echo "You may need to restart your command shell if this is the first dotnet tool you have installed."
Expand Down
Loading