Skip to content
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
8 changes: 4 additions & 4 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
<ProductDependencies>
</ProductDependencies>
<ToolsetDependencies>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="11.0.0-beta.26330.1">
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="11.0.0-beta.26369.1">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>f87bce1e0d389d515282c5f74466d629ef653026</Sha>
<Sha>09bc8c946f4c4ae5d031c8875b85a6b8f1876b93</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Build.Tasks.Installers" Version="11.0.0-beta.26330.1">
<Dependency Name="Microsoft.DotNet.Build.Tasks.Installers" Version="11.0.0-beta.26369.1">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>f87bce1e0d389d515282c5f74466d629ef653026</Sha>
<Sha>09bc8c946f4c4ae5d031c8875b85a6b8f1876b93</Sha>
</Dependency>
</ToolsetDependencies>
</Dependencies>
2 changes: 1 addition & 1 deletion eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<NewtonsoftJsonPackageVersion>13.0.1</NewtonsoftJsonPackageVersion>
<MicrosoftVisualStudioSetupConfigurationPackageVersion>3.2.2146</MicrosoftVisualStudioSetupConfigurationPackageVersion>
<WindowsAzureStoragePackageVersion>9.3.3</WindowsAzureStoragePackageVersion>
<MicrosoftDotNetBuildTasksInstallersPackageVersion>11.0.0-beta.26330.1</MicrosoftDotNetBuildTasksInstallersPackageVersion>
<MicrosoftDotNetBuildTasksInstallersPackageVersion>11.0.0-beta.26369.1</MicrosoftDotNetBuildTasksInstallersPackageVersion>
<MicrosoftWixToolsetSdkVersion>6.0.3-dotnet.3</MicrosoftWixToolsetSdkVersion>
</PropertyGroup>
</Project>
6 changes: 5 additions & 1 deletion eng/common/SetupNugetSources.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@
# filePath: $(System.DefaultWorkingDirectory)/eng/common/SetupNugetSources.ps1
# arguments: -ConfigFile $(System.DefaultWorkingDirectory)/NuGet.config -Password $Env:Token
# env:
# Token: $(dn-bot-dnceng-artifact-feeds-rw)
# Token: $(InternalFeedToken)
#
# Note: This logic is abstracted into enable-internal-sources.yml, which uses
# NuGetAuthenticate or a WIF-backed service connection. Prefer that template
# over calling this script directly.
#
# Note that the NuGetAuthenticate task should be called after SetupNugetSources.
# This ensures that:
Expand Down
2 changes: 2 additions & 0 deletions eng/common/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Param(
[switch] $clean,
[switch][Alias('pb')]$productBuild,
[switch]$fromVMR,
[switch]$disablePipelineSetResult,
[switch][Alias('bl')]$binaryLog,
[string][Alias('bln')]$binaryLogName = '',
[switch][Alias('nobl')]$excludeCIBinarylog,
Expand Down Expand Up @@ -80,6 +81,7 @@ function Print-Usage() {
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 " -disablePipelineSetResult Set to disable masking the actual exit code in the pipeline when the build fails"
Write-Host ""

Write-Host "Command line arguments not listed above are passed thru to msbuild."
Expand Down
11 changes: 11 additions & 0 deletions eng/common/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,14 @@ usage()
echo " --projects <value> Project or solution file(s) to build"
echo " --ci Set when running on CI server"
echo " --excludeCIBinarylog Don't output binary log (short: -nobl)"
echo " --pipelinesLog Promote msbuild errors/warnings to Azure Pipelines timeline issues; defaults to on in CI (short: -pl)"
echo " --prepareMachine Prepare machine for CI run, clean up processes after build"
echo " --nodeReuse <value> Sets nodereuse msbuild parameter ('true' or 'false')"
echo " --warnAsError <value> Sets warnaserror msbuild parameter ('true' or 'false')"
echo " --warnNotAsError <value> Sets a semi-colon delimited list of warning codes that should not be treated as errors"
echo " --buildCheck <value> Sets /check msbuild parameter"
echo " --fromVMR Set when building from within the VMR"
echo " --disablePipelineSetResult Set to disable masking the actual exit code in the pipeline when the build fails"
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 @@ -68,6 +70,7 @@ build=false
source_build=false
product_build=false
from_vmr=false
disable_pipeline_set_result=false
rebuild=false
test=false
integration_test=false
Expand All @@ -86,6 +89,7 @@ build_check=false
binary_log=false
binary_log_name=''
exclude_ci_binary_log=false
pipelines_log=false

projects=''
configuration=''
Expand Down Expand Up @@ -124,6 +128,9 @@ while [[ $# -gt 0 ]]; do
-excludecibinarylog|-nobl)
exclude_ci_binary_log=true
;;
-pipelineslog|-pl)
pipelines_log=true
;;
-restore|-r)
restore=true
;;
Expand Down Expand Up @@ -152,6 +159,9 @@ while [[ $# -gt 0 ]]; do
-fromvmr|-from-vmr)
from_vmr=true
;;
-disablepipelinesetresult|-disable-pipeline-set-result)
disable_pipeline_set_result=true
;;
-test|-t)
test=true
;;
Expand Down Expand Up @@ -213,6 +223,7 @@ if [[ -z "$configuration" ]]; then
fi

if [[ "$ci" == true ]]; then
pipelines_log=true
# Disable node reuse on CI unless explicitly opted in via MSBUILD_NODEREUSE_ENABLED.
# Internal testing only; this env var will be replaced with a switch (https://github.com/dotnet/arcade/issues/17013) and must not be depended on.
if [[ "${MSBUILD_NODEREUSE_ENABLED:-}" != "1" ]]; then
Expand Down
19 changes: 14 additions & 5 deletions eng/common/core-templates/job/helix-job-monitor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,14 @@ parameters:
type: boolean
default: true

# When true, test results are reported to Azure DevOps using the fully qualified test name
# (Namespace.Type.Method) as the stable automatedTestName and the visible title is qualified as
# well (--use-fully-qualified-test-name). Opt-in because it changes AzDO test identity and display;
# primarily useful for frameworks like MSTest whose display name is only the method name.
- name: useFullyQualifiedTestName
type: boolean
default: false

# Advanced: optional pipeline artifact (produced earlier in this run) that contains the tool
# nupkg. When set, the artifact is downloaded and the tool is installed from the nupkg into
# a local tool-path; this bypasses the repo's .config/dotnet-tools.json manifest and is
Expand Down Expand Up @@ -176,11 +184,12 @@ jobs:
set -euo pipefail

toolArgs=(
--helix-base-uri '${{ parameters.helixBaseUri }}'
--polling-interval-seconds '${{ parameters.pollingIntervalSeconds }}'
--fail-on-failed-tests '${{ parameters.failWorkItemsWithFailedTests }}'
--max-wait-minutes "$((${{ parameters.timeoutInMinutes }} - 5))" # Set the tool's timeout slightly lower than the Azure DevOps job timeout to allow it to exit gracefully.
--stage-name '$(System.StageName)'
--helix-base-uri '${{ parameters.helixBaseUri }}'
--polling-interval-seconds '${{ parameters.pollingIntervalSeconds }}'
--fail-on-failed-tests '${{ parameters.failWorkItemsWithFailedTests }}'
--use-fully-qualified-test-name '${{ parameters.useFullyQualifiedTestName }}'
--max-wait-minutes "$((${{ parameters.timeoutInMinutes }} - 5))" # Set the tool's timeout slightly lower than the Azure DevOps job timeout to allow it to exit gracefully.
--stage-name '$(System.StageName)'
)

organization='${{ parameters.organization }}'
Expand Down
20 changes: 19 additions & 1 deletion eng/common/core-templates/job/onelocbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ parameters:
CeapexPat: $(dn-bot-ceapex-package-r) # PAT for the loc AzDO instance https://dev.azure.com/ceapex
GithubPat: $(BotAccount-dotnet-bot-repo-PAT)

# Service connection for WIF-based Entra authentication to ceapex feeds (replaces CeapexPat).
# When set, dnceng/internal builds acquire a federated Entra token instead of using a PAT.
# All other projects (e.g. DevDiv, public), where this dnceng-scoped service connection does not
# exist, and any pipeline that sets this to '' fall back to PAT-based auth via the CeapexPat parameter.
CeapexServiceConnection: 'dnceng-onelocbuild-ceapex'

SourcesDirectory: $(System.DefaultWorkingDirectory)
CreatePr: true
AutoCompletePr: false
Expand Down Expand Up @@ -74,6 +80,15 @@ jobs:
displayName: Generate LocProject.json
condition: ${{ parameters.condition }}

# Acquire an Entra token for ceapex feed access via WIF (dnceng/internal only).
# All other projects use PAT-based auth, since the ceapex service connection is scoped to dnceng/internal.
- ${{ if and(ne(parameters.CeapexServiceConnection, ''), eq(variables['System.TeamProject'], 'internal')) }}:
- template: /eng/common/templates/steps/get-federated-access-token.yml
parameters:
federatedServiceConnection: ${{ parameters.CeapexServiceConnection }}
outputVariableName: 'CeapexEntraToken'
condition: ${{ parameters.condition }}

- task: OneLocBuild@2
displayName: OneLocBuild
env:
Expand All @@ -89,7 +104,10 @@ jobs:
isUseLfLineEndingsSelected: ${{ parameters.UseLfLineEndings }}
isShouldReusePrSelected: ${{ parameters.ReusePr }}
packageSourceAuth: patAuth
patVariable: ${{ parameters.CeapexPat }}
${{ if and(ne(parameters.CeapexServiceConnection, ''), eq(variables['System.TeamProject'], 'internal')) }}:
patVariable: $(CeapexEntraToken)
${{ if or(eq(parameters.CeapexServiceConnection, ''), ne(variables['System.TeamProject'], 'internal')) }}:
patVariable: ${{ parameters.CeapexPat }}
${{ if eq(parameters.RepoType, 'gitHub') }}:
repoType: ${{ parameters.RepoType }}
gitHubPatVariable: "${{ parameters.GithubPat }}"
Expand Down
3 changes: 0 additions & 3 deletions eng/common/core-templates/job/publish-build-assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,6 @@ jobs:

# Populate internal runtime variables.
- template: /eng/common/templates/steps/enable-internal-sources.yml
${{ if eq(variables['System.TeamProject'], 'DevDiv') }}:
parameters:
legacyCredential: $(dn-bot-dnceng-artifact-feeds-rw)

- template: /eng/common/templates/steps/enable-internal-runtimes.yml

Expand Down
2 changes: 0 additions & 2 deletions eng/common/core-templates/post-build/post-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -295,8 +295,6 @@ stages:

# Populate internal runtime variables.
- template: /eng/common/templates/steps/enable-internal-sources.yml
parameters:
legacyCredential: $(dn-bot-dnceng-artifact-feeds-rw)

- template: /eng/common/templates/steps/enable-internal-runtimes.yml

Expand Down
57 changes: 49 additions & 8 deletions eng/common/cross/build-rootfs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ usage()
echo "--skipsigcheck - optional, will skip package signature checks (allowing untrusted packages)."
echo "--skipemulation - optional, will skip qemu and debootstrap requirement when building environment for debian based systems."
echo "--use-mirror - optional, use mirror URL to fetch resources, when available."
echo "--jobs N - optional, restrict to N jobs."
echo "--ubuntu-repo <url> - optional, override the Ubuntu apt repository base URL."
echo "--debian-repo <url> - optional, override the Debian apt repository base URL."
echo "--alpine-repo <url> - optional, override the Alpine Linux repository base URL."
echo "--jobs N (or --use-jobs N) - optional, restrict to N jobs."
exit 1
}

Expand Down Expand Up @@ -144,6 +147,9 @@ __KeyringFile="/usr/share/keyrings/ubuntu-archive-keyring.gpg"
__SkipSigCheck=0
__SkipEmulation=0
__UseMirror=0
__UbuntuRepoOverride=
__DebianRepoOverride=
__AlpineRepoOverride=

__UnprocessedBuildArgs=
while :; do
Expand Down Expand Up @@ -397,6 +403,31 @@ while :; do
--use-mirror)
__UseMirror=1
;;
--ubuntu-repo|-ubuntu-repo)
shift
if [[ "$#" -le 0 ]]; then
echo "ERROR: --ubuntu-repo requires a URL argument."
usage
fi
__UbuntuRepoOverride="$1"
;;
--debian-repo|-debian-repo)
shift
if [[ "$#" -le 0 ]]; then
echo "ERROR: --debian-repo requires a URL argument."
usage
fi
__DebianRepoOverride="$1"
;;
--alpine-repo|-alpine-repo)
shift
if [[ "$#" -le 0 ]]; then
echo "ERROR: --alpine-repo requires a URL argument."
usage
fi
__AlpineRepoOverride="$1"
;;
# Removed duplicate/invalid option handling block (was breaking case statement parsing).
--use-jobs)
shift
MAXJOBS=$1
Expand All @@ -422,9 +453,12 @@ case "$__AlpineVersion" in
elif [[ "$__AlpineArch" == "x86" ]]; then
__AlpineVersion=3.17 # minimum version that supports lldb-dev
__AlpinePackages+=" llvm15-libs"
elif [[ "$__AlpineArch" == "riscv64" || "$__AlpineArch" == "loongarch64" ]]; then
elif [[ "$__AlpineArch" == "loongarch64" ]]; then
__AlpineVersion=3.21 # minimum version that supports lldb-dev
__AlpinePackages+=" llvm19-libs"
elif [[ "$__AlpineArch" == "riscv64" ]]; then
__AlpineVersion=3.22 # lldb-dev requires 3.21+, but 3.22+ provides the newer linux-headers needed for RISC-V extension probes
__AlpinePackages+=" llvm20-libs"
elif [[ -n "$__AlpineMajorVersion" ]]; then
# use whichever alpine version is provided and select the latest toolchain libs
__AlpineLlvmLibsLookup=1
Expand All @@ -446,6 +480,12 @@ if [[ -z "$__UbuntuRepo" ]]; then
__UbuntuRepo="https://ports.ubuntu.com/"
fi

if [[ -n "$__UbuntuRepoOverride" && "$__KeyringFile" == *ubuntu* ]]; then
__UbuntuRepo="$__UbuntuRepoOverride"
elif [[ -n "$__DebianRepoOverride" && "$__KeyringFile" == *debian* ]]; then
__UbuntuRepo="$__DebianRepoOverride"
fi

if [[ -n "$__LLVM_MajorVersion" ]]; then
__UbuntuPackages+=" libclang-common-${__LLVM_MajorVersion}${__LLVM_MinorVersion:+.$__LLVM_MinorVersion}-dev"
fi
Expand Down Expand Up @@ -486,6 +526,7 @@ if [[ "$__CodeName" == "alpine" ]]; then
__ApkToolsDir="$(mktemp -d)"
__ApkKeysDir="$(mktemp -d)"
arch="$(uname -m)"
__AlpineRepo="${__AlpineRepoOverride:-https://dl-cdn.alpinelinux.org/alpine}"

ensureDownloadTool

Expand Down Expand Up @@ -530,24 +571,24 @@ if [[ "$__CodeName" == "alpine" ]]; then
# initialize DB
# shellcheck disable=SC2086
"$__ApkToolsDir/apk.static" \
-X "https://dl-cdn.alpinelinux.org/alpine/$version/main" \
-X "https://dl-cdn.alpinelinux.org/alpine/$version/community" \
-X "$__AlpineRepo/$version/main" \
-X "$__AlpineRepo/$version/community" \
-U $__ApkSignatureArg --root "$__RootfsDir" --arch "$__AlpineArch" --initdb add

if [[ "$__AlpineLlvmLibsLookup" == 1 ]]; then
# shellcheck disable=SC2086
__AlpinePackages+=" $("$__ApkToolsDir/apk.static" \
-X "https://dl-cdn.alpinelinux.org/alpine/$version/main" \
-X "https://dl-cdn.alpinelinux.org/alpine/$version/community" \
-X "$__AlpineRepo/$version/main" \
-X "$__AlpineRepo/$version/community" \
-U $__ApkSignatureArg --root "$__RootfsDir" --arch "$__AlpineArch" \
search 'llvm*-libs' | grep -E '^llvm' | sort | tail -1 | sed 's/-[^-]*//2g')"
fi

# install all packages in one go
# shellcheck disable=SC2086
"$__ApkToolsDir/apk.static" \
-X "https://dl-cdn.alpinelinux.org/alpine/$version/main" \
-X "https://dl-cdn.alpinelinux.org/alpine/$version/community" \
-X "$__AlpineRepo/$version/main" \
-X "$__AlpineRepo/$version/community" \
-U $__ApkSignatureArg --root "$__RootfsDir" --arch "$__AlpineArch" $__NoEmulationArg \
add $__AlpinePackages

Expand Down
2 changes: 2 additions & 0 deletions eng/common/cross/toolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ elseif(TARGET_ARCH_NAME STREQUAL "ppc64le")
set(CMAKE_SYSTEM_PROCESSOR ppc64le)
if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/powerpc64le-alpine-linux-musl)
set(TOOLCHAIN "powerpc64le-alpine-linux-musl")
elseif(FREEBSD)
set(TOOLCHAIN "powerpc64le-unknown-freebsd14")
else()
set(TOOLCHAIN "powerpc64le-linux-gnu")
endif()
Expand Down
5 changes: 4 additions & 1 deletion eng/common/dotnet-install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@ Param(
[string] $architecture = '',
[string] $version = 'Latest',
[string] $runtime = 'dotnet',
[string] $dotnetPath = '',
[string] $RuntimeSourceFeed = '',
[string] $RuntimeSourceFeedKey = ''
)

. $PSScriptRoot\tools.ps1

if (-not [string]::IsNullOrEmpty($env:DOTNET_GLOBAL_INSTALL_DIR)) {
if (-not [string]::IsNullOrEmpty($dotnetPath)) {
$dotnetRoot = $dotnetPath
} elseif (-not [string]::IsNullOrEmpty($env:DOTNET_GLOBAL_INSTALL_DIR)) {
$dotnetRoot = $env:DOTNET_GLOBAL_INSTALL_DIR
} else {
$dotnetRoot = Join-Path $RepoRoot '.dotnet'
Expand Down
9 changes: 8 additions & 1 deletion eng/common/dotnet-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
version='Latest'
architecture=''
runtime='dotnet'
dotnetPath=''
runtimeSourceFeed=''
runtimeSourceFeedKey=''
while [[ $# -gt 0 ]]; do
Expand All @@ -33,6 +34,10 @@ while [[ $# -gt 0 ]]; do
shift
runtime="$1"
;;
-dotnetpath)
shift
dotnetPath="$1"
;;
-runtimesourcefeed)
shift
runtimeSourceFeed="$1"
Expand Down Expand Up @@ -80,7 +85,9 @@ case $cpuname in
;;
esac

if [[ -n "${DOTNET_GLOBAL_INSTALL_DIR:-}" ]]; then
if [[ -n "${dotnetPath:-}" ]]; then
dotnetRoot="$dotnetPath"
elif [[ -n "${DOTNET_GLOBAL_INSTALL_DIR:-}" ]]; then
dotnetRoot="$DOTNET_GLOBAL_INSTALL_DIR"
else
dotnetRoot="${repo_root}.dotnet"
Expand Down
2 changes: 2 additions & 0 deletions eng/common/native/NativeAotSupported.props
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
<!-- Reject unsupported architectures via RID suffix match -->
<_NativeAotSupportedArch Condition="
'$(TargetArchitecture)' != 'wasm' and
'$(TargetArchitecture)' != 's390x' and
'$(TargetArchitecture)' != 'ppc64le' and
('$(TargetArchitecture)' != 'x86' or '$(TargetOS)' == 'windows')
">true</_NativeAotSupportedArch>

Expand Down
Loading