Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validate CI failure #34298

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from
Draft
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
24 changes: 18 additions & 6 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ jobs:
timeoutInMinutes: 90

steps:
- checkout: self
clean: true
- script: eng/cibuild.cmd -configuration $(_configuration) -prepareMachine -testDesktop -$(_testKind) -procdump
displayName: Build and Test

Expand All @@ -66,7 +68,7 @@ jobs:
ArtifactName: 'Windows Desktop $(_configuration) $(_testKind)'
publishLocation: Container
continueOnError: true
condition: not(succeeded())
condition: always()

- job: Windows_Desktop_Spanish_Unit_Tests
pool:
Expand All @@ -75,6 +77,8 @@ jobs:
timeoutInMinutes: 90

steps:
- checkout: self
clean: true
- script: eng/cibuild.cmd -configuration Debug -prepareMachine -testDesktop
displayName: Build and Test

Expand All @@ -93,7 +97,7 @@ jobs:
ArtifactName: 'Windows Desktop Spanish'
publishLocation: Container
continueOnError: true
condition: not(succeeded())
condition: always()

- job: Windows_CoreClr_Unit_Tests
pool:
Expand All @@ -109,6 +113,8 @@ jobs:
timeoutInMinutes: 90

steps:
- checkout: self
clean: true
- script: eng/cibuild.cmd -configuration $(_configuration) -prepareMachine -msbuildEngine:dotnet -testCoreClr
displayName: Build and Test

Expand All @@ -128,14 +134,16 @@ jobs:
ArtifactName: 'Windows CoreClr $(_configuration)'
publishLocation: Container
continueOnError: true
condition: not(succeeded())
condition: always()

- job: Windows_Determinism_Test
pool:
name: NetCorePublic-Pool
queue: BuildPool.Windows.10.Amd64.VS2017.Open
timeoutInMinutes: 90
steps:
- checkout: self
clean: true
- script: eng/test-determinism.cmd -configuration Debug
displayName: Build - Validate determinism

Expand All @@ -146,14 +154,16 @@ jobs:
ArtifactName: 'Build Determinism Files'
publishLocation: Container
continueOnError: true
condition: not(succeeded())
condition: always()

- job: Windows_Correctness_Test
pool:
name: NetCorePublic-Pool
queue: BuildPool.Windows.10.Amd64.VS2017.Open
timeoutInMinutes: 90
steps:
- checkout: self
clean: true
- script: eng/test-build-correctness.cmd -configuration Release
displayName: Build - Validate correctness

Expand All @@ -164,7 +174,7 @@ jobs:
ArtifactName: 'Build Correctness Files'
publishLocation: Container
continueOnError: true
condition: not(succeeded())
condition: always()

- task: PublishBuildArtifacts@1
displayName: Publish Artifact Packages
Expand Down Expand Up @@ -199,6 +209,8 @@ jobs:
_configuration: Debug
timeoutInMinutes: 90
steps:
- checkout: self
clean: true
- script: ./eng/cibuild.sh --configuration $(_configuration) --prepareMachine $(_args)
displayName: Build and Test
- task: PublishTestResults@2
Expand All @@ -217,7 +229,7 @@ jobs:
ArtifactName: 'Linux $(_name)'
publishLocation: Container
continueOnError: true
condition: not(succeeded())
condition: always()

- job: macOS_Test
pool:
Expand Down
4 changes: 3 additions & 1 deletion eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
-->
<PropertyGroup>
<!-- Versions used by several individual references below -->
<MicrosoftNetCoreAppVersion>2.1.7</MicrosoftNetCoreAppVersion>
<RoslynDiagnosticsNugetPackageVersion>2.6.2-beta2</RoslynDiagnosticsNugetPackageVersion>
<CodeStyleLayerCodeAnalysisVersion>2.8.2</CodeStyleLayerCodeAnalysisVersion>
<MicrosoftCodeAnalysisTestingVersion>1.0.0-beta1-63310-01</MicrosoftCodeAnalysisTestingVersion>
Expand Down Expand Up @@ -274,14 +275,15 @@
<PrivateVisualStudioPackage Include="VSLangProj140" />
<PrivateVisualStudioPackage Include="VsWebsite.Interop" />
</ItemGroup>

<PropertyGroup>
<UsingToolPdbConverter>true</UsingToolPdbConverter>
<UsingToolSymbolUploader>true</UsingToolSymbolUploader>
<UsingToolNuGetRepack>true</UsingToolNuGetRepack>
<UsingToolVSSDK>true</UsingToolVSSDK>
<UsingToolNetFrameworkReferenceAssemblies>true</UsingToolNetFrameworkReferenceAssemblies>
<UsingToolIbcOptimization>true</UsingToolIbcOptimization>
<UsingToolVisualStudioIbcTraining>true</UsingToolVisualStudioIbcTraining>
<UsingToolVisualStudioIbcTraining>false</UsingToolVisualStudioIbcTraining>
<UsingToolXliff>true</UsingToolXliff>
<UsingToolXUnit>true</UsingToolXUnit>
<!--
Expand Down
4 changes: 0 additions & 4 deletions eng/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -583,10 +583,6 @@ try {

$global:_DotNetInstallDir = Join-Path $RepoRoot ".dotnet"
InstallDotNetSdk $global:_DotNetInstallDir $GlobalJson.tools.dotnet

# Make sure a 2.1 runtime is installed so we can run our tests. Most of them still
# target netcoreapp2.1.
InstallDotNetSdk $global:_DotNetInstallDir "2.1.503"
}

if ($bootstrap) {
Expand Down
5 changes: 1 addition & 4 deletions eng/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ function BuildSolution {

InitializeToolset
local toolset_build_proj=$_InitializeToolset

local bl=""
if [[ "$binary_log" = true ]]; then
bl="/bl:\"$log_dir/Build.binlog\""
Expand Down Expand Up @@ -280,9 +280,6 @@ function BuildSolution {

InitializeDotNetCli $restore

# Make sure we have a 2.1 runtime available for running our tests
InstallDotNetSdk $_InitializeDotNetCli 2.1.503

bootstrap_dir=""
if [[ "$bootstrap" == true ]]; then
MakeBootstrapBuild
Expand Down
4 changes: 4 additions & 0 deletions eng/common/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,10 @@ try {
. $configureToolsetScript
}

if (($restore) -and ($null -eq $env:DisableNativeToolsetInstalls)) {
InitializeNativeTools
}

Build
}
catch {
Expand Down
4 changes: 4 additions & 0 deletions eng/common/build.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -218,4 +218,8 @@ if [[ -n "${useInstalledDotNetCli:-}" ]]; then
use_installed_dotnet_cli="$useInstalledDotNetCli"
fi

if [[ "$restore" == true && -z ${DisableNativeToolsetInstalls:-} ]]; then
InitializeNativeTools
fi

Build
Empty file modified eng/common/cibuild.sh
100644 → 100755
Empty file.
Empty file modified eng/common/darc-init.sh
100644 → 100755
Empty file.
2 changes: 2 additions & 0 deletions eng/common/dotnet-install.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@echo off
powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0dotnet-install.ps1""" %*"
22 changes: 22 additions & 0 deletions eng/common/dotnet-install.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[CmdletBinding(PositionalBinding=$false)]
Param(
[string] $verbosity = "minimal",
[string] $architecture = "",
[string] $version = "Latest",
[string] $runtime = "dotnet"
)

. $PSScriptRoot\tools.ps1

try {
$dotnetRoot = Join-Path $RepoRoot ".dotnet"
InstallDotNet $dotnetRoot $version $architecture $runtime $true
}
catch {
Write-Host $_
Write-Host $_.Exception
Write-Host $_.ScriptStackTrace
ExitWithExitCode 1
}

ExitWithExitCode 0
49 changes: 49 additions & 0 deletions eng/common/dotnet-install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
#!/usr/bin/env bash

source="${BASH_SOURCE[0]}"
# resolve $source until the file is no longer a symlink
while [[ -h "$source" ]]; do
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
source="$(readlink "$source")"
# if $source was a relative symlink, we need to resolve it relative to the path where the
# symlink file was located
[[ $source != /* ]] && source="$scriptroot/$source"
done
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"

version='Latest'
architecture=''
runtime='dotnet'
while [[ $# > 0 ]]; do
opt="$(echo "$1" | awk '{print tolower($0)}')"
case "$opt" in
-version|-v)
shift
version="$1"
;;
-architecture|-a)
shift
architecture="$1"
;;
-runtime|-r)
shift
runtime="$1"
;;
*)
echo "Invalid argument: $1"
usage
exit 1
;;
esac
shift
done

. "$scriptroot/tools.sh"
dotnetRoot="$repo_root/.dotnet"
InstallDotNet $dotnetRoot $version "$architecture" $runtime true || {
local exit_code=$?
echo "dotnet-install.sh failed (exit code '$exit_code')." >&2
ExitWithExitCode $exit_code
}

ExitWithExitCode 0
6 changes: 5 additions & 1 deletion eng/common/init-tools-native.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,13 @@ Param (
[switch] $Force = $False,
[int] $DownloadRetries = 5,
[int] $RetryWaitTimeInSeconds = 30,
[string] $GlobalJsonFile = "$PSScriptRoot\..\..\global.json"
[string] $GlobalJsonFile
)

if (!$GlobalJsonFile) {
$GlobalJsonFile = Join-Path (Get-Item $PSScriptRoot).Parent.Parent.FullName "global.json"
}

Set-StrictMode -version 2.0
$ErrorActionPreference="Stop"

Expand Down
12 changes: 4 additions & 8 deletions eng/common/init-tools-native.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ clean=false
force=false
download_retries=5
retry_wait_time_seconds=30
global_json_file="${scriptroot}/../../global.json"
global_json_file="$(dirname "$(dirname "${scriptroot}")")/global.json"
declare -A native_assets

. $scriptroot/native/common-library.sh
Expand Down Expand Up @@ -71,6 +71,7 @@ function ReadGlobalJsonNativeTools {
local native_tools_list=$(echo $native_tools_section | awk -F"[{}]" '{print $2}')
native_tools_list=${native_tools_list//[\" ]/}
native_tools_list=${native_tools_list//,/$'\n'}
native_tools_list="$(echo -e "${native_tools_list}" | tr -d '[:space:]')"

local old_IFS=$IFS
while read -r line; do
Expand Down Expand Up @@ -116,8 +117,6 @@ else
installer_command+=" --clean"
fi

echo "Installing $tool version $tool_version"
echo "Executing '$installer_command'"
$installer_command

if [[ $? != 0 ]]; then
Expand All @@ -127,19 +126,16 @@ else
done
fi

if [[ ! -z $clean ]]; then
if [[ $clean = true ]]; then
exit 0
fi

if [[ -d $install_bin ]]; then
echo "Native tools are available from $install_bin"
if [[ !-z BUILD_BUILDNUMBER ]]; then
echo "##vso[task.prependpath]$install_bin"
fi
echo "##vso[task.prependpath]$install_bin"
else
echo "Native tools install directory does not exist, installation failed" >&2
exit 1
fi

exit 0

Empty file modified eng/common/msbuild.sh
100644 → 100755
Empty file.
Loading