Skip to content

Commit 755b72c

Browse files
committed
Attempt to consolidate build and test logic.
1 parent ec56ae7 commit 755b72c

2 files changed

Lines changed: 54 additions & 52 deletions

File tree

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
parameters:
2+
- name: buildConfigs
3+
type: object
4+
default:
5+
- pool:
6+
name: Azure-Pipelines-1ESPT-ExDShared
7+
image: windows-latest
8+
os: windows
9+
- pool:
10+
name: Azure-Pipelines-1ESPT-ExDShared
11+
image: ubuntu-latest
12+
os: linux
13+
- pool:
14+
name: Azure Pipelines
15+
image: macOS-latest
16+
os: macOS
17+
18+
stages:
19+
- stage: build
20+
displayName: Build And Test
21+
jobs:
22+
- ${{ each config in parameters.buildConfigs }}:
23+
- job: build_${{ config.pool.os }}
24+
displayName: Building and Testing on ${{ config.pool.os }}
25+
pool:
26+
name: ${{ config.pool.name }}
27+
image: ${{ config.pool.image }}
28+
os: ${{ config.pool.os }}
29+
steps:
30+
- checkout: self
31+
- task: UseDotNet@2
32+
displayName: Use .NET Core sdk 8.x
33+
inputs:
34+
version: 8.x
35+
- task: DotNetCoreCLI@2
36+
displayName: Install dependencies
37+
inputs:
38+
command: restore
39+
feedsToUse: select
40+
vstsFeed: Office
41+
includeNuGetOrg: false
42+
# 1ES PT requires explicit build task for Roslyn analysis. Auto-injected Roslyn task will use build logs from this build.
43+
- task: DotNetCoreCLI@2
44+
displayName: Build projects
45+
inputs:
46+
command: 'build'
47+
arguments: --no-restore
48+
projects: '**/*.csproj'
49+
- task: DotNetCoreCLI@2
50+
displayName: Test
51+
inputs:
52+
command: test
53+
arguments: --no-restore --no-build --verbosity normal
Lines changed: 1 addition & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,3 @@
1-
parameters:
2-
- name: buildConfigs
3-
type: object
4-
default:
5-
- pool:
6-
name: Azure-Pipelines-1ESPT-ExDShared
7-
image: windows-latest
8-
os: windows
9-
- pool:
10-
name: Azure-Pipelines-1ESPT-ExDShared
11-
image: ubuntu-latest
12-
os: linux
13-
- pool:
14-
name: Azure Pipelines
15-
image: macOS-latest
16-
os: macOS
17-
181
pr:
192
- main
203

@@ -46,38 +29,4 @@ extends:
4629
break: true
4730
analyzeInPipeline: true
4831
stages:
49-
- stage: build
50-
displayName: Build And Test
51-
jobs:
52-
- ${{ each config in parameters.buildConfigs }}:
53-
- job: build_${{ config.pool.os }}
54-
displayName: Building and Testing on ${{ config.pool.os }}
55-
pool:
56-
name: ${{ config.pool.name }}
57-
image: ${{ config.pool.image }}
58-
os: ${{ config.pool.os }}
59-
steps:
60-
- checkout: self
61-
- task: UseDotNet@2
62-
displayName: Use .NET Core sdk 8.x
63-
inputs:
64-
version: 8.x
65-
- task: DotNetCoreCLI@2
66-
displayName: Install dependencies
67-
inputs:
68-
command: restore
69-
feedsToUse: select
70-
vstsFeed: Office
71-
includeNuGetOrg: false
72-
# 1ES PT requires explicit build task for Roslyn analysis. Auto-injected Roslyn task will use build logs from this build.
73-
- task: DotNetCoreCLI@2
74-
displayName: Build projects
75-
inputs:
76-
command: 'build'
77-
arguments: --no-restore
78-
projects: '**/*.csproj'
79-
- task: DotNetCoreCLI@2
80-
displayName: Test
81-
inputs:
82-
command: test
83-
arguments: --no-restore --no-build --verbosity normal
32+
- template: BuildAndTest.yml

0 commit comments

Comments
 (0)