<!-- 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>
<PropertyGroup>
- <RepositoryUrl>https://github.com/dotnet/diagnostics.git</RepositoryUrl>
- <RepositoryRawUrl>$(RepositoryUrl)</RepositoryRawUrl>
<PackageProjectUrl>$(RepositoryUrl)</PackageProjectUrl>
<PackageLicenseUrl>http://go.microsoft.com/fwlink/?LinkId=529443</PackageLicenseUrl>
<PackageIconUrl>http://go.microsoft.com/fwlink/?LinkID=288859</PackageIconUrl>
- <SourceLinkProvider>GitHub</SourceLinkProvider>
<NoPackageAnalysis>true</NoPackageAnalysis>
</PropertyGroup>
</Project>
:: Test components
if %__Test% EQU 1 (
:: Install the other versions of .NET Core runtime we are going to test on (2.0.9 and 1.1.9)
- powershell -ExecutionPolicy ByPass -command "& """%__ProjectDir%\.dotnet\dotnet-install.ps1""" -Version 2.0.9 -Architecture %__BuildArch% -SkipNonVersionedFiles -Runtime dotnet -InstallDir %__ProjectDir%\.dotnet"
- powershell -ExecutionPolicy ByPass -command "& """%__ProjectDir%\.dotnet\dotnet-install.ps1""" -Version 1.1.9 -Architecture %__BuildArch% -SkipNonVersionedFiles -Runtime dotnet -InstallDir %__ProjectDir%\.dotnet"
+ powershell -ExecutionPolicy ByPass -NoProfile -command "& """%__ProjectDir%\.dotnet\dotnet-install.ps1""" -Version 2.0.9 -Architecture %__BuildArch% -SkipNonVersionedFiles -Runtime dotnet -InstallDir %__ProjectDir%\.dotnet"
+ powershell -ExecutionPolicy ByPass -NoProfile -command "& """%__ProjectDir%\.dotnet\dotnet-install.ps1""" -Version 1.1.9 -Architecture %__BuildArch% -SkipNonVersionedFiles -Runtime dotnet -InstallDir %__ProjectDir%\.dotnet"
:: Run the xunit tests
- powershell -ExecutionPolicy ByPass -command "& """%__ProjectDir%\eng\common\Build.ps1""" -test -configuration %__BuildType% -verbosity %__Verbosity% %__TestArgs%"
+ powershell -ExecutionPolicy ByPass -NoProfile -command "& """%__ProjectDir%\eng\common\Build.ps1""" -test -configuration %__BuildType% -verbosity %__Verbosity% %__TestArgs%"
exit /b %ERRORLEVEL
)
exit /b 0
set "__args=%__args:-test=%"
:: build managed components
-powershell -ExecutionPolicy ByPass -command "& """%~dp0common\Build.ps1""" %__args%"
+powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0common\Build.ps1""" %__args%"
if NOT '%ERRORLEVEL%' == '0' exit /b %ERRORLEVEL%
:: build native componments and test managed/native
--- /dev/null
+<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>
@echo off
-call %~dp0Build.cmd -restore -build -test -ci %*
+call %~dp0Build.cmd -restore -build -test -publish -sign -pack -ci %*
exit /b %ErrorLevel%
"strongName": "MsSharedLib72",
"values": [
"bin/SOS.NETCore/netcoreapp1.0/SOS.NETCore.dll",
+ "bin/Microsoft.Diagnostic.TestHelpers/netcoreapp2.0/Microsoft.Diagnostic.TestHelpers.dll"
]
},
{
"certificate": "NuGet",
"strongName": null,
"values": [
- "packages/*.nupkg"
+ "packages/Shipping/*.nupkg"
]
}
],
"Microsoft.SymbolStore.dll",
"System.Collections.Immutable.dll",
"System.Net.Http.dll",
- "System.Reflection.Metadata.dll",
+ "System.Reflection.Metadata.dll"
]
}
<VersionPrefix>1.0.0</VersionPrefix>
<PreReleaseVersionLabel>beta</PreReleaseVersionLabel>
+ <RoslynToolsSignToolVersion>1.0.0-beta2-63127-01</RoslynToolsSignToolVersion>
+ <MicrosoftNetCompilersVersion>2.8.0-beta6-62830-08</MicrosoftNetCompilersVersion>
<UsingToolNetFrameworkReferenceAssemblies>true</UsingToolNetFrameworkReferenceAssemblies>
<UsingToolXliff>false</UsingToolXliff>
<PropertyGroup>
<RestoreSources>
$(RestoreSources);
- https://dotnet.myget.org/F/symstore/api/v3/index.json;
- https://dotnet.myget.org/F/roslyn-tools/api/v3/index.json;
https://dotnet.myget.org/F/dotnet-core/api/v3/index.json;
https://dotnet.myget.org/F/dotnet-buildtools/api/v3/index.json
</RestoreSources>
parameters:
phaseName: ''
agentOs: Windows_NT
- buildReason: IndividualCI
- queue: {}
dockerImage: ''
enableTelemetry: true
+ queue: {}
useEsrpSigning: true
phases:
- template: /eng/common/templates/phases/base.yml
parameters:
agentOs: ${{ parameters.agentOs }}
- buildReason: ${{ parameters.buildReason }}
buildConfig: $(_BuildConfig)
phaseName: ${{ parameters.phaseName }}
enableTelemetry: ${{ parameters.enableTelemetry }}
- fetchDepth: 5
helixType: build/product
- ${{ if notIn(parameters.buildReason, 'IndividualCI', 'BatchedCI', 'PullRequest') }}:
+ ${{ if notIn(variables['Build.Reason'], 'IndividualCI', 'BatchedCI', 'PullRequest') }}:
helixSource: official/dotnet/arcade/$(Build.SourceBranch)
- ${{ if in(parameters.buildReason, 'IndividualCI', 'BatchedCI', 'PullRequest') }}:
+ ${{ 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(parameters.buildReason, 'IndividualCI', 'BatchedCI', 'PullRequest') }}:
- _PublishBlobFeedUrl: https://dotnetfeed.blob.core.windows.net/dotnet-tools-internal/index.json
+ ${{ 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(parameters.buildReason, 'IndividualCI', 'BatchedCI', 'PullRequest') }}:
+ ${{ 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(parameters.buildReason, 'IndividualCI', 'BatchedCI', 'PullRequest') }}:
+ ${{ if in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI', 'PullRequest') }}:
_PublishArgs: ''
steps:
- - ${{ if eq(parameters.agentOs, 'Windows_NT') }}:
- - ${{ if notIn(parameters.buildReason, 'IndividualCI', 'BatchedCI', 'PullRequest') }}:
- - 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
+ - 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)
--docker-image $(_DockerImageName)
--source-directory $(Build.SourcesDirectory)
--container-name diagnostics-$(Build.BuildId)
- --restore --build --test
--configuration $(_BuildConfig)
--architecture $(_BuildArch)
--prepareMachine
/p:SignType=$(_SignType)
$(_PublishArgs)
+ name: Build_Test
displayName: Docker Build / Test
env:
OfficialBuildId: $(BUILD.BUILDNUMBER)
- ${{ if eq(parameters.agentOs, 'Darwin') }}:
- script: $(Build.SourcesDirectory)/eng/cibuild.sh
- --restore --build --test
--configuration $(_BuildConfig)
--architecture $(_BuildArch)
--prepareMachine
/p:SignType=$(_SignType)
$(_PublishArgs)
+ name: Build_Test
displayName: Build / Test
env:
OfficialBuildId: $(BUILD.BUILDNUMBER)
condition: succeeded()
- - ${{ if notIn(parameters.buildReason, 'IndividualCI', 'BatchedCI', 'PullRequest') }}:
- - task: CopyFiles@2
- displayName: Gather Logs
- inputs:
- SourceFolder: '$(Build.SourcesDirectory)/artifacts'
- Contents: '**/*log'
- TargetFolder: '$(Build.StagingDirectory)/BuildLogs'
- continueOnError: true
- condition: always()
+ - 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()
- - task: PublishBuildArtifacts@1
- displayName: Publish Logs to VSTS
- inputs:
- PathtoPublish: '$(Build.StagingDirectory)/BuildLogs'
- PublishLocation: Container
- # Should be able to use a single definition of ArtifactName here instead of conditioned on
- # agentOs once variables are available in the template evaluation context.
- ${{ 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: 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()
fi
fi
-"$scriptroot/build.sh" --ci $@
+"$scriptroot/build.sh" --restore --build --test --publish --pack --ci $@
if [[ $? != 0 ]]; then
exit 1
fi
parameters:
agentOs: Windows_NT
- buildReason: IndividualCI
buildConfig: ''
+ clean: true
dockerImage: ''
enableTelemetry: ''
fetchDepth: ''
${{ insert }}: ${{ parameters.phase.variables }}
steps:
- checkout: self
- clean: true
+ clean: ${{ parameters.clean }}
${{ if ne(parameters.fetchDepth, '') }}:
fetchDepth: ${{ parameters.fetchDepth }}
- - ${{ if notIn(parameters.buildReason, 'IndividualCI', 'BatchedCI', 'PullRequest') }}:
- - ${{ 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')) }}:
+ - 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 in(parameters.buildReason, 'IndividualCI', 'BatchedCI', 'PullRequest') }}:
- - ${{ parameters.phase.steps }}
--- /dev/null
+# build-reason.yml
+# Description: runs steps if build.reason condition is valid. conditions is a string of valid build reasons
+# to include steps (',' separated).
+parameters:
+ conditions: ''
+ steps: []
+
+steps:
+ - ${{ if and( not(startsWith(parameters.conditions, 'not')), contains(parameters.conditions, variables['build.reason'])) }}:
+ - ${{ parameters.steps }}
+ - ${{ if and( startsWith(parameters.conditions, 'not'), not(contains(parameters.conditions, variables['build.reason']))) }}:
+ - ${{ parameters.steps }}
"version": "2.1.300"
},
"msbuild-sdks": {
- "RoslynTools.RepoToolset": "1.0.0-beta2-62810-01"
+ "RoslynTools.RepoToolset": "1.0.0-beta2-63206-01"
}
}
@echo off
-powershell -ExecutionPolicy ByPass -command "& """%~dp0eng\common\Build.ps1""" -pack %*"
+powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0eng\common\Build.ps1""" -pack %*"
exit /b %ErrorLevel%