From 53beac08b4821a249b6da97b0a12ad10ff05eab4 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Tue, 21 Feb 2023 13:42:30 -0800 Subject: [PATCH] [main] Update dependencies from dotnet/arcade (#15596) Co-authored-by: dotnet-maestro[bot] --- eng/Version.Details.xml | 20 +-- eng/Versions.props | 2 +- eng/common/cross/build-rootfs.sh | 135 ++++++++++++++---- eng/common/generate-locproject.ps1 | 9 +- eng/common/init-tools-native.ps1 | 9 +- eng/common/templates/job/job.yml | 6 +- .../templates/variables/pool-providers.yml | 6 +- global.json | 4 +- 8 files changed, 133 insertions(+), 58 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index c2165068e..8ee048193 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -195,18 +195,18 @@ - + https://github.com/dotnet/arcade - 02980a654d20995c38eca6ceabf729c4c13412c4 + c4a85adbff520f62bfade7a6132f471506c3d35a - + https://github.com/dotnet/arcade - 02980a654d20995c38eca6ceabf729c4c13412c4 + c4a85adbff520f62bfade7a6132f471506c3d35a - + https://github.com/dotnet/arcade - 02980a654d20995c38eca6ceabf729c4c13412c4 + c4a85adbff520f62bfade7a6132f471506c3d35a https://github.com/dotnet/arcade-services @@ -225,14 +225,14 @@ e0402855655756b9562138b327763e1c97d0b908 - + https://github.com/dotnet/sourcelink - 763c618bbc4cc6481d37d122dc0dd3c2cafbcd49 + 955e79b0b955a9f57078b2399a782fcde44a9261 - + https://github.com/dotnet/xliff-tasks - 3cb4fa02ba389a7f070a16c50227cba2e610b48d + 69157952aba0f08738249af4454b045b553614c4 diff --git a/eng/Versions.props b/eng/Versions.props index 805d7d660..0044c3713 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -26,7 +26,7 @@ - 8.0.0-beta.23106.4 + 8.0.0-beta.23120.1 diff --git a/eng/common/cross/build-rootfs.sh b/eng/common/cross/build-rootfs.sh index 1ebf454f3..ffaa88eb0 100755 --- a/eng/common/cross/build-rootfs.sh +++ b/eng/common/cross/build-rootfs.sh @@ -6,10 +6,11 @@ usage() { echo "Usage: $0 [BuildArch] [CodeName] [lldbx.y] [llvmx[.y]] [--skipunmount] --rootfsdir ]" echo "BuildArch can be: arm(default), arm64, armel, armv6, ppc64le, riscv64, s390x, x64, x86" - echo "CodeName - optional, Code name for Linux, can be: xenial(default), zesty, bionic, alpine, alpine3.13 or alpine3.14. If BuildArch is armel, LinuxCodeName is jessie(default) or tizen." - echo " for FreeBSD can be: freebsd12, freebsd13" - echo " for illumos can be: illumos" - echo " for Haiku can be: haiku." + echo "CodeName - optional, Code name for Linux, can be: xenial(default), zesty, bionic, alpine" + echo " for alpine can be specified with version: alpineX.YY or alpineedge" + echo " for FreeBSD can be: freebsd12, freebsd13" + echo " for illumos can be: illumos" + echo " for Haiku can be: haiku." echo "lldbx.y - optional, LLDB version, can be: lldb3.9(default), lldb4.0, lldb5.0, lldb6.0 no-lldb. Ignored for alpine and FreeBSD" echo "llvmx[.y] - optional, LLVM version for LLVM related packages." echo "--skipunmount - optional, will skip the unmount of rootfs folder." @@ -145,35 +146,54 @@ while :; do __Keyring="--keyring /usr/share/keyrings/raspbian-archive-keyring.gpg" fi ;; - ppc64le) - __BuildArch=ppc64le - __UbuntuArch=ppc64el - __UbuntuRepo="http://ports.ubuntu.com/ubuntu-ports/" - __UbuntuPackages="${__UbuntuPackages// libunwind8-dev/}" - __UbuntuPackages="${__UbuntuPackages// libomp-dev/}" - __UbuntuPackages="${__UbuntuPackages// libomp5/}" - unset __LLDB_Package - ;; riscv64) __BuildArch=riscv64 + __AlpineArch=riscv64 + __AlpinePackages="${__AlpinePackages// lldb-dev/}" + __AlpinePackages="${__AlpinePackages// compiler-rt-static/}" + __QEMUArch=riscv64 __UbuntuArch=riscv64 __UbuntuRepo="http://deb.debian.org/debian-ports" - __CodeName=sid __UbuntuPackages="${__UbuntuPackages// libunwind8-dev/}" unset __LLDB_Package if [[ -e "/usr/share/keyrings/debian-ports-archive-keyring.gpg" ]]; then __Keyring="--keyring /usr/share/keyrings/debian-ports-archive-keyring.gpg --include=debian-ports-archive-keyring" fi + + if [[ "$version" != "edge" && ( -z "$__AlpineVersion" || -z "$__AlpineMajorVersion" )]]; then + __AlpineVersion=edge # minimum version with APKINDEX.tar.gz (packages archive) + fi + ;; + ppc64le) + __BuildArch=ppc64le + __AlpineArch=ppc64le + __QEMUArch=ppc64le + __UbuntuArch=ppc64el + __UbuntuRepo="http://ports.ubuntu.com/ubuntu-ports/" + __UbuntuPackages="${__UbuntuPackages// libunwind8-dev/}" + __UbuntuPackages="${__UbuntuPackages// libomp-dev/}" + __UbuntuPackages="${__UbuntuPackages// libomp5/}" + unset __LLDB_Package + + if [[ "$version" != "edge" && ( -z "$__AlpineVersion" || -z "$__AlpineMajorVersion" )]]; then + __AlpineVersion=3.15 # minimum version that supports compiler-rt + fi ;; s390x) __BuildArch=s390x + __AlpineArch=s390x + __QEMUArch=s390x __UbuntuArch=s390x __UbuntuRepo="http://ports.ubuntu.com/ubuntu-ports/" __UbuntuPackages="${__UbuntuPackages// libunwind8-dev/}" __UbuntuPackages="${__UbuntuPackages// libomp-dev/}" __UbuntuPackages="${__UbuntuPackages// libomp5/}" unset __LLDB_Package + + if [[ "$version" != "edge" && ( -z "$__AlpineVersion" || -z "$__AlpineMajorVersion" )]]; then + __AlpineVersion=3.15 # minimum version that supports compiler-rt + fi ;; x64) __BuildArch=x64 @@ -252,22 +272,53 @@ while :; do __UbuntuRepo="http://ftp.debian.org/debian/" __LLDB_Package="liblldb-6.0-dev" ;; + bullseye) # Debian 11 + __CodeName=bullseye + __UbuntuRepo="http://ftp.debian.org/debian/" + ;; + sid) # Debian sid + __CodeName=sid + __UbuntuRepo="http://ftp.debian.org/debian/" + ;; tizen) __CodeName= __UbuntuRepo= __Tizen=tizen ;; - alpine|alpine3.13) + alpine*) __CodeName=alpine __UbuntuRepo= - __AlpineVersion=3.13 - __AlpinePackages+=" llvm10-libs" - ;; - alpine3.14) - __CodeName=alpine - __UbuntuRepo= - __AlpineVersion=3.14 - __AlpinePackages+=" llvm11-libs" + version="${lowerI/alpine/}" + + if [[ "$version" == "edge" ]]; then + __AlpineVersion=edge + else + parts=(${version//./ }) + __AlpineMajorVersion="${parts[0]}" + __AlpineMinoVersion="${parts[1]}" + + if [[ -z "$__AlpineVersion" ]]; then + __AlpineVersion="$__AlpineMajorVersion.$__AlpineMinoVersion" + fi + fi + + case "$__AlpineVersion" in + 3.14) __AlpinePackages+=" llvm11-libs" ;; + 3.15) __AlpinePackages+=" llvm12-libs" ;; + 3.16) __AlpinePackages+=" llvm13-libs" ;; + 3.17) __AlpinePackages+=" llvm15-libs" ;; + edge) __AlpineLlvmLibsLookup=1 ;; + *) + if [[ "$__AlpineArch" =~ "s390x|ppc64le" ]]; then + __AlpineVersion=3.15 # minimum version that supports compiler-rt + __AlpinePackages+=" llvm12-libs" + elif [[ "$__AlpineArch" == "riscv64" ]]; then + __AlpineLlvmLibsLookup=1 + __AlpineVersion=edge # minimum version with APKINDEX.tar.gz (packages archive) + else + __AlpineVersion=3.13 # 3.13 to maximize compatibility + fi + esac ;; freebsd12) __CodeName=freebsd @@ -341,18 +392,40 @@ mkdir -p "$__RootfsDir" __RootfsDir="$( cd "$__RootfsDir" && pwd )" if [[ "$__CodeName" == "alpine" ]]; then - __ApkToolsVersion=2.9.1 + __ApkToolsVersion=2.12.11 __ApkToolsDir="$(mktemp -d)" - wget "https://github.com/alpinelinux/apk-tools/releases/download/v$__ApkToolsVersion/apk-tools-$__ApkToolsVersion-x86_64-linux.tar.gz" -P "$__ApkToolsDir" - tar -xf "$__ApkToolsDir/apk-tools-$__ApkToolsVersion-x86_64-linux.tar.gz" -C "$__ApkToolsDir" + + wget "https://gitlab.alpinelinux.org/api/v4/projects/5/packages/generic//v$__ApkToolsVersion/x86_64/apk.static" -P "$__ApkToolsDir" + chmod +x "$__ApkToolsDir/apk.static" + mkdir -p "$__RootfsDir"/usr/bin cp -v "/usr/bin/qemu-$__QEMUArch-static" "$__RootfsDir/usr/bin" - "$__ApkToolsDir/apk-tools-$__ApkToolsVersion/apk" \ - -X "http://dl-cdn.alpinelinux.org/alpine/v$__AlpineVersion/main" \ - -X "http://dl-cdn.alpinelinux.org/alpine/v$__AlpineVersion/community" \ - -U --allow-untrusted --root "$__RootfsDir" --arch "$__AlpineArch" --initdb \ - add $__AlpinePackages + if [[ "$__AlpineVersion" == "edge" ]]; then + version=edge + else + version="v$__AlpineVersion" + fi + + "$__ApkToolsDir/apk.static" \ + -X "http://dl-cdn.alpinelinux.org/alpine/$version/main" \ + -X "http://dl-cdn.alpinelinux.org/alpine/$version/community" \ + -U --allow-untrusted --root "$__RootfsDir" --arch "$__AlpineArch" --initdb \ + add $__AlpinePackages + + if [[ "$__AlpineLlvmLibsLookup" == 1 ]]; then + "$__ApkToolsDir/apk.static" \ + -X "http://dl-cdn.alpinelinux.org/alpine/$version/main" \ + -X "http://dl-cdn.alpinelinux.org/alpine/$version/community" \ + -U --allow-untrusted --root "$__RootfsDir" --arch "$__AlpineArch" \ + search 'llvm*-libs' | sort | tail -1 | while IFS=- read name rest; do + "$__ApkToolsDir/apk.static" \ + -X "http://dl-cdn.alpinelinux.org/alpine/$version/main" \ + -X "http://dl-cdn.alpinelinux.org/alpine/$version/community" \ + -U --allow-untrusted --root "$__RootfsDir" --arch "$__AlpineArch" \ + add "$name-libs" + done + fi rm -r "$__ApkToolsDir" elif [[ "$__CodeName" == "freebsd" ]]; then diff --git a/eng/common/generate-locproject.ps1 b/eng/common/generate-locproject.ps1 index bcb579e37..524aaa57f 100644 --- a/eng/common/generate-locproject.ps1 +++ b/eng/common/generate-locproject.ps1 @@ -45,7 +45,7 @@ if (-not $wxlFiles) { } } -$macosHtmlEnFiles = Get-ChildItem -Recurse -Path "$SourcesDirectory" | Where-Object { $_.FullName -Match "en\.lproj\\.+\.html" } # add installer HTML files +$macosHtmlEnFiles = Get-ChildItem -Recurse -Path "$SourcesDirectory" | Where-Object { $_.FullName -Match "en\.lproj\\.+\.html$" } # add installer HTML files $macosHtmlFiles = @() if ($macosHtmlEnFiles) { $macosHtmlEnFiles | ForEach-Object { @@ -148,12 +148,17 @@ $locJson = @{ } } $sourceFile = ($_.FullName | Resolve-Path -Relative) + $lciFile = $sourceFile + ".lci" if ($continue) { - return @{ + $result = @{ SourceFile = $sourceFile CopyOption = "LangIDOnPath" OutputPath = $outputPath } + if (Test-Path $lciFile -PathType Leaf) { + $result["LciFile"] = $lciFile + } + return $result } } ) diff --git a/eng/common/init-tools-native.ps1 b/eng/common/init-tools-native.ps1 index fbc67effc..27ccdb9ec 100644 --- a/eng/common/init-tools-native.ps1 +++ b/eng/common/init-tools-native.ps1 @@ -83,7 +83,8 @@ try { Select-Object -Expand 'native-tools' -ErrorAction SilentlyContinue if ($NativeTools) { if ($PathPromotion -eq $True) { - if ($env:SYSTEM_TEAMPROJECT) { # check to see if we're in an Azure pipelines build + $ArcadeToolsDirectory = "$env:SYSTEMDRIVE\arcade-tools" + if (Test-Path $ArcadeToolsDirectory) { # if this directory exists, we should use native tools on machine $NativeTools.PSObject.Properties | ForEach-Object { $ToolName = $_.Name $ToolVersion = $_.Value @@ -93,11 +94,6 @@ try { if ($ToolVersion -eq "latest") { $ToolVersion = "" } - $ArcadeToolsDirectory = "C:\arcade-tools" - if (-not (Test-Path $ArcadeToolsDirectory)) { - Write-Error "Arcade tools directory '$ArcadeToolsDirectory' was not found; artifacts were not properly installed." - exit 1 - } $ToolDirectories = (Get-ChildItem -Path "$ArcadeToolsDirectory" -Filter "$ToolName-$ToolVersion*" | Sort-Object -Descending) if ($ToolDirectories -eq $null) { Write-Error "Unable to find directory for $ToolName $ToolVersion; please make sure the tool is installed on this image." @@ -125,6 +121,7 @@ try { if ((Get-Command "$ToolName" -ErrorAction SilentlyContinue) -eq $null) { Write-PipelineTelemetryError -Category 'NativeToolsBootstrap' -Message "$ToolName not found on path. Please install $ToolName $ToolVersion before proceeding." + Write-PipelineTelemetryError -Category 'NativeToolsBootstrap' -Message "If this is running on a build machine, the arcade-tools directory was not found, which means there's an error with the image." } } exit 0 diff --git a/eng/common/templates/job/job.yml b/eng/common/templates/job/job.yml index f0af425d9..61914a1fb 100644 --- a/eng/common/templates/job/job.yml +++ b/eng/common/templates/job/job.yml @@ -134,7 +134,7 @@ jobs: - ${{ if and(eq(parameters.runAsPublic, 'false'), eq(variables['System.TeamProject'], 'internal')) }}: - task: NuGetAuthenticate@0 - - ${{ if or(eq(parameters.artifacts.download, 'true'), ne(parameters.artifacts.download, '')) }}: + - ${{ if and(ne(parameters.artifacts.download, 'false'), ne(parameters.artifacts.download, '')) }}: - task: DownloadPipelineArtifact@2 inputs: buildType: current @@ -171,7 +171,7 @@ jobs: TeamName: $(_TeamName) - ${{ if ne(parameters.artifacts.publish, '') }}: - - ${{ if or(eq(parameters.artifacts.publish.artifacts, 'true'), ne(parameters.artifacts.publish.artifacts, '')) }}: + - ${{ if and(ne(parameters.artifacts.publish.artifacts, 'false'), ne(parameters.artifacts.publish.artifacts, '')) }}: - task: CopyFiles@2 displayName: Gather binaries for publish to artifacts inputs: @@ -192,7 +192,7 @@ jobs: ArtifactName: ${{ coalesce(parameters.artifacts.publish.artifacts.name , 'Artifacts_$(Agent.Os)_$(_BuildConfig)') }} continueOnError: true condition: always() - - ${{ if or(eq(parameters.artifacts.publish.logs, 'true'), ne(parameters.artifacts.publish.logs, '')) }}: + - ${{ if and(ne(parameters.artifacts.publish.logs, 'false'), ne(parameters.artifacts.publish.logs, '')) }}: - publish: artifacts/log artifact: ${{ coalesce(parameters.artifacts.publish.logs.name, 'Logs_Build_$(Agent.Os)_$(_BuildConfig)') }} displayName: Publish logs diff --git a/eng/common/templates/variables/pool-providers.yml b/eng/common/templates/variables/pool-providers.yml index 99c80212b..9cc5c550d 100644 --- a/eng/common/templates/variables/pool-providers.yml +++ b/eng/common/templates/variables/pool-providers.yml @@ -1,17 +1,17 @@ -# Select a pool provider based off branch name. Anything with branch name containing 'release' must go into an -Svc pool, +# Select a pool provider based off branch name. Anything with branch name containing 'release' must go into an -Svc pool, # otherwise it should go into the "normal" pools. This separates out the queueing and billing of released branches. # Motivation: # Once a given branch of a repository's output has been officially "shipped" once, it is then considered to be COGS # (Cost of goods sold) and should be moved to a servicing pool provider. This allows both separation of queueing -# (allowing release builds and main PR builds to not intefere with each other) and billing (required for COGS) +# (allowing release builds and main PR builds to not intefere with each other) and billing (required for COGS. # Additionally, the pool provider name itself may be subject to change when the .NET Core Engineering Services # team needs to move resources around and create new and potentially differently-named pools. Using this template # file from an Arcade-ified repo helps guard against both having to update one's release/* branches and renaming. # How to use: # This yaml assumes your shipped product branches use the naming convention "release/..." (which many do). -# If we find alternate naming conventions in broad usage these can be added to the condition below. +# If we find alternate naming conventions in broad usage it can be added to the condition below. # # First, import the template in an arcade-ified repo to pick up the variables, e.g.: # diff --git a/global.json b/global.json index 669d24dbf..e48079a73 100644 --- a/global.json +++ b/global.json @@ -11,7 +11,7 @@ "cmake": "3.21.0" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.23106.4", - "Microsoft.DotNet.CMake.Sdk": "8.0.0-beta.23106.4" + "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.23120.1", + "Microsoft.DotNet.CMake.Sdk": "8.0.0-beta.23120.1" } }