Dependent builds, publishing and packaging (#65)

Restore Microsoft.DotNet.BuildTools to generate the
native build _version.h/version.cpp.

Generate proper version header and source file for
native binaries. Issue https://github.com/dotnet/diagnostics/issues/19.
This commit is contained in:
Mike McLaughlin 2018-08-24 16:56:12 -07:00 коммит произвёл GitHub
Родитель c6779d1a49
Коммит 33982daaae
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
37 изменённых файлов: 1121 добавлений и 558 удалений

Просмотреть файл

@ -3,7 +3,6 @@ phases:
parameters:
phaseName: Windows
agentOs: Windows_NT
buildReason: IndividualCI
queue:
name: Hosted VS2017
demands:
@ -13,19 +12,14 @@ phases:
Build_Debug:
_BuildConfig: Debug
_BuildArch: x64
_PublishType: none
_SignType: test
Build_Release:
_BuildConfig: Release
_BuildArch: x64
_PublishType: none
_SignType: test
- template: /eng/build.yml
parameters:
phaseName: CentOS_7
agentOs: Linux
buildReason: IndividualCI
dockerImage: microsoft/dotnet-buildtools-prereqs:centos-7-c103199-20180628120549
queue:
name: DotNetCore-Linux
@ -36,19 +30,14 @@ phases:
Build_Debug:
_BuildConfig: Debug
_BuildArch: x64
_PublishType: none
_SignType: test
Build_Release:
_BuildConfig: Release
_BuildArch: x64
_PublishType: none
_SignType: test
- template: /eng/build.yml
parameters:
phaseName: MacOS
agentOs: Darwin
buildReason: IndividualCI
queue:
name: Hosted macOS Preview
demands:
@ -58,11 +47,7 @@ phases:
Build_Debug:
_BuildConfig: Debug
_BuildArch: x64
_PublishType: none
_SignType: test
Build_Release:
_BuildConfig: Release
_BuildArch: x64
_PublishType: none
_SignType: test

Просмотреть файл

@ -1,9 +1,30 @@
phases:
- template: /eng/build.yml
parameters:
phaseName: Windows
agentOs: Windows_NT
queue:
name: DotNetCore-Build
demands:
- agent.os -equals Windows_NT
parallel: 3
matrix:
Build_Debug:
_BuildConfig: Debug
_BuildArch: x64
Build_Release:
_BuildConfig: Release
_BuildArch: x64
_PublishArtifacts: bin
Build_Release_x86:
_BuildConfig: Release
_BuildArch: x86
_PublishArtifacts: bin/Windows_NT.x86
- template: /eng/build.yml
parameters:
phaseName: CentOS_7
agentOs: Linux
buildReason: Internal
dockerImage: microsoft/dotnet-buildtools-prereqs:centos-7-c103199-20180628120549
queue:
name: DotNet-Build
@ -14,189 +35,16 @@ phases:
Build_Debug:
_BuildConfig: Debug
_BuildArch: x64
_PublishType: none
_SignType: test
_PublishArtifacts: bin/Linux.x64
Build_Release:
_BuildConfig: Release
_BuildArch: x64
_PublishType: none
_SignType: real
- template: /eng/build.yml
parameters:
phaseName: Debian_Stretch
agentOs: Linux
buildReason: Internal
dockerImage: microsoft/dotnet-buildtools-prereqs:debian-stretch-c103199-20180628122423
queue:
name: DotNet-Build
demands:
- agent.os -equals Linux
matrix:
Build_Debug:
_BuildConfig: Debug
_BuildArch: x64
_PublishType: none
_SignType: test
- template: /eng/build.yml
parameters:
phaseName: Fedora_24
agentOs: Linux
buildReason: Internal
dockerImage: microsoft/dotnet-buildtools-prereqs:fedora-24-c103199-20180628122443
queue:
name: DotNet-Build
demands:
- agent.os -equals Linux
matrix:
Build_Debug:
_BuildConfig: Debug
_BuildArch: x64
_PublishType: none
_SignType: test
- template: /eng/build.yml
parameters:
phaseName: Fedora_27
agentOs: Linux
buildReason: Internal
dockerImage: microsoft/dotnet-buildtools-prereqs:fedora-27-c103199-20180628122443
queue:
name: DotNet-Build
demands:
- agent.os -equals Linux
matrix:
Build_Debug:
_BuildConfig: Debug
_BuildArch: x64
_PublishType: none
_SignType: test
- template: /eng/build.yml
parameters:
phaseName: Fedora_28
agentOs: Linux
buildReason: Internal
dockerImage: microsoft/dotnet-buildtools-prereqs:fedora-28-c103199-20180628122443
queue:
name: DotNet-Build
demands:
- agent.os -equals Linux
matrix:
Build_Debug:
_BuildConfig: Debug
_BuildArch: x64
_PublishType: none
_SignType: test
- template: /eng/build.yml
parameters:
phaseName: OpenSuse_42_1
agentOs: Linux
buildReason: Internal
dockerImage: microsoft/dotnet-buildtools-prereqs:opensuse-42.1-c103199-20180628122439
queue:
name: DotNet-Build
demands:
- agent.os -equals Linux
matrix:
Build_Debug:
_BuildConfig: Debug
_BuildArch: x64
_PublishType: none
_SignType: real
- template: /eng/build.yml
parameters:
phaseName: OpenSuse_42_3
agentOs: Linux
buildReason: Internal
dockerImage: microsoft/dotnet-buildtools-prereqs:opensuse-42.3-c103199-20180628122439
queue:
name: DotNet-Build
demands:
- agent.os -equals Linux
matrix:
Build_Debug:
_BuildConfig: Debug
_BuildArch: x64
_PublishType: none
_SignType: test
- template: /eng/build.yml
parameters:
phaseName: Ubuntu_14_04
agentOs: Linux
buildReason: Internal
dockerImage: microsoft/dotnet-buildtools-prereqs:ubuntu-14.04-c103199-20180628134413
queue:
name: DotNet-Build
demands:
- agent.os -equals Linux
matrix:
Build_Debug:
_BuildConfig: Debug
_BuildArch: x64
_PublishType: none
_SignType: test
- template: /eng/build.yml
parameters:
phaseName: Ubuntu_16_04
agentOs: Linux
buildReason: Internal
dockerImage: microsoft/dotnet-buildtools-prereqs:ubuntu-16.04-c103199-20180628134544
queue:
name: DotNet-Build
demands:
- agent.os -equals Linux
matrix:
Build_Debug:
_BuildConfig: Debug
_BuildArch: x64
_PublishType: none
_SignType: test
- template: /eng/build.yml
parameters:
phaseName: Ubuntu_17_10
agentOs: Linux
buildReason: Internal
dockerImage: microsoft/dotnet-buildtools-prereqs:ubuntu-17.10-c103199-20180628134544
queue:
name: DotNet-Build
demands:
- agent.os -equals Linux
matrix:
Build_Debug:
_BuildConfig: Debug
_BuildArch: x64
_PublishType: none
_SignType: test
- template: /eng/build.yml
parameters:
phaseName: Ubuntu_18_04
agentOs: Linux
buildReason: Internal
dockerImage: microsoft/dotnet-buildtools-prereqs:ubuntu-18.04-c103199-20180628134610
queue:
name: DotNet-Build
demands:
- agent.os -equals Linux
matrix:
Build_Debug:
_BuildConfig: Debug
_BuildArch: x64
_PublishType: none
_SignType: test
_PublishArtifacts: bin/Linux.x64
- template: /eng/build.yml
parameters:
phaseName: MacOS
agentOs: Darwin
buildReason: Internal
queue:
name: Hosted macOS Preview
demands:
@ -206,38 +54,397 @@ phases:
Build_Debug:
_BuildConfig: Debug
_BuildArch: x64
_PublishType: none
_SignType: test
Build_Release:
_BuildConfig: Release
_BuildArch: x64
_PublishType: none
_SignType: real
_PublishArtifacts: bin/OSX.x64
- template: /eng/build.yml
parameters:
phaseName: Windows
agentOs: Windows_NT
buildReason: Internal
queue:
name: DotNetCore-Build
phaseName: Debian_Stretch
agentOs: Linux
dockerImage: microsoft/dotnet-buildtools-prereqs:debian-stretch-c103199-20180628122423
dependsOn: CentOS_7
testOnly: true
queue:
name: DotNet-Build
demands:
- agent.os -equals Windows_NT
parallel: 3
- agent.os -equals Linux
matrix:
Build_Debug:
_BuildConfig: Debug
_BuildArch: x64
_PublishType: none
_SignType: test
Build_Release:
_BuildConfig: Release
_BuildArch: x64
_PublishType: none
_SignType: real
Build_Release_x86:
_BuildConfig: Release
_BuildArch: x86
_PublishType: none
_SignType: real
- template: /eng/build.yml
parameters:
phaseName: Fedora_27
agentOs: Linux
dockerImage: microsoft/dotnet-buildtools-prereqs:fedora-27-c103199-20180628122443
dependsOn: CentOS_7
testOnly: true
queue:
name: DotNet-Build
demands:
- agent.os -equals Linux
matrix:
Build_Debug:
_BuildConfig: Debug
_BuildArch: x64
- template: /eng/build.yml
parameters:
phaseName: Fedora_28
agentOs: Linux
dockerImage: microsoft/dotnet-buildtools-prereqs:fedora-28-c103199-20180628122443
dependsOn: CentOS_7
testOnly: true
queue:
name: DotNet-Build
demands:
- agent.os -equals Linux
matrix:
Build_Debug:
_BuildConfig: Debug
_BuildArch: x64
- template: /eng/build.yml
parameters:
phaseName: OpenSuse_42_1
agentOs: Linux
dockerImage: microsoft/dotnet-buildtools-prereqs:opensuse-42.1-c103199-20180628122439
dependsOn: CentOS_7
testOnly: true
queue:
name: DotNet-Build
demands:
- agent.os -equals Linux
matrix:
Build_Debug:
_BuildConfig: Debug
_BuildArch: x64
- template: /eng/build.yml
parameters:
phaseName: OpenSuse_42_3
agentOs: Linux
dockerImage: microsoft/dotnet-buildtools-prereqs:opensuse-42.3-c103199-20180628122439
dependsOn: CentOS_7
testOnly: true
queue:
name: DotNet-Build
demands:
- agent.os -equals Linux
matrix:
Build_Debug:
_BuildConfig: Debug
_BuildArch: x64
- template: /eng/build.yml
parameters:
phaseName: Ubuntu_14_04
agentOs: Linux
dockerImage: microsoft/dotnet-buildtools-prereqs:ubuntu-14.04-c103199-20180628134413
dependsOn: CentOS_7
testOnly: true
queue:
name: DotNet-Build
demands:
- agent.os -equals Linux
matrix:
Build_Debug:
_BuildConfig: Debug
_BuildArch: x64
- template: /eng/build.yml
parameters:
phaseName: Ubuntu_16_04
agentOs: Linux
dockerImage: microsoft/dotnet-buildtools-prereqs:ubuntu-16.04-c103199-20180628134544
dependsOn: CentOS_7
testOnly: true
queue:
name: DotNet-Build
demands:
- agent.os -equals Linux
matrix:
Build_Debug:
_BuildConfig: Debug
_BuildArch: x64
- template: /eng/build.yml
parameters:
phaseName: Ubuntu_17_10
agentOs: Linux
dockerImage: microsoft/dotnet-buildtools-prereqs:ubuntu-17.10-c103199-20180628134544
dependsOn: CentOS_7
testOnly: true
queue:
name: DotNet-Build
demands:
- agent.os -equals Linux
matrix:
Build_Debug:
_BuildConfig: Debug
_BuildArch: x64
- template: /eng/build.yml
parameters:
phaseName: Ubuntu_18_04
agentOs: Linux
dockerImage: microsoft/dotnet-buildtools-prereqs:ubuntu-18.04-c103199-20180628134610
dependsOn: CentOS_7
testOnly: true
queue:
name: DotNet-Build
demands:
- agent.os -equals Linux
matrix:
Build_Debug:
_BuildConfig: Debug
_BuildArch: x64
- phase: Sign_Package_Publish
dependsOn:
- Windows
- CentOS_7
- MacOS
queue:
name: DotNetCore-Build
demands:
- agent.os -equals Windows_NT
steps:
- task: ms-vseng.MicroBuildTasks.30666190-6959-11e5-9f96-f56098202fef.MicroBuildSigningPlugin@1
displayName: Install MicroBuild plugin
inputs:
signType: real
zipSources: false
esrpSigning: true
env:
TeamName: DotNetCore
continueOnError: false
condition: succeeded()
- task: AzureKeyVault@1
inputs:
azureSubscription: 'DotNet-Engineering-Services_KeyVault'
KeyVaultName: EngKeyVault
SecretsFilter: 'dotnetfeed-storage-access-key-1'
condition: succeeded()
# Windows x64 download, copy and archive. Everything under "bin" is published for the Windows x64 build.
- task: DownloadBuildArtifacts@0
displayName: Download Windows x64 and Managed Artifacts
inputs:
artifactName: Windows_Build_Release
downloadPath: '$(System.ArtifactsDirectory)'
condition: succeeded()
- task: CopyFiles@2
displayName: Copy Windows Artifacts
inputs:
sourceFolder: '$(System.ArtifactsDirectory)/Windows_Build_Release'
targetFolder: '$(Build.SourcesDirectory)/artifacts/Release/bin'
condition: succeeded()
- task: ArchiveFiles@2
displayName: Archive Windows x64 Artifacts
inputs:
archiveType: zip
includeRootFolder: false
rootFolderOrFile: '$(Build.SourcesDirectory)/artifacts/Release/bin/Windows_NT.x64'
archiveFile: '$(Build.SourcesDirectory)/artifacts/Release/sos-win-x64.zip'
condition: succeeded()
# Windows x86 download, copy and archive.
- task: DownloadBuildArtifacts@0
displayName: Download Windows x86 Artifacts
inputs:
artifactName: Windows_Build_Release_x86
downloadPath: '$(System.ArtifactsDirectory)'
condition: succeeded()
- task: CopyFiles@2
displayName: Copy Windows x86 Artifacts
inputs:
sourceFolder: '$(System.ArtifactsDirectory)/Windows_Build_Release_x86'
targetFolder: '$(Build.SourcesDirectory)/artifacts/Release/bin/Windows_NT.x86'
condition: succeeded()
- task: CopyFiles@2
displayName: Copy Windows x86 Artifacts
inputs:
sourceFolder: '$(Build.SourcesDirectory)/artifacts/Release/bin/SOS.NETCore/netcoreapp1.0'
contents: 'SOS.NETCore.dll'
overWrite: true
targetFolder: '$(Build.SourcesDirectory)/artifacts/Release/bin/Windows_NT.x86'
condition: succeeded()
- task: ArchiveFiles@2
displayName: Archive Windows x86 Artifacts
inputs:
archiveType: zip
includeRootFolder: false
rootFolderOrFile: '$(Build.SourcesDirectory)/artifacts/Release/bin/Windows_NT.x86'
archiveFile: '$(Build.SourcesDirectory)/artifacts/Release/sos-win-x86.zip'
condition: succeeded()
# Copy and archive the files for windbg extension gallery.
- task: CopyFiles@2
displayName: Copy Extension Gallery Files
inputs:
sourceFolder: '$(Build.SourcesDirectory)/artifacts/Release/bin/Windows_NT.x64'
contents: 'sos.dll'
targetFolder: '$(Build.SourcesDirectory)/artifacts/Release/gallery/x64'
condition: succeeded()
- task: CopyFiles@2
displayName: Copy Extension Gallery Files
inputs:
sourceFolder: '$(Build.SourcesDirectory)/artifacts/Release/bin/SOS.NETCore/netcoreapp1.0'
contents: 'SOS.NETCore.dll'
overWrite: true
targetFolder: '$(Build.SourcesDirectory)/artifacts/Release/gallery/x64'
condition: succeeded()
- task: CopyFiles@2
displayName: Copy Extension Gallery Files
inputs:
sourceFolder: '$(Build.SourcesDirectory)/artifacts/Release/bin/Windows_NT.x86'
contents: 'sos.dll'
targetFolder: '$(Build.SourcesDirectory)/artifacts/Release/gallery/x86'
condition: succeeded()
- task: CopyFiles@2
displayName: Copy Extension Gallery Files
inputs:
sourceFolder: '$(Build.SourcesDirectory)/artifacts/Release/bin/SOS.NETCore/netcoreapp1.0'
contents: 'SOS.NETCore.dll'
overWrite: true
targetFolder: '$(Build.SourcesDirectory)/artifacts/Release/gallery/x86'
condition: succeeded()
- task: CopyFiles@2
displayName: Copy Extension Gallery Files
inputs:
sourceFolder: '$(Build.SourcesDirectory)/eng'
contents: 'GalleryManifest.xml'
targetFolder: '$(Build.SourcesDirectory)/artifacts/Release/gallery'
condition: succeeded()
- task: ArchiveFiles@2
displayName: Archive Extension Gallery Files
inputs:
archiveType: zip
includeRootFolder: false
rootFolderOrFile: '$(Build.SourcesDirectory)/artifacts/Release/gallery'
archiveFile: '$(Build.SourcesDirectory)/artifacts/Release/sos-gallery.zip'
condition: succeeded()
# Linux download, copy and archive
- task: DownloadBuildArtifacts@0
displayName: Download Linux Artifacts
inputs:
artifactName: CentOS_7_Build_Release
downloadPath: '$(System.ArtifactsDirectory)'
condition: succeeded()
- task: CopyFiles@2
displayName: Copy Linux Artifacts
inputs:
sourceFolder: '$(System.ArtifactsDirectory)/CentOS_7_Build_Release'
targetFolder: '$(Build.SourcesDirectory)/artifacts/Release/bin/Linux.x64'
condition: succeeded()
- task: CopyFiles@2
displayName: Copy Linux Artifacts
inputs:
sourceFolder: '$(Build.SourcesDirectory)/artifacts/Release/bin/SOS.NETCore/netcoreapp1.0'
contents: 'SOS.NETCore.dll'
overWrite: true
targetFolder: '$(Build.SourcesDirectory)/artifacts/Release/bin/Linux.x64'
condition: succeeded()
- task: ArchiveFiles@2
displayName: Archive Linux Artifacts
inputs:
archiveType: tar
includeRootFolder: false
tarCompression: gz
rootFolderOrFile: '$(Build.SourcesDirectory)/artifacts/Release/bin/Linux.x64'
archiveFile: '$(Build.SourcesDirectory)/artifacts/Release/sos-linux-x64.tar.gz'
condition: succeeded()
# MacOS download, copy and archive
- task: DownloadBuildArtifacts@0
displayName: Download MacOS Artifacts
inputs:
artifactName: MacOS_Build_Release
downloadPath: '$(System.ArtifactsDirectory)'
condition: succeeded()
- task: CopyFiles@2
displayName: Copy MacOS Artifacts
inputs:
sourceFolder: '$(System.ArtifactsDirectory)/MacOS_Build_Release'
targetFolder: '$(Build.SourcesDirectory)/artifacts/Release/bin/OSX.x64'
condition: succeeded()
- task: CopyFiles@2
displayName: Copy MacOS Artifacts
inputs:
sourceFolder: '$(Build.SourcesDirectory)/artifacts/Release/bin/SOS.NETCore/netcoreapp1.0'
contents: 'SOS.NETCore.dll'
overWrite: true
targetFolder: '$(Build.SourcesDirectory)/artifacts/Release/bin/OSX.x64'
condition: succeeded()
- task: ArchiveFiles@2
displayName: Archive MacOS Artifacts
inputs:
archiveType: tar
includeRootFolder: false
tarCompression: gz
rootFolderOrFile: '$(Build.SourcesDirectory)/artifacts/Release/bin/OSX.x64'
archiveFile: '$(Build.SourcesDirectory)/artifacts/Release/sos-osx-x64.tar.gz'
condition: succeeded()
# Create nuget package and sign binaries
- script: $(Build.SourcesDirectory)\eng\cipack.cmd
-configuration Release
-prepareMachine
/p:SignType=$(SignType)
/p:PB_PublishBlobFeedKey=$(dotnetfeed-storage-access-key-1)
/p:PB_PublishBlobFeedUrl=https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json
/p:PB_PublishType=$(PublishType)
displayName: Sign / Package
env:
OfficialBuildId: $(BUILD.BUILDNUMBER)
continueOnError: true
condition: succeeded()
# Optionally drop the artifacts on a share
- task: PublishBuildArtifacts@1
displayName: Drop Artifacts
inputs:
publishLocation: FilePath
pathtoPublish: '$(Build.SourcesDirectory)\artifacts\Release'
artifactName: '$(Build.BuildNumber)'
targetPath: '$(DropRoot)\DotNetCore\$(Build.DefinitionName)'
condition: and(succeeded(), eq(variables['DropArtifacts'], 'true'))
# Optionally publish the packages to a myget feed
- task: NuGetCommand@2
displayName: Publish TestHelpers to MyGet dotnet-buildtools feed
inputs:
command: custom
arguments: 'push $(Build.SourcesDirectory)\artifacts\Release\packages\Shipping\Microsoft.Diagnostic.TestHelpers.*.nupkg -ApiKey $(dotnet-myget-org-api-key) -Source $(MyGetBuildToolsFeed)'
condition: and(succeeded(), eq(variables['PushPackages'], 'true'))

Просмотреть файл

@ -1,3 +1,3 @@
@echo off
call %~dp0eng\Build.cmd -restore -build %*
call %~dp0eng\Build.cmd -restore -build -build-native %*
exit /b %ErrorLevel%

Просмотреть файл

@ -20,7 +20,14 @@ if (WIN32)
endif (WIN32)
set(ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR})
#set(VERSION_FILE_PATH "${CMAKE_BINARY_DIR}/version.cpp")
# Where the version source file for xplat is generated
set(VERSION_FILE_PATH "${CMAKE_BINARY_DIR}/version.cpp")
# Where _version.h for Windows is generated
if (WIN32)
include_directories("${CMAKE_BINARY_DIR}")
endif (WIN32)
set(CORECLR_SET_RPATH ON)
if(CORECLR_SET_RPATH)

Просмотреть файл

@ -13,4 +13,4 @@ while [[ -h $source ]]; do
done
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
"$scriptroot/eng/build.sh" --restore --build $@
"$scriptroot/eng/build.sh" --restore --build --build-native $@

Просмотреть файл

@ -13,6 +13,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SOS", "SOS", "{41638A4C-0DA
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SOS.UnitTests", "src\SOS\SOS.UnitTests\SOS.UnitTests.csproj", "{1532DB3C-7DCD-45C6-B697-62B8378A16A2}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BuildTools", "eng\BuildTools.csproj", "{32F02701-A0CD-48DD-BC34-536251B90461}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -71,6 +73,18 @@ Global
{1532DB3C-7DCD-45C6-B697-62B8378A16A2}.Release|x64.Build.0 = Release|Any CPU
{1532DB3C-7DCD-45C6-B697-62B8378A16A2}.Release|x86.ActiveCfg = Release|Any CPU
{1532DB3C-7DCD-45C6-B697-62B8378A16A2}.Release|x86.Build.0 = Release|Any CPU
{32F02701-A0CD-48DD-BC34-536251B90461}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{32F02701-A0CD-48DD-BC34-536251B90461}.Debug|Any CPU.Build.0 = Debug|Any CPU
{32F02701-A0CD-48DD-BC34-536251B90461}.Debug|x64.ActiveCfg = Debug|Any CPU
{32F02701-A0CD-48DD-BC34-536251B90461}.Debug|x64.Build.0 = Debug|Any CPU
{32F02701-A0CD-48DD-BC34-536251B90461}.Debug|x86.ActiveCfg = Debug|Any CPU
{32F02701-A0CD-48DD-BC34-536251B90461}.Debug|x86.Build.0 = Debug|Any CPU
{32F02701-A0CD-48DD-BC34-536251B90461}.Release|Any CPU.ActiveCfg = Release|Any CPU
{32F02701-A0CD-48DD-BC34-536251B90461}.Release|Any CPU.Build.0 = Release|Any CPU
{32F02701-A0CD-48DD-BC34-536251B90461}.Release|x64.ActiveCfg = Release|Any CPU
{32F02701-A0CD-48DD-BC34-536251B90461}.Release|x64.Build.0 = Release|Any CPU
{32F02701-A0CD-48DD-BC34-536251B90461}.Release|x86.ActiveCfg = Release|Any CPU
{32F02701-A0CD-48DD-BC34-536251B90461}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

Просмотреть файл

@ -72,7 +72,7 @@ if /i "%1" == "-h" goto Usage
if /i "%1" == "-help" goto Usage
if /i "%1" == "--help" goto Usage
if /i "%1" == "-build" (set __Build=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
if /i "%1" == "-build-native" (set __Build=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
if /i "%1" == "-test" (set __Test=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
if /i "%1" == "-configuration" (set __BuildType=%2&set processedArgs=!processedArgs! %1 %2&shift&shift&goto Arg_Loop)
if /i "%1" == "-architecture" (set __BuildArch=%2&set processedArgs=!processedArgs! %1 %2&shift&shift&goto Arg_Loop)
@ -81,6 +81,7 @@ if /i "%1" == "-verbosity" (set __Verbosity=%2&set processedArgs=!proc
if /i "%1" == "-ci" (set __TestArgs=!__TestArgs! %1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
if /i "%1" == "-solution" (set __TestArgs=!__TestArgs! %1 %2&set processedArgs=!processedArgs! %1&shift&shift&goto Arg_Loop)
:: These options are ignored for a native build
if /i "%1" == "-build" (set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
if /i "%1" == "-rebuild" (set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
if /i "%1" == "-sign" (set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
if /i "%1" == "-restore" (set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
@ -152,13 +153,17 @@ REM ============================================================================
@if defined _echo @echo on
REM Parse the optdata package versions out of msbuild so that we can pass them on to CMake
:: Parse the optdata package versions out of msbuild so that we can pass them on to CMake
set DotNetCli=%__ProjectDir%\.dotnet\dotnet.exe
if not exist "%DotNetCli%" (
echo %__MsgPrefix%Assertion failed: dotnet.exe not found at path "%DotNetCli%"
echo %__MsgPrefix%Assertion failed: dotnet cli not found at path "%DotNetCli%"
exit /b 1
)
set MSBuildPath=%__ProjectDir%\.dotnet\sdk\2.1.300\MSBuild.dll
if not exist "%MSBuildPath%" (
echo %__MsgPrefix%Assertion failed: dotnet cli sdk not found at path "%MSBuildPath%"
exit /b 1
)
set MSBuildPath=%__ProjectDir%\.dotnet\sdk\2.1.300-rc1-008673\msbuild.dll
REM =========================================================================================
REM ===
@ -209,6 +214,14 @@ if %__Build% EQU 1 (
if not exist "!VSINSTALLDIR!DIA SDK" goto NoDIA
:GenVSSolution
echo Generating Version Header
set __GenerateVersionLog="%__LogDir%\GenerateVersion.binlog"
%DotNetCli% %MSBuildPath% %__ProjectDir%\eng\CreateVersionFile.csproj /v:!__Verbosity! /bl:!__GenerateVersionLog! /t:GenerateVersionHeader2 /p:GenerateVersionHeader=true /p:NativeVersionHeaderFile=%__IntermediatesDir%\_version.h /p:Configuration=%__BuildType% /p:Platform=%__BuildArch% %__UnprocessedBuildArgs%
if not !errorlevel! == 0 (
echo Generate Version Header FAILED
exit /b 1
)
if defined __SkipConfigure goto SkipConfigure
echo %__MsgPrefix%Regenerating the Visual Studio solution
@ -229,22 +242,14 @@ if %__Build% EQU 1 (
echo %__MsgPrefix%Error: failed to generate native component build project!
exit /b 1
)
set __BuildLog="%__LogDir%\Native.Build.binlog"
set __BuildLogRootName=Native
set __BuildLog="%__LogDir%\!__BuildLogRootName!.log"
set __BuildWrn="%__LogDir%\!__BuildLogRootName!.wrn"
set __BuildErr="%__LogDir%\!__BuildLogRootName!.err"
set __MsbuildLog=/flp:Verbosity=normal;LogFile=!__BuildLog!
set __MsbuildWrn=/flp1:WarningsOnly;LogFile=!__BuildWrn!
set __MsbuildErr=/flp2:ErrorsOnly;LogFile=!__BuildErr!
:: For some currently unknown reason, "%DotNetCli% msbuild" fails because VCTargetsPath isn't defined.
msbuild.exe %__IntermediatesDir%\install.vcxproj /v:!__Verbosity! /bl:!__BuildLog! /p:Configuration=%__BuildType% /p:Platform=%__BuildArch% %__UnprocessedBuildArgs%
msbuild.exe %__IntermediatesDir%\install.vcxproj /v:!__Verbosity! !__MsbuildLog! !__MsbuildWrn! !__MsbuildErr! /p:Configuration=%__BuildType% /p:Platform=%__BuildArch% %__UnprocessedBuildArgs%
if not !errorlevel! == 0 (
if not !ERRORLEVEL! == 0 (
echo %__MsgPrefix%Error: native component build failed. Refer to the build log files for details:
echo !__BuildLog!
echo !__BuildWrn!
echo !__BuildErr!
exit /b 1
)
@ -293,24 +298,16 @@ if /i "%__DoCrossArchBuild%"=="1" (
echo %__MsgPrefix%Error: failed to generate cross-arch components build project!
exit /b 1
)
if defined __ConfigureOnly goto SkipCrossCompBuild
set __BuildLogRootName=Native.Cross
set __BuildLog="%__LogDir%\!__BuildLogRootName!.log"
set __BuildWrn="%__LogDir%\!__BuildLogRootName!.wrn"
set __BuildErr="%__LogDir%\!__BuildLogRootName!.err"
set __MsbuildLog=/flp:Verbosity=normal;LogFile=!__BuildLog!
set __MsbuildWrn=/flp1:WarningsOnly;LogFile=!__BuildWrn!
set __MsbuildErr=/flp2:ErrorsOnly;LogFile=!__BuildErr!
set __BuildLog="%__LogDir%\Cross.Build.binlog"
msbuild.exe %__CrossCompIntermediatesDir%\install.vcxproj /v:!__Verbosity! !__MsbuildLog! !__MsbuildWrn! !__MsbuildErr! /p:Configuration=%__BuildType% /p:Platform=%__CrossArch% %__UnprocessedBuildArgs%
:: For some currently unknown reason, "%DotNetCli% msbuild" fails because VCTargetsPath isn't defined.
msbuild.exe %__CrossCompIntermediatesDir%\install.vcxproj /v:!__Verbosity! /bl:!__BuildLog! /p:Configuration=%__BuildType% /p:Platform=%__CrossArch% %__UnprocessedBuildArgs%
if not !errorlevel! == 0 (
if not !ERRORLEVEL! == 0 (
echo %__MsgPrefix%Error: cross-arch components build failed. Refer to the build log files for details:
echo !__BuildLog!
echo !__BuildWrn!
echo !__BuildErr!
exit /b 1
)
@ -336,7 +333,7 @@ if %__Test% EQU 1 (
:: Run the xunit tests
powershell -ExecutionPolicy ByPass -NoProfile -command "& """%__ProjectDir%\eng\common\Build.ps1""" -test -configuration %__BuildType% -verbosity %__Verbosity% %__TestArgs%"
exit /b %ERRORLEVEL
exit /b !ERRORLEVEL!
)
exit /b 0
@ -356,7 +353,7 @@ echo.
echo All arguments are optional. The options are:
echo.
echo.-? -h -help --help: view this message.
echo -build - build native components
echo -build-native - build native components
echo -test - test components
echo -architecture <x64|x86|arm|arm64>
echo -configuration <debug|release>

Просмотреть файл

@ -1,13 +1,15 @@
@echo off
setlocal
:: remove the -test option and pass it to build-native.cmd
set "__args=%*"
set "__args=%__args:-test=%"
:: remove the -test and -build-native options and pass it to build-native.cmd
set __args="%*"
set __args=%__args:-test=%
set __args=%__args:-build-native=%
if %__args% == "" set __args=
:: build managed components
powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0common\Build.ps1""" %__args%"
if NOT '%ERRORLEVEL%' == '0' exit /b %ERRORLEVEL%
if NOT '%ERRORLEVEL%' == '0' (exit /b %ERRORLEVEL%)
:: build native componments and test managed/native
call %~dp0build-native.cmd %*

Просмотреть файл

@ -1,71 +0,0 @@
<Project>
<PropertyGroup>
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
</PropertyGroup>
<PropertyGroup>
<IncludeBuildOutput>false</IncludeBuildOutput>
<IsPackable>true</IsPackable>
</PropertyGroup>
<!--
Default to including all *.props and *.targets files
from the project directory into the NuGet package root
-->
<ItemGroup Condition="'$(EnableDefaultItems)' != 'false'">
<None Condition="'$(EnableDefaultNoneItems)' != 'false'"
Include="**/*.props;**/*.targets" Pack="true">
<PackagePath>%(RecursiveDir)%(Filename)%(Extension)</PackagePath>
</None>
</ItemGroup>
<ItemGroup>
<None Include="$(RepoRoot)LICENSE.txt" PackagePath="LICENSE.txt" Pack="true"/>
<None Include="$(RepoRoot)THIRD-PARTY-NOTICES.txt" PackagePath="THIRD-PARTY-NOTICES.txt" Pack="true"/>
</ItemGroup>
<ItemGroup>
<!--
Update all PackageReference and ProjectReference Items to have
PrivateAssets="All" and default Publish to true
This removes the dependency nodes from the generated nuspec and
forces the publish output to contain the dlls.
-->
<PackageReference Update="@(PackageReference)">
<PrivateAssets>All</PrivateAssets>
<Publish Condition=" '%(PackageReference.Publish)' != 'false' ">true</Publish>
<ExcludeAssets Condition=" '%(PackageReference.Publish)' == 'false' ">runtime</ExcludeAssets>
</PackageReference>
<ProjectReference Update="@(ProjectReference)">
<PrivateAssets>All</PrivateAssets>
<Publish Condition=" '%(ProjectReference.Publish)' != 'false' ">true</Publish>
</ProjectReference>
<!--
Update all Reference items to have Pack="false"
This removes the frameworkDependency nodes from the generated nuspec
-->
<Reference Update="@(Reference)">
<Pack>false</Pack>
</Reference>
</ItemGroup>
<!--
if $(IncludePublishOutput) it not 'false' add Publish as a dependency to Pack
and include TfmSpecificPackageFile items for all published files
-->
<PropertyGroup Condition="'$(IncludePublishOutput)' != 'false'">
<TargetsForTfmSpecificContentInPackage>$(TargetsForTfmSpecificContentInPackage);CollectAssets</TargetsForTfmSpecificContentInPackage>
</PropertyGroup>
<Target Name="CollectAssets" DependsOnTargets="Publish">
<RemoveDuplicates Inputs="@(ResolvedFileToPublish)">
<Output TaskParameter="Filtered" ItemName="FilteredFileToPublish"/>
</RemoveDuplicates>
<ItemGroup>
<TfmSpecificPackageFile
Include="@(FilteredFileToPublish->'$([MSBuild]::NormalizeDirectory($(PublishDir)))%(RelativePath)')"
Condition="'%(FilteredFileToPublish.AssetType)' != 'resources'">
<PackagePath>tools/$(TargetFramework)/%(FilteredFileToPublish.RelativePath)</PackagePath>
</TfmSpecificPackageFile>
</ItemGroup>
</Target>
</Project>

41
eng/BuildTools.csproj Normal file
Просмотреть файл

@ -0,0 +1,41 @@
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -->
<Project>
<Import Project="Sdk.props" Sdk="RoslynTools.RepoToolset" />
<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<RelativeOutputPath>BuildTools</RelativeOutputPath>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.DotNet.BuildTools" Version="$(MicrosoftDotNetBuildToolsVersion)" />
</ItemGroup>
<Import Project="Sdk.targets" Sdk="RoslynTools.RepoToolset" />
<Target Name="Build" DependsOnTargets="RestoreBeforeBuild;CopyRestoredItemsToDirectory"/>
<Target Name="RestoreBeforeBuild" DependsOnTargets="Restore" Condition="'$(SkipRestore)' != 'true'" />
<Target Name="CopyRestoredItemsToDirectory" DependsOnTargets="GetAssemblyVersion" >
<ItemGroup>
<BuildToolsSourceFiles Include="$(NuGetPackageRoot)\microsoft.dotnet.buildtools\$(MicrosoftDotNetBuildToolsVersion)\lib\**\*" />
</ItemGroup>
<Copy
SourceFiles="@(BuildToolsSourceFiles)"
DestinationFiles="@(BuildToolsSourceFiles -> '$(ArtifactsDir)$(RelativeOutputPath)\%(RecursiveDir)%(Filename)%(Extension)')"
SkipUnchangedFiles="true"
OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
Retries="$(CopyRetryCount)"
RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"
UseHardlinksIfPossible="false">
<Output TaskParameter="DestinationFiles" ItemName="FileWrites" />
</Copy>
<Message Importance="High" Text="$(MSBuildProjectName) copied to $(ArtifactsDir)$(RelativeOutputPath)" />
</Target>
</Project>

Просмотреть файл

@ -1,3 +1,3 @@
@echo off
call %~dp0Build.cmd -restore -build -test -publish -sign -pack -ci %*
call %~dp0Build.cmd -restore -build -build-native -test -publish -ci %*
exit /b %ErrorLevel%

Просмотреть файл

@ -0,0 +1,58 @@
<Project Sdk="RoslynTools.RepoToolset" >
<PropertyGroup>
<OfficialBuildId Condition="'$(OfficialBuildId)' == ''">$(BUILD_BUILDNUMBER)</OfficialBuildId>
</PropertyGroup>
<Import Project="$(ArtifactsDir)\BuildTools\Build.Common.props" />
<Import Project="$(ArtifactsDir)\BuildTools\versioning.targets" />
<PropertyGroup>
<BuildVersionFileOverride>$(BuildVersionFilePath)BuildVersion2-$(TodayTimeStamp).props</BuildVersionFileOverride>
<ShouldCreateVersionFileOverride Condition="!Exists('$(BuildVersionFileOverride)')">true</ShouldCreateVersionFileOverride>
</PropertyGroup>
<Import Condition="Exists('$(BuildVersionFileOverride)')" Project="$(BuildVersionFileOverride)" />
<Target Name="GenerateVersionHeader2" DependsOnTargets="CreateVersionFileOverride;GenerateVersionHeader"/>
<Target Name="GenerateVersionSourceFile2" DependsOnTargets="CreateVersionFileOverride;GenerateVersionSourceFile"/>
<Target Name="CreateVersionFileOverride"
Condition="'$(SkipVersionGeneration)' != 'true' AND '$(ShouldCreateVersionFileOverride)' == 'true'"
DependsOnTargets="CreateVersionFileDuringBuild">
<!--
All of this is to override the BuildTools version major/minor to what RoslynTools.RepoToolSet does.
-->
<PropertyGroup>
<FileVersion Condition="'$(_BuildNumberFiveDigitDateStamp)' != ''">$(MajorVersion).$(MinorVersion).$(_BuildNumberFiveDigitDateStamp).$(_BuildNumberBuildOfTheDayPadded)</FileVersion>
<BuildNumberMajor Condition="'$(_BuildNumberFiveDigitDateStamp)' != ''">$(_BuildNumberFiveDigitDateStamp)</BuildNumberMajor>
<BuildNumberMinor Condition="'$(_BuildNumberBuildOfTheDayPadded)' != ''">$(_BuildNumberBuildOfTheDayPadded)</BuildNumberMinor>
<VersionFileOverrideContent>
<![CDATA[<?xml version="1.0" encoding="utf-8"?>
<!-- This is a generated file. -->
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<FileVersion>$(FileVersion)</FileVersion>
<BuildNumberMajor>$(BuildNumberMajor)</BuildNumberMajor>
<BuildNumberMinor>$(BuildNumberMinor)</BuildNumberMinor>
</PropertyGroup>
</Project>
]]>
</VersionFileOverrideContent>
</PropertyGroup>
<MakeDir Directories="$(BuildVersionFilePath)" />
<WriteLinesToFile
ContinueOnError="WarnAndContinue"
Condition="!Exists('$(BuildVersionFileOverride)')"
File="$(BuildVersionFileOverride)"
Lines="$(VersionFileOverrideContent)"
Overwrite="true" />
<Message Importance="High" Text="Created version override file $(BuildVersionFileOverride)" />
</Target>
</Project>

39
eng/GalleryManifest.xml Normal file
Просмотреть файл

@ -0,0 +1,39 @@
<?xml version="1.0" encoding="utf-8"?>
<ExtensionPackage>
<Name>SOS</Name>
<Version>1.0.0.0</Version>
<Description>Debugging aid for .NET Core programs and runtimes</Description>
<Components>
<BinaryComponent Name="sos" Type="Engine">
<Files>
<File Architecture="amd64" Module="x64\sos.dll" />
<File Architecture="x86" Module="x86\sos.dll" />
</Files>
<LoadTriggers>
<TriggerSet>
<ModuleTrigger Name="coreclr.dll" />
</TriggerSet>
</LoadTriggers>
<EngineCommands>
<EngineCommand Name="clrstack">
<EngineCommandItem>
<Syntax>!clrstack</Syntax>
<Description>Provides a stack trace of managed code only</Description>
</EngineCommandItem>
</EngineCommand>
<EngineCommand Name="clrthreads">
<EngineCommandItem>
<Syntax>!clrthreads</Syntax>
<Description>List the managed threads running</Description>
</EngineCommandItem>
</EngineCommand>
<EngineCommand Name="soshelp">
<EngineCommandItem>
<Syntax>!soshelp</Syntax>
<Description>Displays all available SOS commands or details about the command</Description>
</EngineCommandItem>
</EngineCommand>
</EngineCommands>
</BinaryComponent>
</Components>
</ExtensionPackage>

Просмотреть файл

@ -4,8 +4,15 @@
"certificate": "MicrosoftSHA2",
"strongName": "MsSharedLib72",
"values": [
"bin/Microsoft.Diagnostic.TestHelpers/netcoreapp2.0/Microsoft.Diagnostic.TestHelpers.dll",
"bin/SOS.NETCore/netcoreapp1.0/SOS.NETCore.dll",
"bin/Microsoft.Diagnostic.TestHelpers/netcoreapp2.0/Microsoft.Diagnostic.TestHelpers.dll"
]
},
{
"certificate": "MicrosoftSHA2",
"values": [
"bin/Windows_NT.x64/sos.dll",
"bin/Windows_NT.x86/sos.dll"
]
},
{
@ -14,6 +21,13 @@
"values": [
"packages/Shipping/*.nupkg"
]
},
{
"certificate": null,
"strongName": null,
"values": [
"*.zip"
]
}
],
"exclude": [

Просмотреть файл

@ -7,6 +7,7 @@
<VersionPrefix>1.0.0</VersionPrefix>
<PreReleaseVersionLabel>beta</PreReleaseVersionLabel>
<MicrosoftDotNetBuildToolsVersion>2.2.0-preview1-03108-01</MicrosoftDotNetBuildToolsVersion>
<RoslynToolsSignToolVersion>1.0.0-beta2-63127-01</RoslynToolsSignToolVersion>
<MicrosoftNetCompilersVersion>2.8.0-beta6-62830-08</MicrosoftNetCompilersVersion>
<UsingToolNetFrameworkReferenceAssemblies>true</UsingToolNetFrameworkReferenceAssemblies>

Просмотреть файл

@ -28,36 +28,19 @@ __CrossBuild=0
__NumProc=1
__Build=0
__Test=0
__CI=0
__TestArgs=
__UnprocessedBuildArgs=
# resolve python-version to use
if [ "$PYTHON" == "" ] ; then
if ! PYTHON=$(command -v python2.7 || command -v python2 || command -v python)
then
echo "Unable to locate build-dependency python2.x!" 1>&2
exit 1
fi
fi
# validate python-dependency
# useful in case of explicitly set option.
if ! command -v $PYTHON > /dev/null
then
echo "Unable to locate build-dependency python2.x ($PYTHON)!" 1>&2
exit 1
fi
echo $PYTHON
usage()
{
echo "Usage: $0 [options]"
echo "--build - build native components"
echo "--build-native - build native components"
echo "--test - test native components"
echo "--architecture <x64|x86|arm|armel|arm64>"
echo "--configuration <debug|release>"
echo "--clangx.y - optional argument to build using clang version x.y"
echo "--ci - CI lab build"
echo "--verbosity <q[uiet]|m[inimal]|n[ormal]|d[etailed]|diag[nostic]>"
echo "--help - this help message"
exit 1
@ -169,21 +152,23 @@ while :; do
exit 1
;;
--build)
--build-native)
__Build=1
;;
# Passed to common build script when testing
--test)
__Test=1
;;
# Passed to common build script when testing
--ci)
__CI=1
__TestArgs="$__TestArgs $1"
;;
--solution)
__TestArgs="$__TestArgs $1 $2"
shift
;;
--verbosity)
@ -191,10 +176,6 @@ while :; do
shift
;;
# Ignored for a native build
--rebuild|--sign|--restore|--pack|--publish|--preparemachine)
;;
--configuration)
__BuildType="$(to_lowercase "$2")"
shift
@ -245,6 +226,10 @@ while :; do
shift
;;
# Ignored for a native build
--build|--rebuild|--sign|--restore|--pack|--publish|--preparemachine)
;;
*)
__UnprocessedBuildArgs="$__UnprocessedBuildArgs $1"
;;
@ -260,6 +245,33 @@ if [ "$__BuildType" == "debug" ]; then
__BuildType=Debug
fi
# Needs to be set for generate version source file/msbuild
if [[ -z $NUGET_PACKAGES ]]; then
if [[ $__CI ]]; then
export NUGET_PACKAGES="$__ProjectRoot/.packages"
else
export NUGET_PACKAGES="$HOME/.nuget/packages"
fi
fi
# Resolve python-version to use
if [ "$PYTHON" == "" ] ; then
if ! PYTHON=$(command -v python2.7 || command -v python2 || command -v python)
then
echo "Unable to locate build-dependency python2.x!" 1>&2
exit 1
fi
fi
# Validate python-dependency. Useful in case of explicitly set option.
if ! command -v $PYTHON > /dev/null
then
echo "Unable to locate build-dependency python2.x ($PYTHON)!" 1>&2
exit 1
fi
echo $PYTHON
__RootBinDir=$__ProjectRoot/artifacts
__ConfigBinDir=$__RootBinDir/$__BuildType
__BinDir=$__ConfigBinDir/bin/$__BuildOS.$__BuildArch
@ -268,6 +280,17 @@ __IntermediatesDir=$__RootBinDir/obj/$__BuildOS.$__BuildArch.$__BuildType
__ResultsDir=$__ConfigBinDir/TestResults
__PackagesBinDir=$__ConfigBinDir/packages
__ExtraCmakeArgs=-DCLR_MANAGED_BINARY_DIR=$__ConfigBinDir/bin
__DotNetCli=$__ProjectRoot/.dotnet/dotnet
__MSBuildPath=$__ProjectRoot/.dotnet/sdk/2.1.300/MSBuild.dll
if [ ! -e $__DotNetCli ]; then
echo "dotnet cli not installed $__DotNetCli"
exit 1
fi
if [ ! -e $__MSBuildPath ]; then
echo "dotnet cli sdk not installed $__MSBuildPath"
exit 1
fi
# Specify path to be set for CMAKE_INSTALL_PREFIX.
# This is where all built native libraries will copied to.
@ -427,6 +450,14 @@ fi
# Build native components
if [ $__Build == 1 ]; then
echo "Generating Version Source File"
__GenerateVersionLog="$__LogDir/GenerateVersion.binlog"
$__DotNetCli $__MSBuildPath $__ProjectRoot/eng/CreateVersionFile.csproj /noconlog /bl:$__GenerateVersionLog /t:GenerateVersionSourceFile2 /p:GenerateVersionSourceFile=true /p:NativeVersionSourceFile="$__IntermediatesDir/version.cpp" /p:Configuration="$__BuildType" /p:Platform="$__BuildArch" $__UnprocessedBuildArgs
if [ $? != 0 ]; then
echo "Generating Version Source File FAILED"
exit 1
fi
build_native "$__BuildArch" "$__IntermediatesDir" "$__ExtraCmakeArgs"
fi

Просмотреть файл

@ -17,7 +17,7 @@ done
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
# remove the options that build.sh can't handle and pass it to build-native.sh
__args="$(echo $@ | sed 's/--test//g;s/--clang[0-9]\.[0-9]//g')"
__args="$(echo $@ | sed 's/--test//g;s/--build-native//g;s/--clang[0-9]\.[0-9]//g')"
# build managed components
"$scriptroot/common/build.sh" $__args

Просмотреть файл

@ -4,132 +4,133 @@
# agentOs: [Windows_NT (default), Linux, OSX] Used in templates to define variables which are OS specific
# dockerImage: If defined, specifies docker image to run build steps in
# matrix: build matrix
# queueName: agent pool name
# enableTelemetry: send telemetry if build is not a PR or CI build
# queue YAML object - https://github.com/Microsoft/vsts-agent/blob/master/docs/preview/yamlgettingstarted-schema.md#queue
# variables YAML object - https://github.com/Microsoft/vsts-agent/blob/master/docs/preview/yamlgettingstarted-schema.md#phase
parameters:
phaseName: ''
agentOs: Windows_NT
dockerImage: ''
testOnly: false
dependsOn: ''
enableTelemetry: true
queue: {}
useEsrpSigning: true
variables: {}
phases:
- template: /eng/common/templates/phases/base.yml
parameters:
name: ${{ parameters.phaseName }}
agentOs: ${{ parameters.agentOs }}
buildConfig: $(_BuildConfig)
phaseName: ${{ parameters.phaseName }}
dependsOn: ${{ parameters.dependsOn }}
enableTelemetry: ${{ parameters.enableTelemetry }}
helixType: build/product
${{ if notIn(variables['Build.Reason'], 'IndividualCI', 'BatchedCI', 'PullRequest') }}:
helixSource: official/dotnet/arcade/$(Build.SourceBranch)
${{ if in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI', 'PullRequest') }}:
helixSource: pr/dotnet/arcade/$(Build.SourceBranch)
phase:
queue: ${{ parameters.queue }}
variables:
_DockerImageName: ${{ parameters.dockerImage }}
_PhaseName : ${{ parameters.phaseName }}
${{ if notIn(variables['Build.Reason'], 'IndividualCI', 'BatchedCI', 'PullRequest') }}:
_PublishBlobFeedUrl: https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json
_TeamName: DotNetCore
_UseEsrpSigning: ${{ parameters.useEsrpSigning }}
${{ if notIn(variables['Build.Reason'], 'IndividualCI', 'BatchedCI', 'PullRequest') }}:
_PublishArgs: /p:PB_PublishBlobFeedKey=$(dotnetfeed-storage-access-key-1)
/p:PB_PublishBlobFeedUrl=$(_PublishBlobFeedUrl)
/p:PB_PublishType=$(_PublishType)
${{ if in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI', 'PullRequest') }}:
_PublishArgs: ''
queue: ${{ parameters.queue }}
steps:
- template: /eng/common/templates/steps/run-on-windows.yml
parameters:
agentOs: ${{ parameters.agentOs }}
steps:
- template: /eng/common/templates/steps/build-reason.yml
parameters:
conditions: not IndividualCI,BatchedCI,PullRequest
steps:
- task: ms-vseng.MicroBuildTasks.30666190-6959-11e5-9f96-f56098202fef.MicroBuildSigningPlugin@1
displayName: Install MicroBuild plugin
inputs:
signType: $(_SignType)
zipSources: false
esrpSigning: $(_UseEsrpSigning)
env:
TeamName: $(_TeamName)
continueOnError: false
condition: and(succeeded(), in(variables._SignType, 'real', 'test'))
- task: AzureKeyVault@1
inputs:
azureSubscription: 'DotNet-Engineering-Services_KeyVault'
KeyVaultName: EngKeyVault
SecretsFilter: 'dotnetfeed-storage-access-key-1'
condition: succeeded()
- script: $(Build.SourcesDirectory)\eng\cibuild.cmd
-configuration $(_BuildConfig)
-architecture $(_BuildArch)
-prepareMachine
/p:SignType=$(_SignType)
$(_PublishArgs)
name: Build_Test
displayName: Build / Test
env:
OfficialBuildId: $(BUILD.BUILDNUMBER)
condition: succeeded()
variables:
${{ insert }}: ${{ parameters.variables }}
_PortableLinuxBuild: CentOS_7_Build_$(_BuildConfig)
_DockerImageName: ${{ parameters.dockerImage }}
_PhaseName : ${{ parameters.phaseName }}
_HelixType: build/product
_HelixBuildConfig: $(_BuildConfig)
${{ if notIn(variables['Build.Reason'], 'IndividualCI', 'BatchedCI', 'PullRequest') }}:
_HelixSource: official/dotnet/arcade/$(Build.SourceBranch)
${{ if eq(parameters.testOnly, 'true') }}:
_LinuxScript: $(Build.SourcesDirectory)/eng/citest.sh
${{ if ne(parameters.testOnly, 'true') }}:
_LinuxScript: $(Build.SourcesDirectory)/eng/cibuild.sh
${{ if in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI', 'PullRequest') }}:
_HelixSource: pr/dotnet/arcade/$(Build.SourceBranch)
_LinuxScript: $(Build.SourcesDirectory)/eng/cibuild.sh
- ${{ if eq(parameters.agentOs, 'Linux') }}:
- script: $(Build.SourcesDirectory)/eng/docker-cibuild.sh
--docker-image $(_DockerImageName)
--source-directory $(Build.SourcesDirectory)
--container-name diagnostics-$(Build.BuildId)
--configuration $(_BuildConfig)
--architecture $(_BuildArch)
--prepareMachine
/p:SignType=$(_SignType)
$(_PublishArgs)
name: Build_Test
displayName: Docker Build / Test
env:
OfficialBuildId: $(BUILD.BUILDNUMBER)
condition: succeeded()
- ${{ if eq(parameters.agentOs, 'Darwin') }}:
- script: $(Build.SourcesDirectory)/eng/cibuild.sh
--configuration $(_BuildConfig)
--architecture $(_BuildArch)
--prepareMachine
/p:SignType=$(_SignType)
$(_PublishArgs)
name: Build_Test
steps:
# Internal only build steps
- template: /eng/common/templates/steps/run-on-windows.yml
parameters:
agentOs: ${{ parameters.agentOs }}
steps:
- script: $(Build.SourcesDirectory)\eng\cibuild.cmd
-configuration $(_BuildConfig)
-architecture $(_BuildArch)
-prepareMachine
displayName: Build / Test
env:
OfficialBuildId: $(BUILD.BUILDNUMBER)
condition: succeeded()
- template: /eng/common/templates/steps/build-reason.yml
parameters:
conditions: not IndividualCI,BatchedCI,PullRequest
steps:
- task: CopyFiles@2
displayName: Gather Logs
inputs:
SourceFolder: '$(Build.SourcesDirectory)/artifacts'
Contents: '**/*log'
TargetFolder: '$(Build.StagingDirectory)/BuildLogs'
continueOnError: true
condition: always()
- ${{ if eq(parameters.agentOs, 'Linux') }}:
- ${{ if eq(parameters.testOnly, 'true') }}:
- task: DownloadBuildArtifacts@0
displayName: Download Linux-x64 Artifacts
inputs:
artifactName: $(_PortableLinuxBuild)
downloadPath: '$(System.ArtifactsDirectory)'
condition: succeeded()
- task: PublishBuildArtifacts@1
displayName: Publish Logs to VSTS
inputs:
PathtoPublish: '$(Build.StagingDirectory)/BuildLogs'
PublishLocation: Container
${{ if eq(parameters.agentOs, 'Windows_NT') }}:
ArtifactName: Windows_NT_$(Agent.JobName)
${{ if ne(parameters.agentOs, 'Windows_NT') }}:
ArtifactName: Linux_$(_PhaseName)_$(Agent.JobName)
continueOnError: true
condition: always()
- task: CopyFiles@2
displayName: Place Linux-x64 Artifacts
inputs:
sourceFolder: '$(System.ArtifactsDirectory)/$(_PortableLinuxBuild)'
targetFolder: '$(Build.SourcesDirectory)/artifacts/$(_BuildConfig)/bin/Linux.x64'
condition: succeeded()
- script: $(Build.SourcesDirectory)/eng/docker-build.sh
--docker-image $(_DockerImageName)
--source-directory $(Build.SourcesDirectory)
--container-name diagnostics-$(Build.BuildId)
$(_LinuxScript)
--configuration $(_BuildConfig)
--architecture $(_BuildArch)
--prepareMachine
/p:BUILD_BUILDNUMBER=$(BUILD.BUILDNUMBER)
displayName: Docker Build / Test
env:
OfficialBuildId: $(BUILD.BUILDNUMBER)
condition: succeeded()
- ${{ if eq(parameters.agentOs, 'Darwin') }}:
- script: $(Build.SourcesDirectory)/eng/cibuild.sh
--configuration $(_BuildConfig)
--architecture $(_BuildArch)
--prepareMachine
displayName: Build / Test
env:
OfficialBuildId: $(BUILD.BUILDNUMBER)
condition: succeeded()
# Internal only build steps (until publishing artifacts in public CI is supported)
- template: /eng/common/templates/steps/build-reason.yml
parameters:
conditions: not IndividualCI,BatchedCI,PullRequest
steps:
- task: PublishBuildArtifacts@1
displayName: Upload Artifacts
inputs:
pathtoPublish: '$(Build.SourcesDirectory)/artifacts/$(_BuildConfig)/$(_PublishArtifacts)'
artifactName: $(_PhaseName)_$(Agent.JobName)
condition: and(succeeded(), ne(variables['_PublishArtifacts'], ''))
- task: CopyFiles@2
displayName: Gather Build Logs
inputs:
sourceFolder: '$(Build.SourcesDirectory)/artifacts/$(_BuildConfig)/log'
targetFolder: '$(Build.StagingDirectory)/BuildLogs'
continueOnError: true
condition: always()
- task: CopyFiles@2
displayName: Gather Test Logs
inputs:
sourceFolder: '$(Build.SourcesDirectory)/artifacts/$(_BuildConfig)/TestResults'
targetFolder: '$(Build.StagingDirectory)/BuildLogs'
continueOnError: true
condition: always()
- task: PublishBuildArtifacts@1
displayName: Publish Logs to VSTS
inputs:
pathtoPublish: '$(Build.StagingDirectory)/BuildLogs'
artifactName: Logs_$(_PhaseName)_$(Agent.JobName)
continueOnError: true
condition: always()

Просмотреть файл

@ -37,7 +37,7 @@ if [ "$__osname" == "Linux" ]; then
fi
fi
"$scriptroot/build.sh" --restore --build --test --publish --pack --ci $@
"$scriptroot/build.sh" --restore --build --build-native --test --publish --ci $@
if [[ $? != 0 ]]; then
exit 1
fi

Просмотреть файл

@ -1,3 +1,3 @@
@echo off
powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0eng\common\Build.ps1""" -pack %*"
powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0common\Build.ps1""" -restore -sign -pack %*"
exit /b %ErrorLevel%

44
eng/citest.sh Executable file
Просмотреть файл

@ -0,0 +1,44 @@
#!/usr/bin/env bash
# Copyright (c) .NET Foundation and contributors. All rights reserved.
# Licensed under the MIT license. See LICENSE file in the project root for full license information.
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 )"
# Fix any CI lab docker image problems
__osname=$(uname -s)
if [ "$__osname" == "Linux" ]; then
if [ -e /etc/os-release ]; then
source /etc/os-release
if [[ $ID == "ubuntu" ]]; then
if [[ $VERSION_ID == "18.04" ]]; then
# Fix the CI lab's ubuntu 18.04 docker image: install curl.
sudo apt-get update
sudo apt-get install -y curl
fi
fi
elif [ -e /etc/redhat-release ]; then
__redhatRelease=$(</etc/redhat-release)
if [[ $__redhatRelease == "CentOS release 6."* || $__redhatRelease == "Red Hat Enterprise Linux Server release 6."* ]]; then
source scl_source enable python27 devtoolset-2
fi
fi
fi
# Restore and build just the managed components (test infrastructure)
"$scriptroot/build.sh" --restore --build --test --ci $@
if [[ $? != 0 ]]; then
exit 1
fi

Просмотреть файл

@ -1,58 +1,71 @@
# base.yml
# Description: Expands a phase object, applying telemetry, docker info, etc...
# Parameters:
# agentOs: [Windows_NT (default), Linux, OSX] Used in templates to define variables which are OS specific
# buildConfig: buildConfiguration property provided to telemetry
# dockerImage: If defined, specifies docker image to run build steps in
# enableTelemetry: send telemetry if build is not a PR or CI build
# fetchDepth: Limit fetching to the specified number of commits from the tip of each remote branch history
# helixSource: telemetry source to report
# helixType: telemetry type to report
# phaseName: name of phase
# phase: defined phase object
parameters:
agentOs: Windows_NT
buildConfig: ''
# Optional: Clean sources before building
clean: true
dockerImage: ''
enableTelemetry: ''
# Optional: Git fetch depth
fetchDepth: ''
helixSource: 'undefined_defaulted_in_base.yml'
helixType: 'undefined_defaulted_in_base.yml'
phaseName: ''
phase: {}
# Optional: name of the phase (not specifying phase name may cause name collisions)
name: ''
# Phase dependencies
dependsOn: ''
# Required: A defined YAML queue
queue: {}
# Required: build steps
steps: []
# Optional: variables
variables: {}
## Telemetry variables
# Required: determines whether to run cmd or sh telemetry files
agentOs: Windows_NT
# Optional: enable sending telemetry
# if enabled, these "variables" must be specified in the variables object
# _HelixBuildConfig - differentiate between Debug, Release, other
# _HelixSource - Example: build/product
# _HelixType - Example: official/dotnet/arcade/$(Build.SourceBranch)
enableTelemetry: false
phases:
- phase: ${{ parameters.phaseName }}
queue: ${{ parameters.phase.queue }}
${{ if and(ne(parameters.phase.variables, ''), eq(parameters.dockerImage, '')) }}:
variables: ${{ parameters.phase.variables }}
${{ if ne(parameters.dockerImage, '') }}:
variables:
_PREVIEW_VSTS_DOCKER_IMAGE: ${{ parameters.dockerImage }}
${{ insert }}: ${{ parameters.phase.variables }}
- phase: ${{ parameters.name }}
dependsOn: ${{ parameters.dependsOn }}
queue: ${{ parameters.queue }}
${{ if ne(parameters.variables, '') }}:
variables: ${{ parameters.variables }}
steps:
- checkout: self
clean: ${{ parameters.clean }}
${{ if ne(parameters.fetchDepth, '') }}:
fetchDepth: ${{ parameters.fetchDepth }}
- template: /eng/common/templates/steps/build-reason.yml
parameters:
conditions: not IndividualCI,BatchedCI,PullRequest
steps:
- ${{ if eq(parameters.enableTelemetry, 'true') }}:
- template: /eng/common/templates/steps/telemetry.yml
parameters:
agentOs: ${{ parameters.agentOs }}
buildConfig: ${{ parameters.buildConfig }}
helixSource: ${{ parameters.helixSource }}
helixType: ${{ parameters.helixType }}
steps: ${{ parameters.phase.steps }}
- ${{ if not(eq(parameters.enableTelemetry, 'true')) }}:
- ${{ parameters.phase.steps }}
- template: /eng/common/templates/steps/build-reason.yml
parameters:
conditions: IndividualCI,BatchedCI,PullRequest
steps:
- ${{ parameters.phase.steps }}
- ${{ if eq(parameters.enableTelemetry, 'true') }}:
# Remove this condition once telemetry can be sent from public CI
- ${{ if notIn(variables['Build.Reason'], 'IndividualCI', 'BatchedCI', 'PullRequest') }}:
- template: /eng/common/templates/steps/telemetry-start.yml
parameters:
agentOs: ${{ parameters.agentOs }}
buildConfig: ${{ parameters.variables._HelixBuildConfig }}
helixSource: ${{ parameters.variables._HelixSource }}
helixType: ${{ parameters.variables._HelixType }}
# Run provided build steps
- ${{ parameters.steps }}
- ${{ if eq(parameters.enableTelemetry, 'true') }}:
# Remove this condition once telemetry can be sent from public CI
- ${{ if notIn(variables['Build.Reason'], 'IndividualCI', 'BatchedCI', 'PullRequest') }}:
- template: /eng/common/templates/steps/telemetry-end.yml
parameters:
agentOs: ${{ parameters.agentOs }}
helixSource: ${{ parameters.variables._HelixSource }}
helixType: ${{ parameters.variables._HelixType }}

Просмотреть файл

@ -0,0 +1,33 @@
parameters:
# if parameter1 equals parameter 2, run 'ifScript' command, else run 'elsescript' command
parameter1: ''
parameter2: ''
ifScript: ''
elseScript: ''
# name of script step
name: Script
# display name of script step
displayName: If-Equal-Else Script
# environment
env: {}
# conditional expression for step execution
condition: ''
steps:
- ${{ if and(ne(parameters.ifScript, ''), eq(parameters.parameter1, parameters.parameter2)) }}:
- script: ${{ parameters.ifScript }}
name: ${{ parameters.name }}
displayName: ${{ parameters.displayName }}
env: ${{ parameters.env }}
condition: ${{ parameters.condition }}
- ${{ if and(ne(parameters.elseScript, ''), ne(parameters.parameter1, parameters.parameter2)) }}:
- script: ${{ parameters.elseScript }}
name: ${{ parameters.name }}
displayName: ${{ parameters.displayName }}
env: ${{ parameters.env }}
condition: ${{ parameters.condition }}

Просмотреть файл

@ -0,0 +1,35 @@
parameters:
agentOs: Windows_NT
helixSource: 'undefined_defaulted_in_telemetry.yml'
helixType: 'undefined_defaulted_in_telemetry.yml'
steps:
- template: /eng/common/templates/steps/run-on-unix.yml
parameters:
agentOs: ${{ parameters.agentOs }}
steps:
- bash: |
/bin/bash ./telemetry/build/end.sh
workingDirectory: $(Build.SourcesDirectory)/eng/common
displayName: Send Build End Telemetry
env:
# defined via VSTS variables in start-job.sh
Helix_JobToken: $(Helix_JobToken)
Helix_WorkItemId: $(Helix_WorkItemId)
condition: always()
- template: /eng/common/templates/steps/run-on-windows.yml
parameters:
agentOs: ${{ parameters.agentOs }}
steps:
- powershell: |
./telemetry/build/end.ps1
if ($LASTEXITCODE -ne 0) {
exit $LASTEXITCODE
}
workingDirectory: $(Build.SourcesDirectory)/eng/common
displayName: Send Build End Telemetry
env:
# defined via VSTS variables in start-job.ps1
Helix_JobToken: $(Helix_JobToken)
Helix_WorkItemId: $(Helix_WorkItemId)
condition: always()

Просмотреть файл

@ -0,0 +1,80 @@
parameters:
agentOs: Windows_NT
helixSource: 'undefined_defaulted_in_telemetry.yml'
helixType: 'undefined_defaulted_in_telemetry.yml'
buildConfig: ''
steps:
- template: /eng/common/templates/steps/run-on-unix.yml
parameters:
agentOs: ${{ parameters.agentOs }}
steps:
- task: AzureKeyVault@1
inputs:
azureSubscription: 'HelixProd_KeyVault'
KeyVaultName: HelixProdKV
SecretsFilter: 'HelixApiAccessToken'
condition: always()
- bash: |
/bin/bash ./telemetry/start-job.sh --source "$Source" --type "$Type" --build "$Build" --queue-id "$QueueId" --attempt "$Attempt" -p "operatingSystem=$OperatingSystem" -p "configuration=$Configuration"
workingDirectory: $(Build.SourcesDirectory)/eng/common
displayName: Send Job Start Telemetry
env:
HelixApiAccessToken: $(HelixApiAccessToken)
Source: ${{ parameters.helixSource }}
Type: ${{ parameters.helixType }}
Build: $(Build.BuildNumber)
QueueId: ${{ parameters.agentOs }}
Attempt: 1
OperatingSystem: ${{ parameters.agentOs }}
Configuration: ${{ parameters.buildConfig }}
condition: always()
- bash: |
/bin/bash ./telemetry/build/start.sh --build-uri "$BuildUri"
workingDirectory: $(Build.SourcesDirectory)/eng/common
displayName: Send Build Start Telemetry
env:
BuildUri: $(System.TaskDefinitionsUri)$(System.TeamProject)/_build/index?buildId=$(Build.BuildId)&_a=summary
# defined via VSTS variables in start-job.sh
Helix_JobToken: $(Helix_JobToken)
condition: always()
- template: /eng/common/templates/steps/run-on-windows.yml
parameters:
agentOs: ${{ parameters.agentOs }}
steps:
- task: AzureKeyVault@1
inputs:
azureSubscription: 'HelixProd_KeyVault'
KeyVaultName: HelixProdKV
SecretsFilter: 'HelixApiAccessToken'
condition: always()
- powershell: |
./telemetry/start-job.ps1 -Source $env:Source -Type $env:Type -Build $env:Build -QueueId $env:QueueId -Attempt $env:Attempt -Properties @{ operatingSystem=$env:OperatingSystem; configuration=$env:Configuration } -Verbose
if ($LASTEXITCODE -ne 0) {
exit $LASTEXITCODE
}
workingDirectory: $(Build.SourcesDirectory)/eng/common
displayName: Send Job Start Telemetry
env:
HelixApiAccessToken: $(HelixApiAccessToken)
Source: ${{ parameters.helixSource }}
Type: ${{ parameters.helixType }}
Build: $(Build.BuildNumber)
QueueId: ${{ parameters.agentOs }}
Attempt: 1
OperatingSystem: ${{ parameters.agentOs }}
Configuration: ${{ parameters.buildConfig }}
condition: always()
- powershell: |
./telemetry/build/start.ps1 -BuildUri $env:BuildUri
if ($LASTEXITCODE -ne 0) {
exit $LASTEXITCODE
}
workingDirectory: $(Build.SourcesDirectory)/eng/common
displayName: Send Build Start Telemetry
env:
BuildUri: $(System.TaskDefinitionsUri)$(System.TeamProject)/_build/index?buildId=$(Build.BuildId)&_a=summary
# defined via VSTS variables in start-job.ps1
Helix_JobToken: $(Helix_JobToken)
condition: always()

Просмотреть файл

@ -63,8 +63,8 @@ $docker_bin exec $docker_id usermod -a -G container_SUDO_user $container_user_na
$docker_bin exec $docker_id su -c "$source_directory/eng/docker-init.sh"
$docker_bin exec $docker_id su -c "echo '%container_SUDO_user ALL=(ALL:ALL) NOPASSWD:ALL' >> /etc/sudoers"
echo "Execute cibuild.sh $args"
$docker_bin exec --workdir=$source_directory --user $container_user_name $docker_id $source_directory/eng/cibuild.sh $args
echo "Execute $args"
$docker_bin exec --workdir=$source_directory --user $container_user_name $docker_id $args
lasterrorcode=$?
echo "Cleanup Docker Container/Network"

Просмотреть файл

@ -156,11 +156,7 @@ function(install_clr targetName)
endfunction()
function(_add_executable)
if(NOT WIN32)
add_executable(${ARGV} ${VERSION_FILE_PATH})
else()
add_executable(${ARGV})
endif(NOT WIN32)
add_executable(${ARGV})
list(FIND CLR_CROSS_COMPONENTS_LIST ${ARGV0} INDEX)
if (DEFINED CLR_CROSS_COMPONENTS_LIST AND ${INDEX} EQUAL -1)
set_target_properties(${ARGV0} PROPERTIES EXCLUDE_FROM_ALL 1)
@ -168,11 +164,7 @@ function(_add_executable)
endfunction()
function(_add_library)
if(NOT WIN32)
add_library(${ARGV} ${VERSION_FILE_PATH})
else()
add_library(${ARGV})
endif(NOT WIN32)
add_library(${ARGV})
list(FIND CLR_CROSS_COMPONENTS_LIST ${ARGV0} INDEX)
if (DEFINED CLR_CROSS_COMPONENTS_LIST AND ${INDEX} EQUAL -1)
set_target_properties(${ARGV0} PROPERTIES EXCLUDE_FROM_ALL 1)
@ -180,11 +172,19 @@ function(_add_library)
endfunction()
function(add_library_clr)
_add_library(${ARGV})
if(NOT WIN32)
_add_library(${ARGV} ${VERSION_FILE_PATH})
else()
_add_library(${ARGV})
endif(NOT WIN32)
endfunction()
function(add_executable_clr)
_add_executable(${ARGV})
if(NOT WIN32)
_add_executable(${ARGV} ${VERSION_FILE_PATH})
else()
_add_executable(${ARGV})
endif(NOT WIN32)
endfunction()
function(_install)

Просмотреть файл

@ -6,12 +6,68 @@
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<NoWarn>;1591;1701</NoWarn>
<IsPackable>true</IsPackable>
<Description>Managed SOS Services</Description>
<Description>.NET Core SOS</Description>
<PackageId>SOS</PackageId>
<PackageReleaseNotes>$(Description)</PackageReleaseNotes>
<PackageTags>SOS</PackageTags>
<IncludeBuildOutput>false</IncludeBuildOutput>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="System.Reflection.Metadata" Version="$(SystemReflectionMetadataVersion)" />
</ItemGroup>
<ItemGroup>
<_PackageFiles Include="$(ArtifactsBinDir)\SOS.NETCore\netcoreapp1.0\SOS.NETCore.dll">
<BuildAction>None</BuildAction>
<PackagePath>tools/win-x64</PackagePath>
</_PackageFiles>
<_PackageFiles Include="$(ArtifactsBinDir)\Windows_NT.x64\sos.dll">
<BuildAction>None</BuildAction>
<PackagePath>tools/win-x64</PackagePath>
</_PackageFiles>
<_PackageFiles Include="$(ArtifactsBinDir)\SOS.NETCore\netcoreapp1.0\SOS.NETCore.dll">
<BuildAction>None</BuildAction>
<PackagePath>tools/win-x86</PackagePath>
</_PackageFiles>
<_PackageFiles Include="$(ArtifactsBinDir)\Windows_NT.x86\sos.dll">
<BuildAction>None</BuildAction>
<PackagePath>tools/win-x86</PackagePath>
</_PackageFiles>
<_PackageFiles Include="$(ArtifactsBinDir)\SOS.NETCore\netcoreapp1.0\SOS.NETCore.dll">
<BuildAction>None</BuildAction>
<PackagePath>tools/linux-x64</PackagePath>
</_PackageFiles>
<_PackageFiles Include="$(ArtifactsBinDir)\Linux.x64\libsosplugin.so">
<BuildAction>None</BuildAction>
<PackagePath>tools/linux-x64</PackagePath>
</_PackageFiles>
<_PackageFiles Include="$(ArtifactsBinDir)\Linux.x64\libsos.so">
<BuildAction>None</BuildAction>
<PackagePath>tools/linux-x64</PackagePath>
</_PackageFiles>
<_PackageFiles Include="$(ArtifactsBinDir)\Linux.x64\sosdocsunix.txt">
<BuildAction>None</BuildAction>
<PackagePath>tools/linux-x64</PackagePath>
</_PackageFiles>
<_PackageFiles Include="$(ArtifactsBinDir)\SOS.NETCore\netcoreapp1.0\SOS.NETCore.dll">
<BuildAction>None</BuildAction>
<PackagePath>tools/osx-x64</PackagePath>
</_PackageFiles>
<_PackageFiles Include="$(ArtifactsBinDir)\OSX.x64\libsosplugin.dylib">
<BuildAction>None</BuildAction>
<PackagePath>tools/osx-x64</PackagePath>
</_PackageFiles>
<_PackageFiles Include="$(ArtifactsBinDir)\OSX.x64\libsos.dylib">
<BuildAction>None</BuildAction>
<PackagePath>tools/osx-x64</PackagePath>
</_PackageFiles>
<_PackageFiles Include="$(ArtifactsBinDir)\OSX.x64\sosdocsunix.txt">
<BuildAction>None</BuildAction>
<PackagePath>tools/osx-x64</PackagePath>
</_PackageFiles>
</ItemGroup>
</Project>

Просмотреть файл

@ -2,6 +2,7 @@
<Project Sdk="RoslynTools.RepoToolset">
<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<IsPackable>false</IsPackable>
<NoWarn>;1591;1701</NoWarn>
<DefineConstants>$(DefineConstants);CORE_CLR</DefineConstants>
</PropertyGroup>

Просмотреть файл

@ -23,7 +23,7 @@ Type "!help <functionname>" for detailed info on that function.
Object Inspection Examining code and stacks
----------------------------- -----------------------------
DumpObj (do) Threads
DumpObj (do) Threads (clrthreads)
DumpArray (da) ThreadState
DumpAsync IP2MD
DumpStackObjects (dso) U
@ -399,6 +399,7 @@ The arguments in detail:
\\
COMMAND: dso.
COMMAND: dumpstackobjects.
!DumpStackObjects [-verify] [top stack [bottom stack]]
@ -719,6 +720,7 @@ The arguments in detail:
the finalizer thread when it gets a chance to run.
\\
COMMAND: pe.
COMMAND: printexception.
!PrintException [-nested] [-lines] [-ccw] [<Exception object address>] [<CCW pointer>]
@ -850,6 +852,7 @@ Possible thread states:
Failed to Start
Detached
\\
COMMAND: clrthreads.
COMMAND: threads.
!Threads [-live] [-special]

Просмотреть файл

@ -13,4 +13,4 @@ if(CLR_CMAKE_PLATFORM_UNIX)
add_compile_options(-fPIC)
endif(CLR_CMAKE_PLATFORM_UNIX)
add_library_clr(dbgutil STATIC ${DBGUTIL_SOURCES})
_add_library(dbgutil STATIC ${DBGUTIL_SOURCES})

Просмотреть файл

@ -12,4 +12,4 @@ set(DEBUGSHIM_SOURCES
debugshim.cpp
)
add_library_clr(debugshim STATIC ${DEBUGSHIM_SOURCES})
_add_library(debugshim STATIC ${DEBUGSHIM_SOURCES})

Просмотреть файл

@ -3,6 +3,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.0</TargetFramework>
<IsPackable>false</IsPackable>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<NoWarn>;1591;1701</NoWarn>
</PropertyGroup>

Просмотреть файл

@ -118,7 +118,7 @@ set(SOURCES
services.cpp
)
_add_library(sosplugin SHARED ${SOURCES})
add_library_clr(sosplugin SHARED ${SOURCES})
if(NOT ${LLDB_LIB} STREQUAL "")
target_link_libraries(sosplugin ${LLDB_LIB})

Просмотреть файл

@ -1,29 +0,0 @@
#ifndef VER_COMPANYNAME_STR
#define VER_COMPANYNAME_STR "Microsoft Corporation"
#endif
#ifndef VER_FILEDESCRIPTION_STR
#define VER_FILEDESCRIPTION_STR "build"
#endif
#ifndef VER_INTERNALNAME_STR
#define VER_INTERNALNAME_STR VER_FILEDESCRIPTION_STR
#endif
#ifndef VER_ORIGINALFILENAME_STR
#define VER_ORIGINALFILENAME_STR VER_FILEDESCRIPTION_STR
#endif
#ifndef VER_PRODUCTNAME_STR
#define VER_PRODUCTNAME_STR "Microsoft\xae .NET Framework"
#endif
#undef VER_PRODUCTVERSION
#define VER_PRODUCTVERSION 4,6,26508,0
#undef VER_PRODUCTVERSION_STR
#define VER_PRODUCTVERSION_STR "4.6.26508.0"
#undef VER_FILEVERSION
#define VER_FILEVERSION 4,6,26508,0
#undef VER_FILEVERSION_STR
#define VER_FILEVERSION_STR "4.6.26508.0"
#ifndef VER_LEGALCOPYRIGHT_STR
#define VER_LEGALCOPYRIGHT_STR "\xa9 Microsoft Corporation. All rights reserved."
#endif
#ifndef VER_DEBUG
#define VER_DEBUG VS_FF_DEBUG
#endif

Просмотреть файл

@ -200,7 +200,7 @@ set(SOURCES
thread/thread.cpp
)
add_library(coreclrpal
_add_library(coreclrpal
STATIC
${SOURCES}
${ARCH_SOURCES}

Просмотреть файл

@ -27,7 +27,7 @@ set(PALRT_SOURCES
variant.cpp
)
add_library_clr(palrt
_add_library(palrt
STATIC
${PALRT_SOURCES}
)