зеркало из https://github.com/dotnet/msbuild.git
Fixing boostrap builds. They fail because the log folder is non-existant.
This commit is contained in:
Родитель
b2aae4c969
Коммит
2dee6b448a
|
@ -239,4 +239,7 @@ Samples/MultiprocessBuild/PortableTask.dll
|
|||
.dotnet/
|
||||
|
||||
# Repo nuget cache
|
||||
.packages/
|
||||
.packages/
|
||||
|
||||
#Stage1 build folder for when doing bootstrap builds
|
||||
stage1/
|
|
@ -11,13 +11,13 @@ phases:
|
|||
- task: BatchScript@1
|
||||
displayName: cibuild.cmd
|
||||
inputs:
|
||||
filename: 'eng/cibuild_msbuild_sln.cmd'
|
||||
filename: 'eng/common/cibuild.cmd'
|
||||
- task: PublishTestResults@2
|
||||
displayName: Publish .NET Framework Test Results
|
||||
inputs:
|
||||
testRunTitle: 'Windows-on-full Full Framework'
|
||||
testRunner: XUnit
|
||||
testResultsFiles: 'artifacts/TestResults/*UnitTests_net472*.xml'
|
||||
testResultsFiles: 'artifacts/TestResults/Debug/*UnitTests_net472*.xml'
|
||||
publishRunAttachments: true
|
||||
mergeTestResults: true
|
||||
condition: always()
|
||||
|
@ -26,7 +26,7 @@ phases:
|
|||
inputs:
|
||||
testRunTitle: 'Windows-on-full .NET Core 2.1'
|
||||
testRunner: XUnit
|
||||
testResultsFiles: 'artifacts/TestResults/*UnitTests_netcoreapp2.1*.xml'
|
||||
testResultsFiles: 'artifacts/TestResults/Debug/*UnitTests_netcoreapp2.1*.xml'
|
||||
publishRunAttachments: true
|
||||
mergeTestResults: true
|
||||
condition: always()
|
||||
|
@ -56,7 +56,7 @@ phases:
|
|||
inputs:
|
||||
testRunTitle: 'Windows-on-full Full Framework'
|
||||
testRunner: XUnit
|
||||
testResultsFiles: 'artifacts/2/TestResults/*UnitTests_net472*.xml'
|
||||
testResultsFiles: 'artifacts/TestResults/Debug/*UnitTests_net472*.xml'
|
||||
publishRunAttachments: true
|
||||
mergeTestResults: true
|
||||
condition: always()
|
||||
|
@ -65,20 +65,20 @@ phases:
|
|||
inputs:
|
||||
testRunTitle: 'Windows-on-full .NET Core 2.1'
|
||||
testRunner: XUnit
|
||||
testResultsFiles: 'artifacts/2/TestResults/*UnitTests_netcoreapp2.1*.xml'
|
||||
testResultsFiles: 'artifacts/TestResults/Debug/*UnitTests_netcoreapp2.1*.xml'
|
||||
publishRunAttachments: true
|
||||
mergeTestResults: true
|
||||
condition: always()
|
||||
- task: PublishBuildArtifacts@1
|
||||
displayName: 'Publish Artifact: logs'
|
||||
inputs:
|
||||
PathtoPublish: 'artifacts/2/log/Debug'
|
||||
PathtoPublish: 'artifacts/log/Debug'
|
||||
ArtifactName: 'FullOnWindows build logs'
|
||||
condition: succeededOrFailed()
|
||||
- task: PublishBuildArtifacts@1
|
||||
displayName: 'Publish Artifact: TestResults'
|
||||
inputs:
|
||||
PathtoPublish: 'artifacts/2/TestResults'
|
||||
PathtoPublish: 'artifacts/TestResults'
|
||||
ArtifactName: 'FullOnWindows test logs'
|
||||
condition: succeededOrFailed()
|
||||
|
||||
|
@ -96,7 +96,7 @@ phases:
|
|||
inputs:
|
||||
testRunTitle: 'Windows-on-full Full Framework'
|
||||
testRunner: XUnit
|
||||
testResultsFiles: 'artifacts/2/TestResults/*UnitTests_net472*.xml'
|
||||
testResultsFiles: 'artifacts/TestResults/Debug/*UnitTests_net472*.xml'
|
||||
publishRunAttachments: true
|
||||
mergeTestResults: true
|
||||
condition: always()
|
||||
|
@ -105,20 +105,20 @@ phases:
|
|||
inputs:
|
||||
testRunTitle: 'Windows-on-full .NET Core 2.1'
|
||||
testRunner: XUnit
|
||||
testResultsFiles: 'artifacts/2/TestResults/*UnitTests_netcoreapp2.1*.xml'
|
||||
testResultsFiles: 'artifacts/TestResults/Debug/*UnitTests_netcoreapp2.1*.xml'
|
||||
publishRunAttachments: true
|
||||
mergeTestResults: true
|
||||
condition: always()
|
||||
- task: PublishBuildArtifacts@1
|
||||
displayName: 'Publish Artifact: logs'
|
||||
inputs:
|
||||
PathtoPublish: 'artifacts/2/log/Debug'
|
||||
PathtoPublish: 'artifacts/log/Debug'
|
||||
ArtifactName: 'FullOnWindows build logs'
|
||||
condition: succeededOrFailed()
|
||||
- task: PublishBuildArtifacts@1
|
||||
displayName: 'Publish Artifact: TestResults'
|
||||
inputs:
|
||||
PathtoPublish: 'artifacts/2/TestResults'
|
||||
PathtoPublish: 'artifacts/TestResults'
|
||||
ArtifactName: 'FullOnWindows test logs'
|
||||
condition: succeededOrFailed()
|
||||
|
||||
|
@ -129,14 +129,14 @@ phases:
|
|||
- task: BatchScript@1
|
||||
displayName: cibuild.cmd
|
||||
inputs:
|
||||
filename: 'eng/cibuild_msbuild_sln.cmd'
|
||||
filename: 'eng/common/cibuild.cmd'
|
||||
arguments: '-configuration Release'
|
||||
- task: PublishTestResults@2
|
||||
displayName: Publish .NET Framework Test Results
|
||||
inputs:
|
||||
testRunTitle: 'Windows-on-full Release Full Framework'
|
||||
testRunner: XUnit
|
||||
testResultsFiles: 'artifacts/TestResults/*UnitTests_net472*.xml'
|
||||
testResultsFiles: 'artifacts/TestResults/Release/*UnitTests_net472*.xml'
|
||||
publishRunAttachments: true
|
||||
mergeTestResults: true
|
||||
condition: always()
|
||||
|
@ -145,7 +145,7 @@ phases:
|
|||
inputs:
|
||||
testRunTitle: 'Windows-on-full Release .NET Core 2.1'
|
||||
testRunner: XUnit
|
||||
testResultsFiles: 'artifacts/TestResults/*UnitTests_netcoreapp2.1*.xml'
|
||||
testResultsFiles: 'artifacts/TestResults/Release/*UnitTests_netcoreapp2.1*.xml'
|
||||
publishRunAttachments: true
|
||||
mergeTestResults: true
|
||||
condition: always()
|
||||
|
@ -175,7 +175,7 @@ phases:
|
|||
# - task: BatchScript@1
|
||||
# displayName: cibuild.cmd
|
||||
# inputs:
|
||||
# filename: 'eng/cibuild_msbuild_sln.cmd'
|
||||
# filename: 'eng/common/cibuild.cmd'
|
||||
# arguments: '-hostType Core'
|
||||
# - task: PublishTestResults@2
|
||||
# displayName: Publish .NET Framework Test Results
|
||||
|
@ -212,14 +212,14 @@ phases:
|
|||
displayName: "Build and test on Linux using .NET Core MSBuild"
|
||||
queue: 'Hosted Ubuntu 1604'
|
||||
steps:
|
||||
- bash: . 'eng/cibuild_msbuild_sln.sh'
|
||||
- bash: . 'eng/common/cibuild.sh'
|
||||
displayName: CI Build
|
||||
- task: PublishTestResults@2
|
||||
displayName: Publish .NET Core 2.1 Test Results
|
||||
inputs:
|
||||
testRunTitle: 'Linux .NET Core 2.1'
|
||||
testRunner: XUnit
|
||||
testResultsFiles: 'artifacts/TestResults/*UnitTests'
|
||||
testResultsFiles: 'artifacts/TestResults/Debug/*UnitTests*.xml'
|
||||
publishRunAttachments: true
|
||||
mergeTestResults: true
|
||||
condition: always()
|
||||
|
@ -247,20 +247,20 @@ phases:
|
|||
inputs:
|
||||
testRunTitle: 'Linux .NET Core 2.1'
|
||||
testRunner: XUnit
|
||||
testResultsFiles: 'artifacts/TestResults/*UnitTests'
|
||||
testResultsFiles: 'artifacts/TestResults/Debug/*UnitTests*.xml'
|
||||
publishRunAttachments: true
|
||||
mergeTestResults: true
|
||||
condition: always()
|
||||
- task: PublishBuildArtifacts@1
|
||||
displayName: 'Publish Artifact: logs'
|
||||
inputs:
|
||||
PathtoPublish: 'artifacts/2/log/Debug'
|
||||
PathtoPublish: 'artifacts/log/Debug'
|
||||
ArtifactName: 'CoreOnLinux build logs'
|
||||
condition: succeededOrFailed()
|
||||
- task: PublishBuildArtifacts@1
|
||||
displayName: 'Publish Artifact: TestResults'
|
||||
inputs:
|
||||
PathtoPublish: 'artifacts/2/TestResults'
|
||||
PathtoPublish: 'artifacts/TestResults'
|
||||
ArtifactName: 'CoreOnLinux test logs'
|
||||
condition: succeededOrFailed()
|
||||
|
||||
|
@ -268,14 +268,14 @@ phases:
|
|||
displayName: "Build and test on macOS using .NET Core MSBuild"
|
||||
queue: 'Hosted macOS'
|
||||
steps:
|
||||
- bash: . 'eng/cibuild_msbuild_sln.sh'
|
||||
- bash: . 'eng/common/cibuild.sh'
|
||||
displayName: CI Build
|
||||
- task: PublishTestResults@2
|
||||
displayName: Publish .NET Core 2.1 Test Results
|
||||
inputs:
|
||||
testRunTitle: 'macOS .NET Core 2.1'
|
||||
testRunner: XUnit
|
||||
testResultsFiles: 'artifacts/TestResults/*UnitTests'
|
||||
testResultsFiles: 'artifacts/TestResults/Debug/*UnitTests*.xml'
|
||||
publishRunAttachments: true
|
||||
mergeTestResults: true
|
||||
condition: always()
|
||||
|
|
|
@ -47,25 +47,21 @@ $RepoRoot = Join-Path $PSScriptRoot "..\"
|
|||
$RepoRoot = [System.IO.Path]::GetFullPath($RepoRoot).TrimEnd($([System.IO.Path]::DirectorySeparatorChar));
|
||||
|
||||
$ArtifactsDir = Join-Path $RepoRoot "artifacts"
|
||||
$ArtifactsBinDir = Join-Path $ArtifactsDir "bin"
|
||||
$LogDir = Join-Path $ArtifactsDir "log\$configuration"
|
||||
$TempDir = Join-Path $ArtifactsDir "tmp\$configuration"
|
||||
|
||||
# $log = -not $nolog
|
||||
# $restore = -not $norestore
|
||||
# $runTests = (-not $skiptests) -or $test
|
||||
$Stage1Dir = Join-Path $RepoRoot "stage1"
|
||||
$Stage1BinDir = Join-Path $Stage1Dir "bin"
|
||||
|
||||
if ($hostType -eq '')
|
||||
{
|
||||
$hostType = 'full'
|
||||
}
|
||||
|
||||
# TODO: If host type is full, either make sure we're running in a developer command prompt, or attempt to locate VS, or fail
|
||||
|
||||
$msbuildToUse = "msbuild"
|
||||
|
||||
try {
|
||||
|
||||
# turning off vbcscompiler.exe because it causes the move-item call below to fail
|
||||
$env:UseSharedCompilation="false"
|
||||
|
||||
KillProcessesFromRepo
|
||||
|
||||
if ($buildStage1)
|
||||
|
@ -73,7 +69,11 @@ try {
|
|||
& $PSScriptRoot\Common\Build.ps1 -restore -build -ci /p:CreateBootstrap=true @properties
|
||||
}
|
||||
|
||||
$bootstrapRoot = Join-Path $ArtifactsBinDir "bootstrap"
|
||||
$bootstrapRoot = Join-Path $Stage1BinDir "bootstrap"
|
||||
|
||||
# we need to do this to guarantee we have/know where dotnet.exe is installed
|
||||
$dotnetToolPath = InitializeDotNetCli $true
|
||||
$dotnetExePath = Join-Path $dotnetToolPath "dotnet.exe"
|
||||
|
||||
if ($hostType -eq 'full')
|
||||
{
|
||||
|
@ -89,18 +89,26 @@ try {
|
|||
}
|
||||
else
|
||||
{
|
||||
# we need to do this to guarantee we have/know where dotnet.exe is installed
|
||||
$dotnetToolPath = InitializeDotNetCli $true
|
||||
$buildToolPath = Join-Path $dotnetToolPath "dotnet.exe"
|
||||
$buildToolPath = $dotnetExePath
|
||||
$buildToolCommand = Join-Path $bootstrapRoot "netcoreapp2.1\MSBuild\MSBuild.dll"
|
||||
}
|
||||
|
||||
# Use separate artifacts folder for stage 2
|
||||
$env:ArtifactsDir = Join-Path $ArtifactsDir "2\"
|
||||
# $env:ArtifactsDir = Join-Path $ArtifactsDir "2\"
|
||||
|
||||
& $dotnetExePath build-server shutdown
|
||||
|
||||
if ($buildStage1)
|
||||
{
|
||||
Move-Item -Path $ArtifactsDir -Destination $Stage1Dir -Force
|
||||
}
|
||||
|
||||
$buildTool = @{ Path = $buildToolPath; Command = $buildToolCommand }
|
||||
$global:_BuildTool = $buildTool
|
||||
|
||||
# turn vbcscompiler back on to save on time. It speeds up the build considerably
|
||||
$env:UseSharedCompilation="true"
|
||||
|
||||
# When using bootstrapped MSBuild:
|
||||
# - Turn off node reuse (so that bootstrapped MSBuild processes don't stay running and lock files)
|
||||
# - Do run tests
|
||||
|
|
|
@ -34,16 +34,14 @@ done
|
|||
|
||||
RepoRoot="$ScriptRoot/.."
|
||||
ArtifactsDir="$RepoRoot/artifacts"
|
||||
ArtifactsBinDir="$ArtifactsDir/bin"
|
||||
LogDir="$ArtifactsDir/log/$configuration"
|
||||
TempDir="$ArtifactsDir/tmp/$configuration"
|
||||
Stage1Dir="$RepoRoot/stage1"
|
||||
|
||||
if [[ $build_stage1 == true ]];
|
||||
then
|
||||
/bin/bash "$ScriptRoot/common/build.sh" --restore --build --ci /p:CreateBootstrap=true $properties
|
||||
fi
|
||||
|
||||
bootstrapRoot="$ArtifactsBinDir/bootstrap"
|
||||
bootstrapRoot="$Stage1Dir/bin/bootstrap"
|
||||
|
||||
if [ $host_type = "core" ]
|
||||
then
|
||||
|
@ -53,8 +51,7 @@ else
|
|||
exit 1
|
||||
fi
|
||||
|
||||
# forcing the slashes here or they get normalized and lost later
|
||||
export ArtifactsDir="$ArtifactsDir\\2\\"
|
||||
mv $ArtifactsDir $Stage1Dir
|
||||
|
||||
# When using bootstrapped MSBuild:
|
||||
# - Turn off node reuse (so that bootstrapped MSBuild processes don't stay running and lock files)
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
@echo off
|
||||
powershell -NoLogo -NoProfile -ExecutionPolicy ByPass -Command "& """%~dp0common\cibuild.cmd""" %*"
|
||||
exit /b %ErrorLevel%
|
|
@ -1,11 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
SOURCE="${BASH_SOURCE[0]}"
|
||||
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
|
||||
ScriptRoot="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
|
||||
SOURCE="$(readlink "$SOURCE")"
|
||||
[[ $SOURCE != /* ]] && SOURCE="$ScriptRoot/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
|
||||
done
|
||||
ScriptRoot="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
|
||||
|
||||
. "$ScriptRoot/common/cibuild.sh" "$@"
|
|
@ -131,7 +131,7 @@
|
|||
</PropertyGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="CreateTypeLib" BeforeTargets="AfterBuild" Condition="'$(BuildingInsideVisualStudio)' != 'true' and '$(CreateTlb)' == 'true' and '$(OsEnvironment)' == 'windows' and '$(TargetFrameworkIdentifier)' == '.NETFramework'">
|
||||
<Target Name="CreateTypeLib" BeforeTargets="AfterBuild" Condition="'$(BuildingInsideVisualStudio)' != 'true' and '$(CreateTlb)' == 'true' and '$(OsEnvironment)' == 'windows' and '$(TargetFrameworkIdentifier)' == '.NETFramework' and '$(MSBuildRuntimeType)' != 'Core'">
|
||||
<!-- Provide a mechanism for turning on verbose TlbExp output for diagnosing issues -->
|
||||
<PropertyGroup>
|
||||
<TlbExpVerbosity Condition="'$(VerboseTlbExp)' == 'true'">/verbose</TlbExpVerbosity>
|
||||
|
|
|
@ -30,6 +30,7 @@ namespace Microsoft.Build.UnitTests
|
|||
|
||||
[Fact]
|
||||
[PlatformSpecific(TestPlatforms.Windows)]
|
||||
[SkipOnTargetFramework(TargetFrameworkMonikers.Netcoreapp, "No Visual Studio install for netcore")]
|
||||
public void TestDesktopMSBuildShouldRunPortableTask()
|
||||
{
|
||||
RunMSBuildOnProjectWithPortableTaskAndAssertOutput(true);
|
||||
|
|
Загрузка…
Ссылка в новой задаче