Skip to content

Commit

Permalink
[master] Update dependencies from dotnet/arcade (dotnet#690)
Browse files Browse the repository at this point in the history
* Update dependencies from https://github.com/dotnet/arcade build 20200511.9

Microsoft.DotNet.Arcade.Sdk
 From Version 5.0.0-beta.20201.2 -> To Version 5.0.0-beta.20261.9

* Update dependencies from https://github.com/dotnet/arcade build 20200528.4

Microsoft.DotNet.Arcade.Sdk
 From Version 5.0.0-beta.20201.2 -> To Version 5.0.0-beta.20278.4

* Update nuget.config

* Try to rollforward test running

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Joey Robichaud <jorobich@microsoft.com>
  • Loading branch information
3 people committed May 30, 2020
1 parent 4d387f3 commit 1876dca
Show file tree
Hide file tree
Showing 33 changed files with 1,053 additions and 516 deletions.
2 changes: 2 additions & 0 deletions NuGet.config
Expand Up @@ -3,6 +3,8 @@
<packageSources>
<clear />
<add key="dotnet-eng" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json" />
<add key="dotnet-tools" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json" />
<add key="dotnet5" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json" />
<add key="roslyn" value="https://dotnet.myget.org/F/roslyn/api/v3/index.json" />
<add key="roslyn-analyzers" value="https://dotnet.myget.org/F/roslyn-analyzers/api/v3/index.json" />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
Expand Down
4 changes: 2 additions & 2 deletions eng/Version.Details.xml
Expand Up @@ -7,9 +7,9 @@
</Dependency>
</ProductDependencies>
<ToolsetDependencies>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="5.0.0-beta.20201.2">
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="5.0.0-beta.20278.4">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>bce0a98620c1c5a110b2bba9912f3d5929069c6b</Sha>
<Sha>96c65ad967d2abbbd8e770ba752a6b64255ec669</Sha>
</Dependency>
</ToolsetDependencies>
</Dependencies>
14 changes: 8 additions & 6 deletions eng/common/SetupNugetSources.ps1
Expand Up @@ -83,7 +83,7 @@ function AddCredential($creds, $source, $username, $password) {
$passwordElement.SetAttribute("value", $Password)
}

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

Write-Host "Inserting credentials for $($maestroPrivateSources.Count) Maestro's private feeds."
Expand Down Expand Up @@ -123,19 +123,21 @@ if ($creds -eq $null) {
$doc.DocumentElement.AppendChild($creds) | Out-Null
}

$userName = "dn-bot"

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

$dotnet3Source = $sources.SelectSingleNode("add[@key='dotnet3']")
if ($dotnet3Source -ne $null) {
AddPackageSource -Sources $sources -SourceName "dotnet3-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal/nuget/v2" -Creds $creds -Username "dn-bot" -Password $Password
AddPackageSource -Sources $sources -SourceName "dotnet3-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal-transport/nuget/v2" -Creds $creds -Username "dn-bot" -Password $Password
AddPackageSource -Sources $sources -SourceName "dotnet3-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal/nuget/v2" -Creds $creds -Username $userName -Password $Password
AddPackageSource -Sources $sources -SourceName "dotnet3-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal-transport/nuget/v2" -Creds $creds -Username $userName -Password $Password
}

$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 "dn-bot" -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 "dn-bot" -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 -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
}

$doc.Save($filename)
6 changes: 5 additions & 1 deletion eng/common/build.ps1
Expand Up @@ -20,6 +20,7 @@ Param(
[switch] $publish,
[switch] $clean,
[switch][Alias('bl')]$binaryLog,
[switch][Alias('nobl')]$excludeCIBinarylog,
[switch] $ci,
[switch] $prepareMachine,
[switch] $help,
Expand Down Expand Up @@ -58,6 +59,7 @@ function Print-Usage() {
Write-Host "Advanced settings:"
Write-Host " -projects <value> Semi-colon delimited list of sln/proj's to build. Globbing is supported (*.sln)"
Write-Host " -ci Set when running on CI server"
Write-Host " -excludeCIBinarylog Don't output binary log (short: -nobl)"
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)."
Expand Down Expand Up @@ -134,7 +136,9 @@ try {
}

if ($ci) {
$binaryLog = $true
if (-not $excludeCIBinarylog) {
$binaryLog = $true
}
$nodeReuse = $false
}

Expand Down
9 changes: 8 additions & 1 deletion eng/common/build.sh
Expand Up @@ -32,6 +32,7 @@ usage()
echo "Advanced settings:"
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 " --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')"
Expand Down Expand Up @@ -68,6 +69,7 @@ clean=false
warn_as_error=true
node_reuse=true
binary_log=false
exclude_ci_binary_log=false
pipelines_log=false

projects=''
Expand Down Expand Up @@ -98,6 +100,9 @@ while [[ $# > 0 ]]; do
-binarylog|-bl)
binary_log=true
;;
-excludeCIBinarylog|-nobl)
exclude_ci_binary_log=true
;;
-pipelineslog|-pl)
pipelines_log=true
;;
Expand Down Expand Up @@ -156,8 +161,10 @@ done

if [[ "$ci" == true ]]; then
pipelines_log=true
binary_log=true
node_reuse=false
if [[ "$exclude_ci_binary_log" == false ]]; then
binary_log=true
fi
fi

. "$scriptroot/tools.sh"
Expand Down
30 changes: 18 additions & 12 deletions eng/common/cross/build-rootfs.sh
@@ -1,5 +1,7 @@
#!/usr/bin/env bash

set -e

usage()
{
echo "Usage: $0 [BuildArch] [CodeName] [lldbx.y] [--skipunmount] --rootfsdir <directory>]"
Expand All @@ -15,6 +17,8 @@ __CodeName=xenial
__CrossDir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
__InitialDir=$PWD
__BuildArch=arm
__AlpineArch=armv7
__QEMUArch=arm
__UbuntuArch=armhf
__UbuntuRepo="http://ports.ubuntu.com/"
__LLDB_Package="liblldb-3.9-dev"
Expand All @@ -26,9 +30,10 @@ __UbuntuPackages="build-essential"
__AlpinePackages="alpine-base"
__AlpinePackages+=" build-base"
__AlpinePackages+=" linux-headers"
__AlpinePackagesEdgeTesting=" lldb-dev"
__AlpinePackagesEdgeMain=" llvm9-libs"
__AlpinePackagesEdgeCommunity=" lldb-dev"
__AlpinePackagesEdgeMain=" llvm10-libs"
__AlpinePackagesEdgeMain+=" python3"
__AlpinePackagesEdgeMain+=" libedit"

# symlinks fixer
__UbuntuPackages+=" symlinks"
Expand All @@ -55,12 +60,11 @@ __AlpinePackages+=" openssl-dev"
__AlpinePackages+=" zlib-dev"

__FreeBSDBase="12.1-RELEASE"
__FreeBSDPkg="1.10.5"
__FreeBSDPkg="1.12.0"
__FreeBSDPackages="libunwind"
__FreeBSDPackages+=" icu"
__FreeBSDPackages+=" libinotify"
__FreeBSDPackages+=" lttng-ust"
__FreeBSDPackages+=" llvm-90"
__FreeBSDPackages+=" krb5"

__UnprocessedBuildArgs=
Expand All @@ -78,7 +82,7 @@ while :; do
arm)
__BuildArch=arm
__UbuntuArch=armhf
__AlpineArch=armhf
__AlpineArch=armv7
__QEMUArch=arm
;;
arm64)
Expand Down Expand Up @@ -205,7 +209,7 @@ fi

if [ -d "$__RootfsDir" ]; then
if [ $__SkipUnmount == 0 ]; then
umount $__RootfsDir/*
umount $__RootfsDir/* || true
fi
rm -rf $__RootfsDir
fi
Expand All @@ -231,9 +235,9 @@ if [[ "$__CodeName" == "alpine" ]]; then
add $__AlpinePackagesEdgeMain

$__ApkToolsDir/apk-tools-$__ApkToolsVersion/apk \
-X http://dl-cdn.alpinelinux.org/alpine/edge/testing \
-X http://dl-cdn.alpinelinux.org/alpine/edge/community \
-U --allow-untrusted --root $__RootfsDir --arch $__AlpineArch --initdb \
add $__AlpinePackagesEdgeTesting
add $__AlpinePackagesEdgeCommunity

rm -r $__ApkToolsDir
elif [[ "$__CodeName" == "freebsd" ]]; then
Expand All @@ -246,11 +250,13 @@ elif [[ "$__CodeName" == "freebsd" ]]; then
# get and build package manager
wget -O - https://github.com/freebsd/pkg/archive/${__FreeBSDPkg}.tar.gz | tar -C $__RootfsDir/tmp -zxf -
cd $__RootfsDir/tmp/pkg-${__FreeBSDPkg}
./autogen.sh && ./configure --prefix=$__RootfsDir/host && make install
# needed for install to succeed
mkdir -p $__RootfsDir/host/etc
./autogen.sh && ./configure --prefix=$__RootfsDir/host && make && make install
rm -rf $__RootfsDir/tmp/pkg-${__FreeBSDPkg}
# install packages we need.
$__RootfsDir/host/sbin/pkg -r $__RootfsDir -C $__RootfsDir/usr/local/etc/pkg.conf update
$__RootfsDir/host/sbin/pkg -r $__RootfsDir -C $__RootfsDir/usr/local/etc/pkg.conf install --yes $__FreeBSDPackages
INSTALL_AS_USER=$(whoami) $__RootfsDir/host/sbin/pkg -r $__RootfsDir -C $__RootfsDir/usr/local/etc/pkg.conf update
INSTALL_AS_USER=$(whoami) $__RootfsDir/host/sbin/pkg -r $__RootfsDir -C $__RootfsDir/usr/local/etc/pkg.conf install --yes $__FreeBSDPackages
elif [[ -n $__CodeName ]]; then
qemu-debootstrap --arch $__UbuntuArch $__CodeName $__RootfsDir $__UbuntuRepo
cp $__CrossDir/$__BuildArch/sources.list.$__CodeName $__RootfsDir/etc/apt/sources.list
Expand All @@ -260,7 +266,7 @@ elif [[ -n $__CodeName ]]; then
chroot $__RootfsDir symlinks -cr /usr

if [ $__SkipUnmount == 0 ]; then
umount $__RootfsDir/*
umount $__RootfsDir/* || true
fi

if [[ "$__BuildArch" == "arm" && "$__CodeName" == "trusty" ]]; then
Expand Down
1 change: 1 addition & 0 deletions eng/common/internal/Tools.csproj
Expand Up @@ -4,6 +4,7 @@
<PropertyGroup>
<TargetFramework>net472</TargetFramework>
<ImportDirectoryBuildTargets>false</ImportDirectoryBuildTargets>
<AutomaticallyUseReferenceAssemblyPackages>false</AutomaticallyUseReferenceAssemblyPackages>
</PropertyGroup>
<ItemGroup>
<!-- Clear references, the SDK may add some depending on UsuingToolXxx settings, but we only want to restore the following -->
Expand Down
24 changes: 17 additions & 7 deletions eng/common/native/CommonLibrary.psm1
Expand Up @@ -145,9 +145,12 @@ function Get-File {
New-Item -path $DownloadDirectory -force -itemType "Directory" | Out-Null
}

$TempPath = "$Path.tmp"
if (Test-Path -IsValid -Path $Uri) {
Write-Verbose "'$Uri' is a file path, copying file to '$Path'"
Copy-Item -Path $Uri -Destination $Path
Write-Verbose "'$Uri' is a file path, copying temporarily to '$TempPath'"
Copy-Item -Path $Uri -Destination $TempPath
Write-Verbose "Moving temporary file to '$Path'"
Move-Item -Path $TempPath -Destination $Path
return $?
}
else {
Expand All @@ -157,8 +160,10 @@ function Get-File {
while($Attempt -Lt $DownloadRetries)
{
try {
Invoke-WebRequest -UseBasicParsing -Uri $Uri -OutFile $Path
Write-Verbose "Downloaded to '$Path'"
Invoke-WebRequest -UseBasicParsing -Uri $Uri -OutFile $TempPath
Write-Verbose "Downloaded to temporary location '$TempPath'"
Move-Item -Path $TempPath -Destination $Path
Write-Verbose "Moved temporary file to '$Path'"
return $True
}
catch {
Expand Down Expand Up @@ -359,16 +364,21 @@ function Expand-Zip {
return $False
}
}
if (-Not (Test-Path $OutputDirectory)) {
New-Item -path $OutputDirectory -Force -itemType "Directory" | Out-Null

$TempOutputDirectory = Join-Path "$(Split-Path -Parent $OutputDirectory)" "$(Split-Path -Leaf $OutputDirectory).tmp"
if (Test-Path $TempOutputDirectory) {
Remove-Item $TempOutputDirectory -Force -Recurse
}
New-Item -Path $TempOutputDirectory -Force -ItemType "Directory" | Out-Null

Add-Type -assembly "system.io.compression.filesystem"
[io.compression.zipfile]::ExtractToDirectory("$ZipPath", "$OutputDirectory")
[io.compression.zipfile]::ExtractToDirectory("$ZipPath", "$TempOutputDirectory")
if ($? -Eq $False) {
Write-Error "Unable to extract '$ZipPath'"
return $False
}

Move-Item -Path $TempOutputDirectory -Destination $OutputDirectory
}
catch {
Write-Host $_
Expand Down

0 comments on commit 1876dca

Please sign in to comment.