Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/release/dev17.4' into merges/r…
Browse files Browse the repository at this point in the history
…elease/dev17.4-to-release/dev17.5-vs-deps
  • Loading branch information
Cosifne committed May 10, 2023
2 parents 3248c02 + 80ac26a commit 966517d
Show file tree
Hide file tree
Showing 37 changed files with 939 additions and 119 deletions.
2 changes: 2 additions & 0 deletions NuGet.config
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
<add key="dotnet-public" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json" />
<add key="nuget-build" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/nuget-build/nuget/v3/index.json" />
<add key="vssdk" value="https://pkgs.dev.azure.com/azure-public/vside/_packaging/vssdk/nuget/v3/index.json" />
<add key="vssdk-archived" value="https://pkgs.dev.azure.com/azure-public/vside/_packaging/vssdk-archived/nuget/v3/index.json" />
<add key="vs-impl" value="https://pkgs.dev.azure.com/azure-public/vside/_packaging/vs-impl/nuget/v3/index.json" />
<add key="vs-impl-archived" value="https://pkgs.dev.azure.com/azure-public/vside/_packaging/vs-impl-archived/nuget/v3/index.json" />
<add key="vs-buildservices" value="https://pkgs.dev.azure.com/azure-public/vside/_packaging/vs-buildservices/nuget/v3/index.json" />
</packageSources>
<disabledPackageSources>
Expand Down
2 changes: 1 addition & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ stages:
displayName: Restore
inputs:
filePath: eng/build.ps1
arguments: -configuration Release -prepareMachine -ci -restore -binaryLog
arguments: -configuration Release -prepareMachine -ci -restore -binaryLog -binaryLogName Restore.binlog

- task: PowerShell@2
displayName: Build
Expand Down
12 changes: 4 additions & 8 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,18 @@
</Dependency>
</ProductDependencies>
<ToolsetDependencies>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="8.0.0-beta.23052.2">
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="7.0.0-beta.23228.7">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>5a5ae41c42e475e280342b668e668ff34539e36d</Sha>
<Sha>df8799988af6503cbcd9544713d30732328c8c57</Sha>
<SourceBuild RepoName="arcade" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.Net.Compilers.Toolset" Version="4.1.0-5.22128.4">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>5d10d428050c0d6afef30a072c4ae68776621877</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="8.0.0-beta.23052.2">
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="7.0.0-beta.23228.7">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>5a5ae41c42e475e280342b668e668ff34539e36d</Sha>
</Dependency>
<Dependency Name="Microsoft.CodeAnalysis.NetAnalyzers" Version="8.0.0-preview1.23053.1">
<Uri>https://github.com/dotnet/roslyn-analyzers</Uri>
<Sha>fad2bc69091f4282606ba4d3223f7efd94f2fbc8</Sha>
<Sha>df8799988af6503cbcd9544713d30732328c8c57</Sha>
</Dependency>
</ToolsetDependencies>
</Dependencies>
4 changes: 4 additions & 0 deletions eng/build-utils.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,10 @@ function Run-MSBuild([string]$projectFilePath, [string]$buildArgs = "", [string]

if ($ci) {
$args += " /p:ContinuousIntegrationBuild=true"
# Temporarily disable RestoreUseStaticGraphEvaluation to work around this NuGet issue
# in our CI builds
# https://github.com/NuGet/Home/issues/12373
$args += " /p:RestoreUseStaticGraphEvaluation=false"
}

if ($bootstrapDir -ne "") {
Expand Down
28 changes: 23 additions & 5 deletions eng/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ param (
[switch]$bootstrap,
[string]$bootstrapConfiguration = "Release",
[switch][Alias('bl')]$binaryLog,
[string]$binaryLogName = "",
[switch]$buildServerLog,
[switch]$ci,
[switch]$collectDumps,
Expand Down Expand Up @@ -79,6 +80,7 @@ function Print-Usage() {
Write-Host " -verbosity <value> Msbuild verbosity: q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic]"
Write-Host " -deployExtensions Deploy built vsixes (short: -d)"
Write-Host " -binaryLog Create MSBuild binary log (short: -bl)"
Write-Host " -binaryLogName Name of the binary log (default Build.binlog)"
Write-Host " -buildServerLog Create Roslyn build server log"
Write-Host ""
Write-Host "Actions:"
Expand Down Expand Up @@ -166,13 +168,21 @@ function Process-Arguments() {
$script:applyOptimizationData = $false
}

if ($binaryLogName -ne "") {
$script:binaryLog = $true
}

if ($ci) {
$script:binaryLog = $true
if ($bootstrap) {
$script:buildServerLog = $true
}
}

if ($binaryLog -and ($binaryLogName -eq "")) {
$script:binaryLogName = "Build.binlog"
}

$anyUnit = $testDesktop -or $testCoreClr
if ($anyUnit -and $testVsi) {
Write-Host "Cannot combine unit and VSI testing"
Expand Down Expand Up @@ -213,7 +223,15 @@ function BuildSolution() {

Write-Host "$($solution):"

$bl = if ($binaryLog) { "/bl:" + (Join-Path $LogDir "Build.binlog") } else { "" }
$bl = ""
if ($binaryLog) {
$binaryLogPath = Join-Path $LogDir $binaryLogName
$bl = "/bl:" + $binaryLogPath
if ($ci -and (Test-Path $binaryLogPath)) {
Write-LogIssue -Type "error" -Message "Overwriting binary log file $($binaryLogPath)"
throw "Overwriting binary log files"
}
}

if ($buildServerLog) {
${env:ROSLYNCOMMANDLINELOGFILE} = Join-Path $LogDir "Build.Server.log"
Expand All @@ -240,11 +258,11 @@ function BuildSolution() {
$generateDocumentationFile = if ($skipDocumentation) { "/p:GenerateDocumentationFile=false" } else { "" }
$roslynUseHardLinks = if ($ci) { "/p:ROSLYNUSEHARDLINKS=true" } else { "" }

# Temporarily disable RestoreUseStaticGraphEvaluation to work around this NuGet issue
# Temporarily disable RestoreUseStaticGraphEvaluation to work around this NuGet issue
# in our CI builds
# https://github.com/NuGet/Home/issues/12373
$restoreUseStaticGraphEvaluation = if ($ci) { $false } else { $true }

try {
MSBuild $toolsetBuildProj `
$bl `
Expand Down Expand Up @@ -739,7 +757,7 @@ try {
catch
{
if ($ci) {
echo "##vso[task.logissue type=error](NETCORE_ENGINEERING_TELEMETRY=Build) Build failed"
Write-LogIssue -Type "error" -Message "(NETCORE_ENGINEERING_TELEMETRY=Build) Build failed"
}
throw $_
}
Expand All @@ -757,7 +775,7 @@ try {
catch
{
if ($ci) {
echo "##vso[task.logissue type=error](NETCORE_ENGINEERING_TELEMETRY=Test) Tests failed"
Write-LogIssue -Type "error" -Message "(NETCORE_ENGINEERING_TELEMETRY=Test) Tests failed"
}
throw $_
}
Expand Down
2 changes: 1 addition & 1 deletion eng/common/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ function Print-Usage() {
Write-Host " -prepareMachine Prepare machine for CI run, clean up processes after build"
Write-Host " -warnAsError <value> Sets warnaserror msbuild parameter ('true' or 'false')"
Write-Host " -msbuildEngine <value> Msbuild engine to use to run build ('dotnet', 'vs', or unspecified)."
Write-Host " -excludePrereleaseVS Set to exclude build engines in prerelease versions of Visual Studio"
Write-Host " -nativeToolsOnMachine Sets the native tools on machine environment variable (indicating that the script should use native tools on machine)"
Write-Host " -excludePrereleaseVS Set to exclude build engines in prerelease versions of Visual Studio"
Write-Host ""

Write-Host "Command line arguments not listed above are passed thru to msbuild."
Expand Down
170 changes: 170 additions & 0 deletions eng/common/cross/arm/tizen-fetch.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,170 @@
#!/usr/bin/env bash
set -e

if [[ -z "${VERBOSE// }" ]] || [ "$VERBOSE" -ne "$VERBOSE" ] 2>/dev/null; then
VERBOSE=0
fi

Log()
{
if [ $VERBOSE -ge $1 ]; then
echo ${@:2}
fi
}

Inform()
{
Log 1 -e "\x1B[0;34m$@\x1B[m"
}

Debug()
{
Log 2 -e "\x1B[0;32m$@\x1B[m"
}

Error()
{
>&2 Log 0 -e "\x1B[0;31m$@\x1B[m"
}

Fetch()
{
URL=$1
FILE=$2
PROGRESS=$3
if [ $VERBOSE -ge 1 ] && [ $PROGRESS ]; then
CURL_OPT="--progress-bar"
else
CURL_OPT="--silent"
fi
curl $CURL_OPT $URL > $FILE
}

hash curl 2> /dev/null || { Error "Require 'curl' Aborting."; exit 1; }
hash xmllint 2> /dev/null || { Error "Require 'xmllint' Aborting."; exit 1; }
hash sha256sum 2> /dev/null || { Error "Require 'sha256sum' Aborting."; exit 1; }

TMPDIR=$1
if [ ! -d $TMPDIR ]; then
TMPDIR=./tizen_tmp
Debug "Create temporary directory : $TMPDIR"
mkdir -p $TMPDIR
fi

TIZEN_URL=http://download.tizen.org/snapshots/tizen
BUILD_XML=build.xml
REPOMD_XML=repomd.xml
PRIMARY_XML=primary.xml
TARGET_URL="http://__not_initialized"

Xpath_get()
{
XPATH_RESULT=''
XPATH=$1
XML_FILE=$2
RESULT=$(xmllint --xpath $XPATH $XML_FILE)
if [[ -z ${RESULT// } ]]; then
Error "Can not find target from $XML_FILE"
Debug "Xpath = $XPATH"
exit 1
fi
XPATH_RESULT=$RESULT
}

fetch_tizen_pkgs_init()
{
TARGET=$1
PROFILE=$2
Debug "Initialize TARGET=$TARGET, PROFILE=$PROFILE"

TMP_PKG_DIR=$TMPDIR/tizen_${PROFILE}_pkgs
if [ -d $TMP_PKG_DIR ]; then rm -rf $TMP_PKG_DIR; fi
mkdir -p $TMP_PKG_DIR

PKG_URL=$TIZEN_URL/$PROFILE/latest

BUILD_XML_URL=$PKG_URL/$BUILD_XML
TMP_BUILD=$TMP_PKG_DIR/$BUILD_XML
TMP_REPOMD=$TMP_PKG_DIR/$REPOMD_XML
TMP_PRIMARY=$TMP_PKG_DIR/$PRIMARY_XML
TMP_PRIMARYGZ=${TMP_PRIMARY}.gz

Fetch $BUILD_XML_URL $TMP_BUILD

Debug "fetch $BUILD_XML_URL to $TMP_BUILD"

TARGET_XPATH="//build/buildtargets/buildtarget[@name=\"$TARGET\"]/repo[@type=\"binary\"]/text()"
Xpath_get $TARGET_XPATH $TMP_BUILD
TARGET_PATH=$XPATH_RESULT
TARGET_URL=$PKG_URL/$TARGET_PATH

REPOMD_URL=$TARGET_URL/repodata/repomd.xml
PRIMARY_XPATH='string(//*[local-name()="data"][@type="primary"]/*[local-name()="location"]/@href)'

Fetch $REPOMD_URL $TMP_REPOMD

Debug "fetch $REPOMD_URL to $TMP_REPOMD"

Xpath_get $PRIMARY_XPATH $TMP_REPOMD
PRIMARY_XML_PATH=$XPATH_RESULT
PRIMARY_URL=$TARGET_URL/$PRIMARY_XML_PATH

Fetch $PRIMARY_URL $TMP_PRIMARYGZ

Debug "fetch $PRIMARY_URL to $TMP_PRIMARYGZ"

gunzip $TMP_PRIMARYGZ

Debug "unzip $TMP_PRIMARYGZ to $TMP_PRIMARY"
}

fetch_tizen_pkgs()
{
ARCH=$1
PACKAGE_XPATH_TPL='string(//*[local-name()="metadata"]/*[local-name()="package"][*[local-name()="name"][text()="_PKG_"]][*[local-name()="arch"][text()="_ARCH_"]]/*[local-name()="location"]/@href)'

PACKAGE_CHECKSUM_XPATH_TPL='string(//*[local-name()="metadata"]/*[local-name()="package"][*[local-name()="name"][text()="_PKG_"]][*[local-name()="arch"][text()="_ARCH_"]]/*[local-name()="checksum"]/text())'

for pkg in ${@:2}
do
Inform "Fetching... $pkg"
XPATH=${PACKAGE_XPATH_TPL/_PKG_/$pkg}
XPATH=${XPATH/_ARCH_/$ARCH}
Xpath_get $XPATH $TMP_PRIMARY
PKG_PATH=$XPATH_RESULT

XPATH=${PACKAGE_CHECKSUM_XPATH_TPL/_PKG_/$pkg}
XPATH=${XPATH/_ARCH_/$ARCH}
Xpath_get $XPATH $TMP_PRIMARY
CHECKSUM=$XPATH_RESULT

PKG_URL=$TARGET_URL/$PKG_PATH
PKG_FILE=$(basename $PKG_PATH)
PKG_PATH=$TMPDIR/$PKG_FILE

Debug "Download $PKG_URL to $PKG_PATH"
Fetch $PKG_URL $PKG_PATH true

echo "$CHECKSUM $PKG_PATH" | sha256sum -c - > /dev/null
if [ $? -ne 0 ]; then
Error "Fail to fetch $PKG_URL to $PKG_PATH"
Debug "Checksum = $CHECKSUM"
exit 1
fi
done
}

Inform "Initialize arm base"
fetch_tizen_pkgs_init standard base
Inform "fetch common packages"
fetch_tizen_pkgs armv7hl gcc gcc-devel-static glibc glibc-devel libicu libicu-devel libatomic linux-glibc-devel keyutils keyutils-devel libkeyutils
Inform "fetch coreclr packages"
fetch_tizen_pkgs armv7hl lldb lldb-devel libgcc libstdc++ libstdc++-devel libunwind libunwind-devel lttng-ust-devel lttng-ust userspace-rcu-devel userspace-rcu
Inform "fetch corefx packages"
fetch_tizen_pkgs armv7hl libcom_err libcom_err-devel zlib zlib-devel libopenssl11 libopenssl1.1-devel krb5 krb5-devel

Inform "Initialize standard unified"
fetch_tizen_pkgs_init standard unified
Inform "fetch corefx packages"
fetch_tizen_pkgs armv7hl gssdp gssdp-devel tizen-release

Loading

0 comments on commit 966517d

Please sign in to comment.