Skip to content

Commit

Permalink
Merge branch 'main' into dev/arkalyan/1es-migrate
Browse files Browse the repository at this point in the history
  • Loading branch information
arkalyanms committed Mar 20, 2024
2 parents ff8cef4 + 29bdbf5 commit 6fbf4d6
Show file tree
Hide file tree
Showing 62 changed files with 4,045 additions and 105 deletions.
12 changes: 6 additions & 6 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,24 @@
</Dependency>
</ProductDependencies>
<ToolsetDependencies>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="9.0.0-beta.24102.4">
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="9.0.0-beta.24159.1">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>2fb543a45580400a559b5ae41c96a815ea14dac5</Sha>
<Sha>f4538b1f8ff5ceb197aea509f3f61872b217b09e</Sha>
</Dependency>
<!-- Intermediate is necessary for source build. -->
<Dependency Name="Microsoft.SourceBuild.Intermediate.arcade" Version="9.0.0-beta.24102.4">
<Dependency Name="Microsoft.SourceBuild.Intermediate.arcade" Version="9.0.0-beta.24159.1">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>2fb543a45580400a559b5ae41c96a815ea14dac5</Sha>
<Sha>f4538b1f8ff5ceb197aea509f3f61872b217b09e</Sha>
<SourceBuild RepoName="arcade" ManagedOnly="true" />
</Dependency>
<!-- Used in repo tooling. Not updated automatically -->
<Dependency Name="System.Composition" Version="8.0.0-preview.4.23259.5">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>84a3d0e37e8f22b0b55f8bf932cb788b2bdd728f</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.XliffTasks" Version="9.0.0-beta.24102.4">
<Dependency Name="Microsoft.DotNet.XliffTasks" Version="9.0.0-beta.24159.1">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>2fb543a45580400a559b5ae41c96a815ea14dac5</Sha>
<Sha>f4538b1f8ff5ceb197aea509f3f61872b217b09e</Sha>
</Dependency>
<Dependency Name="Microsoft.Net.Compilers.Toolset" Version="4.5.0">
<Uri>https://github.com/dotnet/roslyn</Uri>
Expand Down
2 changes: 1 addition & 1 deletion eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
<MicrosoftCodeAnalysisTestResourcesProprietaryVersion>2.0.0-pre-20160714</MicrosoftCodeAnalysisTestResourcesProprietaryVersion>
<MicrosoftVisualStudioThreadingAnalyzersVersion>17.0.26-alpha</MicrosoftVisualStudioThreadingAnalyzersVersion>
<!-- Roslyn Testing -->
<MicrosoftCodeAnalysisTestingVersion>1.1.2-beta1.23509.1</MicrosoftCodeAnalysisTestingVersion>
<MicrosoftCodeAnalysisTestingVersion>1.1.2-beta1.24168.2</MicrosoftCodeAnalysisTestingVersion>
<!-- Libs -->
<BenchmarkDotNetVersion>0.13.0</BenchmarkDotNetVersion>
<HumanizerVersion>2.14.1</HumanizerVersion>
Expand Down
26 changes: 13 additions & 13 deletions eng/common/SetupNugetSources.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Set-StrictMode -Version 2.0
. $PSScriptRoot\tools.ps1

# Add source entry to PackageSources
function AddPackageSource($sources, $SourceName, $SourceEndPoint, $creds, $Username, $Password) {
function AddPackageSource($sources, $SourceName, $SourceEndPoint, $creds, $Username, $pwd) {
$packageSource = $sources.SelectSingleNode("add[@key='$SourceName']")

if ($packageSource -eq $null)
Expand All @@ -48,12 +48,11 @@ function AddPackageSource($sources, $SourceName, $SourceEndPoint, $creds, $Usern
else {
Write-Host "Package source $SourceName already present."
}

AddCredential -Creds $creds -Source $SourceName -Username $Username -Password $Password
AddCredential -Creds $creds -Source $SourceName -Username $Username -pwd $pwd
}

# Add a credential node for the specified source
function AddCredential($creds, $source, $username, $password) {
function AddCredential($creds, $source, $username, $pwd) {
# Looks for credential configuration for the given SourceName. Create it if none is found.
$sourceElement = $creds.SelectSingleNode($Source)
if ($sourceElement -eq $null)
Expand Down Expand Up @@ -82,17 +81,18 @@ function AddCredential($creds, $source, $username, $password) {
$passwordElement.SetAttribute("key", "ClearTextPassword")
$sourceElement.AppendChild($passwordElement) | Out-Null
}
$passwordElement.SetAttribute("value", $Password)

$passwordElement.SetAttribute("value", $pwd)
}

function InsertMaestroPrivateFeedCredentials($Sources, $Creds, $Username, $Password) {
function InsertMaestroPrivateFeedCredentials($Sources, $Creds, $Username, $pwd) {
$maestroPrivateSources = $Sources.SelectNodes("add[contains(@key,'darc-int')]")

Write-Host "Inserting credentials for $($maestroPrivateSources.Count) Maestro's private feeds."

ForEach ($PackageSource in $maestroPrivateSources) {
Write-Host "`tInserting credential for Maestro's feed:" $PackageSource.Key
AddCredential -Creds $creds -Source $PackageSource.Key -Username $Username -Password $Password
AddCredential -Creds $creds -Source $PackageSource.Key -Username $Username -pwd $pwd
}
}

Expand Down Expand Up @@ -144,13 +144,13 @@ if ($disabledSources -ne $null) {
$userName = "dn-bot"

# Insert credential nodes for Maestro's private feeds
InsertMaestroPrivateFeedCredentials -Sources $sources -Creds $creds -Username $userName -Password $Password
InsertMaestroPrivateFeedCredentials -Sources $sources -Creds $creds -Username $userName -pwd $Password

# 3.1 uses a different feed url format so it's handled differently here
$dotnet31Source = $sources.SelectSingleNode("add[@key='dotnet3.1']")
if ($dotnet31Source -ne $null) {
AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal/nuget/v2" -Creds $creds -Username $userName -Password $Password
AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-transport/nuget/v2" -Creds $creds -Username $userName -Password $Password
AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal/nuget/v2" -Creds $creds -Username $userName -pwd $Password
AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-transport/nuget/v2" -Creds $creds -Username $userName -pwd $Password
}

$dotnetVersions = @('5','6','7','8')
Expand All @@ -159,9 +159,9 @@ foreach ($dotnetVersion in $dotnetVersions) {
$feedPrefix = "dotnet" + $dotnetVersion;
$dotnetSource = $sources.SelectSingleNode("add[@key='$feedPrefix']")
if ($dotnetSource -ne $null) {
AddPackageSource -Sources $sources -SourceName "$feedPrefix-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/$feedPrefix-internal/nuget/v2" -Creds $creds -Username $userName -Password $Password
AddPackageSource -Sources $sources -SourceName "$feedPrefix-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/$feedPrefix-internal-transport/nuget/v2" -Creds $creds -Username $userName -Password $Password
AddPackageSource -Sources $sources -SourceName "$feedPrefix-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/$feedPrefix-internal/nuget/v2" -Creds $creds -Username $userName -pwd $Password
AddPackageSource -Sources $sources -SourceName "$feedPrefix-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/$feedPrefix-internal-transport/nuget/v2" -Creds $creds -Username $userName -pwd $Password
}
}

$doc.Save($filename)
$doc.Save($filename)
1 change: 0 additions & 1 deletion eng/common/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ function Build {
/p:Test=$test `
/p:Pack=$pack `
/p:DotNetBuildRepo=$($productBuild -or $verticalBuild) `
/p:ArcadeBuildVertical=$verticalBuild `
/p:IntegrationTest=$integrationTest `
/p:PerformanceTest=$performanceTest `
/p:Sign=$sign `
Expand Down
1 change: 0 additions & 1 deletion eng/common/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,6 @@ function Build {
/p:DotNetBuildRepo=$product_build \
/p:ArcadeBuildFromSource=$source_build \
/p:DotNetBuildSourceOnly=$source_build \
/p:ArcadeBuildVertical=$vertical_build \
/p:Rebuild=$rebuild \
/p:Test=$test \
/p:Pack=$pack \
Expand Down
80 changes: 38 additions & 42 deletions eng/common/native/init-distro-rid.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/sh

# getNonPortableDistroRid
#
Expand All @@ -11,67 +11,66 @@
# non-portable rid
getNonPortableDistroRid()
{
local targetOs="$1"
local targetArch="$2"
local rootfsDir="$3"
local nonPortableRid=""
targetOs="$1"
targetArch="$2"
rootfsDir="$3"
nonPortableRid=""

if [ "$targetOs" = "linux" ]; then
# shellcheck disable=SC1091
if [ -e "${rootfsDir}/etc/os-release" ]; then
source "${rootfsDir}/etc/os-release"

if [[ "${ID}" == "rhel" || "${ID}" == "rocky" || "${ID}" == "alpine" ]]; then
# remove the last version digit
VERSION_ID="${VERSION_ID%.*}"
. "${rootfsDir}/etc/os-release"
if [ "${ID}" = "rhel" ] || [ "${ID}" = "rocky" ] || [ "${ID}" = "alpine" ]; then
VERSION_ID="${VERSION_ID%.*}" # Remove the last version digit for these distros
fi

if [[ "${VERSION_ID:-}" =~ ^([[:digit:]]|\.)+$ ]]; then
if echo "${VERSION_ID:-}" | grep -qE '^([[:digit:]]|\.)+$'; then
nonPortableRid="${ID}.${VERSION_ID}-${targetArch}"
else
# Rolling release distros either do not set VERSION_ID, set it as blank or
# set it to non-version looking string (such as TEMPLATE_VERSION_ID on ArchLinux);
# so omit it here to be consistent with everything else.
nonPortableRid="${ID}-${targetArch}"
fi

elif [ -e "${rootfsDir}/android_platform" ]; then
source "$rootfsDir"/android_platform
# shellcheck disable=SC1091
. "${rootfsDir}/android_platform"
nonPortableRid="$RID"
fi
fi

if [ "$targetOs" = "freebsd" ]; then
# $rootfsDir can be empty. freebsd-version is shell script and it should always work.
__freebsd_major_version=$($rootfsDir/bin/freebsd-version | { read v; echo "${v%%.*}"; })
# $rootfsDir can be empty. freebsd-version is a shell script and should always work.
__freebsd_major_version=$("$rootfsDir"/bin/freebsd-version | cut -d'.' -f1)
nonPortableRid="freebsd.$__freebsd_major_version-${targetArch}"
elif command -v getprop && getprop ro.product.system.model 2>&1 | grep -qi android; then
elif command -v getprop >/dev/null && getprop ro.product.system.model | grep -qi android; then
__android_sdk_version=$(getprop ro.build.version.sdk)
nonPortableRid="android.$__android_sdk_version-${targetArch}"
elif [ "$targetOs" = "illumos" ]; then
__uname_version=$(uname -v)
case "$__uname_version" in
omnios-*)
__omnios_major_version=$(echo "${__uname_version:8:2}")
nonPortableRid=omnios."$__omnios_major_version"-"$targetArch"
;;
__omnios_major_version=$(echo "$__uname_version" | cut -c9-10)
nonPortableRid="omnios.$__omnios_major_version-${targetArch}"
;;
joyent_*)
__smartos_major_version=$(echo "${__uname_version:7:4}")
nonPortableRid=smartos."$__smartos_major_version"-"$targetArch"
;;
illumos_*)
nonPortableRid=openindiana-"$targetArch"
;;
__smartos_major_version=$(echo "$__uname_version" | cut -c9-10)
nonPortableRid="smartos.$__smartos_major_version-${targetArch}"
;;
*)
nonPortableRid="illumos-${targetArch}"
;;
esac
elif [ "$targetOs" = "solaris" ]; then
__uname_version=$(uname -v)
__solaris_major_version=$(echo "${__uname_version%.*}")
nonPortableRid=solaris."$__solaris_major_version"-"$targetArch"
__solaris_major_version=$(echo "$__uname_version" | cut -d'.' -f1)
nonPortableRid="solaris.$__solaris_major_version-${targetArch}"
elif [ "$targetOs" = "haiku" ]; then
__uname_release=$(uname -r)
__uname_release="$(uname -r)"
nonPortableRid=haiku.r"$__uname_release"-"$targetArch"
fi

echo "$(echo $nonPortableRid | tr '[:upper:]' '[:lower:]')"
echo "$nonPortableRid" | tr '[:upper:]' '[:lower:]'
}

# initDistroRidGlobal
Expand All @@ -85,26 +84,23 @@ getNonPortableDistroRid()
# None
#
# Notes:
#
# It is important to note that the function does not return anything, but it
# exports the following variables on success:
#
# __DistroRid : Non-portable rid of the target platform.
# __PortableTargetOS : OS-part of the portable rid that corresponds to the target platform.
#
# It is important to note that the function does not return anything, but it
# exports the following variables on success:
# __DistroRid : Non-portable rid of the target platform.
# __PortableTargetOS : OS-part of the portable rid that corresponds to the target platform.
initDistroRidGlobal()
{
local targetOs="$1"
local targetArch="$2"
local rootfsDir=""
if [ "$#" -ge 3 ]; then
targetOs="$1"
targetArch="$2"
rootfsDir=""
if [ $# -ge 3 ]; then
rootfsDir="$3"
fi

if [ -n "${rootfsDir}" ]; then
# We may have a cross build. Check for the existence of the rootfsDir
if [ ! -e "${rootfsDir}" ]; then
echo "Error rootfsDir has been passed, but the location is not valid."
echo "Error: rootfsDir has been passed, but the location is not valid."
exit 1
fi
fi
Expand All @@ -119,7 +115,7 @@ initDistroRidGlobal()
STRINGS="$(command -v llvm-strings || true)"
fi

# Check for musl-based distros (e.g Alpine Linux, Void Linux).
# Check for musl-based distros (e.g. Alpine Linux, Void Linux).
if "${rootfsDir}/usr/bin/ldd" --version 2>&1 | grep -q musl ||
( [ -n "$STRINGS" ] && "$STRINGS" "${rootfsDir}/usr/bin/ldd" 2>&1 | grep -q musl ); then
__PortableTargetOS="linux-musl"
Expand Down
7 changes: 6 additions & 1 deletion eng/common/native/init-os-and-arch.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/sh

# Use uname to determine what the OS is.
OSName=$(uname -s | tr '[:upper:]' '[:lower:]')
Expand Down Expand Up @@ -35,6 +35,10 @@ fi
case "$CPUName" in
arm64|aarch64)
arch=arm64
if [ "$(getconf LONG_BIT)" -lt 64 ]; then
# This is 32-bit OS running on 64-bit CPU (for example Raspberry Pi OS)
arch=arm
fi
;;

loongarch64)
Expand All @@ -50,6 +54,7 @@ case "$CPUName" in
;;

armv7l|armv8l)
# shellcheck disable=SC1091
if (NAME=""; . /etc/os-release; test "$NAME" = "Tizen"); then
arch=armel
else
Expand Down
4 changes: 2 additions & 2 deletions eng/common/post-build/publish-using-darc.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ param(
try {
. $PSScriptRoot\post-build-utils.ps1

$darc = Get-Darc
$darc = Get-Darc

$optionalParams = [System.Collections.ArrayList]::new()

Expand Down Expand Up @@ -46,7 +46,7 @@ try {
}

Write-Host 'done.'
}
}
catch {
Write-Host $_
Write-PipelineTelemetryError -Category 'PromoteBuild' -Message "There was an error while trying to publish build '$BuildId' to default channels."
Expand Down
Loading

0 comments on commit 6fbf4d6

Please sign in to comment.