Skip to content

Commit 0a35552

Browse files
Add arcade to repo (#21)
1 parent e722431 commit 0a35552

File tree

119 files changed

+9906
-82
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

119 files changed

+9906
-82
lines changed

.azure/default-build.yml

Lines changed: 59 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
parameters:
22
agentOs: 'Windows'
33
poolVmImage: ''
4+
dependsOn: ''
45
beforeBuild: []
56
afterBuild: []
67
timeoutInMinutes: 60
@@ -9,57 +10,66 @@ parameters:
910
gtestFlags: '--gtest_output=xml:$(Build.ArtifactStagingDirectory)/testOut/'
1011

1112
jobs:
12-
- job: ${{ coalesce(parameters.jobName, parameters.agentOs) }}
13-
displayName: ${{ coalesce(parameters.jobDisplayName, parameters.agentOs) }}
14-
timeoutInMinutes: ${{ parameters.timeoutInMinutes }}
15-
pool:
16-
${{ if ne(parameters.poolVmImage, '') }}:
17-
vmImage: ${{ parameters.poolVmImage }}
18-
${{ if and(eq(parameters.poolVmImage, ''), eq(parameters.agentOs, 'macOS')) }}:
19-
vmImage: macOS-10.14
20-
${{ if and(eq(parameters.poolVmImage, ''), eq(parameters.agentOs, 'Linux')) }}:
21-
vmImage: ubuntu-16.04
22-
steps:
23-
- checkout: self
24-
clean: true
13+
- template: /eng/common/templates/job/job.yml
14+
parameters:
15+
name: ${{ coalesce(parameters.jobName, parameters.agentOs) }}
16+
displayName: ${{ coalesce(parameters.jobDisplayName, parameters.agentOs) }}
17+
dependsOn: ${{ parameters.dependsOn }}
18+
timeoutInMinutes: ${{ parameters.timeoutInMinutes }}
19+
${{ if and(eq(variables['System.TeamProject'], 'internal'), eq(parameters.agentOs, 'Windows')) }}:
20+
enablePublishBuildAssets: true
21+
enablePublishUsingPipelines: ${{ variables._PublishUsingPipelines }}
22+
enablePublishTestResults: true # publish test results to AzDO (populates AzDO Tests tab)
23+
enableTelemetry: true
24+
pool:
25+
${{ if eq(parameters.agentOs, 'macOS') }}:
26+
vmImage: macOS-10.14
27+
${{ if eq(parameters.agentOs, 'Linux') }}:
28+
vmImage: ubuntu-16.04
29+
${{ if eq(parameters.agentOs, 'Windows') }}:
30+
vmImage: windows-2019
31+
steps:
32+
- checkout: self
33+
clean: true
2534

26-
- task: CacheBeta@1
27-
inputs:
28-
key: vcpkg | ${{ parameters.agentOs }} | azure-pipelines.yml
29-
path: ./submodules/vcpkg/installed
30-
cacheHitVar: CACHE_RESTORED
31-
displayName: Cache vcpkg packages
35+
- task: CacheBeta@1
36+
inputs:
37+
key: vcpkg | ${{ parameters.agentOs }} | azure-pipelines.yml
38+
path: ./submodules/vcpkg/installed
39+
cacheHitVar: CACHE_RESTORED
40+
displayName: Cache vcpkg packages
3241

33-
- ${{ parameters.beforeBuild }}
42+
- ${{ parameters.beforeBuild }}
3443

35-
- task: CMake@1
36-
inputs:
37-
cmakeArgs: .. ${{ parameters.cMakeRunArgs }} -DCMAKE_TOOLCHAIN_FILE=../submodules/vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_BUILD_TYPE=${{ parameters.configuration }} -DUSE_CPPRESTSDK=true
38-
workingDirectory: 'build.${{ parameters.configuration }}'
39-
displayName: Create build files
40-
- task: CMake@1
41-
inputs:
42-
cmakeArgs: --build . --config ${{ parameters.configuration }}
43-
workingDirectory: 'build.${{ parameters.configuration }}'
44-
displayName: Build client
45-
- ${{ if eq(parameters.agentOs, 'macOS') }}:
46-
- bash: "./run-tests.sh ./build.${{ parameters.configuration }}/bin/signalrclienttests ${{ parameters.gtestFlags }}"
47-
condition: eq( variables['Agent.OS'], 'Darwin' )
48-
displayName: Run tests
49-
- ${{ if eq(parameters.agentOs, 'Linux') }}:
50-
- bash: "./run-tests.sh ./build.${{ parameters.configuration }}/bin/signalrclienttests ${{ parameters.gtestFlags }}"
51-
condition: eq( variables['Agent.OS'], 'Linux' )
52-
displayName: Run tests
53-
- ${{ if eq(parameters.agentOs, 'Windows') }}:
54-
- powershell: "& ./build.${{ parameters.configuration }}/bin/${{ parameters.configuration }}/signalrclienttests.exe ${{ parameters.gtestFlags }}"
55-
condition: eq( variables['Agent.OS'], 'Windows_NT' )
56-
displayName: Run tests
44+
- task: CMake@1
45+
inputs:
46+
cmakeArgs: .. ${{ parameters.cMakeRunArgs }} -DCMAKE_TOOLCHAIN_FILE=../submodules/vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_BUILD_TYPE=${{ parameters.configuration }} -DUSE_CPPRESTSDK=true
47+
workingDirectory: 'build.${{ parameters.configuration }}'
48+
displayName: Create build files
49+
- task: CMake@1
50+
inputs:
51+
cmakeArgs: --build . --config ${{ parameters.configuration }}
52+
workingDirectory: 'build.${{ parameters.configuration }}'
53+
displayName: Build client
54+
- ${{ if eq(parameters.agentOs, 'macOS') }}:
55+
- bash: "./run-tests.sh ./build.${{ parameters.configuration }}/bin/signalrclienttests ${{ parameters.gtestFlags }}"
56+
condition: eq( variables['Agent.OS'], 'Darwin' )
57+
displayName: Run tests
58+
- ${{ if eq(parameters.agentOs, 'Linux') }}:
59+
- bash: "./run-tests.sh ./build.${{ parameters.configuration }}/bin/signalrclienttests ${{ parameters.gtestFlags }}"
60+
condition: eq( variables['Agent.OS'], 'Linux' )
61+
displayName: Run tests
62+
- ${{ if eq(parameters.agentOs, 'Windows') }}:
63+
- powershell: "& ./build.${{ parameters.configuration }}/bin/${{ parameters.configuration }}/signalrclienttests.exe ${{ parameters.gtestFlags }}"
64+
condition: eq( variables['Agent.OS'], 'Windows_NT' )
65+
displayName: Run tests
5766

58-
- ${{ parameters.afterBuild }}
67+
- ${{ parameters.afterBuild }}
5968

60-
- task: PublishTestResults@2
61-
displayName: Publish test results
62-
condition: always()
63-
inputs:
64-
testRunner: junit
65-
testResultsFiles: '$(Build.ArtifactStagingDirectory)/testOut/**/*.xml'
69+
- task: PublishTestResults@2
70+
displayName: Publish test results
71+
condition: always()
72+
inputs:
73+
testRunner: junit
74+
testResultsFiles: '$(Build.ArtifactStagingDirectory)/testOut/**/*.xml'
75+
testRunTitle: ${{ parameters.agentOs }}-unit_test

Directory.Build.props

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project>
3+
<Import Project="Sdk.props" Sdk="Microsoft.DotNet.Arcade.Sdk" />
4+
5+
<PropertyGroup Condition="'$(CopyrightNetFoundation)' != ''">
6+
<Copyright>$(CopyrightNetFoundation)</Copyright>
7+
</PropertyGroup>
8+
<PropertyGroup>
9+
<PackageLicenseExpression>MIT</PackageLicenseExpression>
10+
</PropertyGroup>
11+
</Project>

Directory.Build.targets

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project>
3+
<Import Project="Sdk.targets" Sdk="Microsoft.DotNet.Arcade.Sdk" />
4+
</Project>

NuGet.config

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<packageSources>
4+
<clear />
5+
<add key="dotnet-core" value="https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json" />
6+
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
7+
</packageSources>
8+
</configuration>

azure-pipelines.yml

Lines changed: 111 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,116 @@
1+
variables:
2+
# used for SDL and arcade
3+
- name: _TeamName
4+
value: AspNetCore
5+
- name: _DotNetPublishToBlobFeed
6+
value: true
7+
- name: DOTNET_SKIP_FIRST_TIME_EXPERIENCE
8+
value: true
9+
- name: _PublishUsingPipelines
10+
value: true
11+
- name: _DotNetArtifactsCategory
12+
value: SIGNALR_CPP
13+
- name: _DotNetValidationArtifactsCategory
14+
value: SIGNALR_CPP
15+
- name: Build.Repository.Clean
16+
value: true
17+
- name: _BuildConfig
18+
value: 'Debug'
19+
# used for post-build phases, internal builds only
20+
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
21+
- group: DotNet-AspNet-SDLValidation-Params
22+
123
trigger:
224
- master
325

4-
jobs:
5-
- template: .azure/default-build.yml
6-
parameters:
7-
agentOs: Windows
8-
cMakeRunArgs: '-A x64'
9-
beforeBuild:
10-
- powershell: "& vcpkg.exe install cpprestsdk:x64-windows --vcpkg-root ./submodules/vcpkg"
11-
condition: ne(variables.CACHE_RESTORED, 'true')
12-
displayName: vcpkg install dependencies
26+
stages:
27+
- stage: build
28+
displayName: Build
29+
jobs:
30+
- template: .azure/default-build.yml
31+
parameters:
32+
agentOs: Windows
33+
jobName: Windows_Build_Test
34+
cMakeRunArgs: '-A x64'
35+
beforeBuild:
36+
# check if vcpkg exists on the machine before trying to build it
37+
- powershell: |
38+
if ((Get-Command vcpkg.exe -ErrorAction SilentlyContinue) -eq $null) {
39+
& ./submodules/vcpkg/bootstrap-vcpkg.bat
40+
}
41+
condition: ne(variables.CACHE_RESTORED, 'true')
42+
displayName: Bootstrap vcpkg
43+
- powershell: |
44+
if (Get-Command vcpkg.exe -ErrorAction SilentlyContinue) {
45+
& vcpkg.exe install cpprestsdk:x64-windows --vcpkg-root ./submodules/vcpkg
46+
} else {
47+
& ./submodules/vcpkg/vcpkg.exe install cpprestsdk:x64-windows --vcpkg-root ./submodules/vcpkg
48+
}
49+
condition: ne(variables.CACHE_RESTORED, 'true')
50+
displayName: vcpkg install dependencies
51+
afterBuild:
52+
# Create empty build manifest for Build Asset Registry
53+
- powershell: "eng/common/sdk-task.ps1 -restore -task GenerateBuildManifest /p:PackagesToPublishPattern=$(Build.ArtifactStagingDirectory)/*.nupkg /p:AssetManifestFilePath=$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)/AssetManifest/manifest.xml /p:ManifestBuildData=\"Location=https://dotnetfeed.blob.core.windows.net/aspnet-aspnetcore/index.json\""
54+
displayName: Generate Build Manifest
55+
condition: eq(and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')), 'true')
56+
57+
- template: .azure/default-build.yml
58+
parameters:
59+
agentOs: macOs
60+
jobName: Mac_Build_Test
61+
beforeBuild:
62+
# XCode 11 doesn't play nicely with gcc, workaround by using XCode 10. We can try updating to a newer XCode in the future
63+
# Once the problem has been resolved
64+
- script: sudo xcode-select --switch /Applications/Xcode_10.3.app
65+
- script: brew install gcc
66+
- bash: "./submodules/vcpkg/bootstrap-vcpkg.sh"
67+
condition: ne(variables.CACHE_RESTORED, 'true')
68+
displayName: Bootstrap vcpkg
69+
- bash: "./submodules/vcpkg/vcpkg install cpprestsdk"
70+
condition: ne(variables.CACHE_RESTORED, 'true')
71+
displayName: vcpkg install dependencies
72+
73+
- template: .azure/default-build.yml
74+
parameters:
75+
agentOs: Linux
76+
jobName: Linux_Build_Test
77+
beforeBuild:
78+
- script: sudo vcpkg install cpprestsdk boost-system boost-chrono boost-thread --vcpkg-root ./submodules/vcpkg
79+
condition: ne(variables.CACHE_RESTORED, 'true')
80+
displayName: vcpkg install dependencies
1381

14-
- template: .azure/default-build.yml
15-
parameters:
16-
agentOs: macOs
17-
beforeBuild:
18-
# XCode 11 doesn't play nicely with gcc workaround by using XCode 10. We can try updating to a newer XCode in the future
19-
# Once the problem has been resolved
20-
- script: sudo xcode-select --switch /Applications/Xcode_10.3.app
21-
- script: brew install gcc
22-
- bash: "./submodules/vcpkg/bootstrap-vcpkg.sh"
23-
displayName: Bootstrap vcpkg
24-
- bash: "./submodules/vcpkg/vcpkg install cpprestsdk"
25-
condition: ne(variables.CACHE_RESTORED, 'true')
26-
displayName: vcpkg install dependencies
82+
# Publish to the BAR
83+
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
84+
- template: /eng/common/templates/job/publish-build-assets.yml
85+
parameters:
86+
dependsOn:
87+
- Windows_Build_Test
88+
- Mac_Build_Test
89+
- Linux_Build_Test
90+
pool:
91+
vmImage: vs2017-win2016
92+
publishUsingPipelines: ${{ variables._PublishUsingPipelines }}
93+
enablePublishBuildArtifacts: true # publish artifacts/log files
94+
continueOnError: true
2795

28-
- template: .azure/default-build.yml
29-
parameters:
30-
agentOs: Linux
31-
beforeBuild:
32-
- script: sudo vcpkg install cpprestsdk boost-system boost-chrono boost-thread --vcpkg-root ./submodules/vcpkg
33-
condition: ne(variables.CACHE_RESTORED, 'true')
34-
displayName: vcpkg install dependencies
96+
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
97+
- template: /eng/common/templates/post-build/post-build.yml
98+
parameters:
99+
enableSigningValidation: false
100+
enableNugetValidation: false
101+
publishInstallersAndChecksums: false
102+
# This is to enable SDL runs as part of Post-Build Validation Stage
103+
SDLValidationParameters:
104+
enable: true
105+
continueOnError: false
106+
params: ' -SourceToolsList @("policheck","credscan")
107+
-TsaInstanceURL $(_TsaInstanceURL)
108+
-TsaProjectName $(_TsaProjectName)
109+
-TsaNotificationEmail $(_TsaNotificationEmail)
110+
-TsaCodebaseAdmin $(_TsaCodebaseAdmin)
111+
-TsaBugAreaPath $(_TsaBugAreaPath)
112+
-TsaIterationPath $(_TsaIterationPath)
113+
-TsaRepositoryName "AspNetCore"
114+
-TsaCodebaseName "AspNetCore"
115+
-TsaPublish $True
116+
-PoliCheckAdditionalRunConfigParams @("UserExclusionPath < $(Build.SourcesDirectory)/eng/PoliCheckExclusions.xml")'

eng/PoliCheckExclusions.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<PoliCheckExclusions>
2+
<Exclusion Type="FolderPathFull">SUBMODULES</Exclusion>
3+
</PoliCheckExclusions>

eng/Version.Details.xml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Dependencies>
3+
<ProductDependencies>
4+
</ProductDependencies>
5+
<ToolsetDependencies>
6+
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="5.0.0-beta.19576.2">
7+
<Uri>https://github.com/dotnet/arcade</Uri>
8+
<Sha>e1f099bf18a14e8ef5dc50f1a90078839aa102c8</Sha>
9+
</Dependency>
10+
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="5.0.0-beta.19576.2">
11+
<Uri>https://github.com/dotnet/arcade</Uri>
12+
<Sha>e1f099bf18a14e8ef5dc50f1a90078839aa102c8</Sha>
13+
</Dependency>
14+
</ToolsetDependencies>
15+
</Dependencies>

eng/Versions.props

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<VersionPrefix>1.0.0</VersionPrefix>
5+
<PreReleaseVersionLabel>preview1</PreReleaseVersionLabel>
6+
</PropertyGroup>
7+
</Project>

eng/common/CIBuild.cmd

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
@echo off
2+
powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0Build.ps1""" -restore -build -test -sign -pack -publish -ci %*"

0 commit comments

Comments
 (0)