Skip to content

Commit

Permalink
Simplify yml templates
Browse files Browse the repository at this point in the history
  • Loading branch information
safern committed Oct 21, 2020
1 parent 4ac0d5c commit ba879fc
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 73 deletions.
43 changes: 18 additions & 25 deletions eng/pipelines/runtimelab.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,33 +42,26 @@ pr:
- THIRD-PARTY-NOTICES.TXT

stages:
- stage: Build
- stage: build
displayName: Build
jobs:
- template: /eng/pipelines/templates/build-job.yml
parameters:
osGroup: Windows_NT
archType: x64
pool:
vmImage: 'windows-latest'

#
# Build on Debug configuration
#
- template: /eng/pipelines/templates/platform-matrix.yml
- template: /eng/pipelines/templates/build-job.yml
parameters:
jobTemplate: /eng/pipelines/templates/build-job.yml
buildConfig: Debug
platforms:
- Linux_x64
- Windows_NT_x64
- OSX_x64
jobParameters:
isOfficialBuild: ${{ variables.isOfficialBuild }}
osGroup: OSX
archType: x64
pool:
vmImage: 'macOS-latest'

#
# Build on Release configuration
#
- template: /eng/pipelines/templates/platform-matrix.yml
- template: /eng/pipelines/templates/build-job.yml
parameters:
jobTemplate: /eng/pipelines/templates/build-job.yml
buildConfig: Release
platforms:
- Linux_x64
- Windows_NT_x64
- OSX_x64
jobParameters:
isOfficialBuild: ${{ variables.isOfficialBuild }}
osGroup: Linux
archType: x64
pool:
vmImage: 'ubuntu-latest'
15 changes: 10 additions & 5 deletions eng/pipelines/templates/build-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ parameters:
variables: {}
osGroup: ''
archType: ''
buildConfig: ''
container: ''
pool: {}
isOfficialBuild: ''
Expand All @@ -12,15 +11,22 @@ jobs:

- template: /eng/common/templates/job/job.yml
parameters:
displayName: ${{ format('{0} {1} {2}', parameters.osGroup, parameters.archType, parameters.buildConfig) }}
name: ${{ format('{0}_{1}_{2}', parameters.osGroup, parameters.archType, parameters.buildConfig) }}
displayName: ${{ format('{0} {1}', parameters.osGroup, parameters.archType) }}
name: ${{ format('{0}_{1}', parameters.osGroup, parameters.archType) }}
enableTelemetry: ${{ parameters.isOfficialBuild }}
helixRepo: dotnet/runtimelab
pool: ${{ parameters.pool }}
enablePublishBuildArtifacts: true
strategy:
matrix:
Release:
_BuildConfig: Release
Debug:
_BuildConfig: Debug

${{ if eq(parameters.runTests, true) }}:
testResultsFormat: vstest
testRunTitle: ${{ parameters.osGroup }}_${{ parameters.archType }}_$[ variables._BuildConfig ]

${{ if ne(parameters.container, '') }}:
${{ if eq(parameters.container.registry, 'mcr') }}:
Expand All @@ -29,7 +35,6 @@ jobs:
container: ${{ format('{0}:{1}', parameters.container.registry, parameters.container.image) }}

variables:
- _BuildConfig: ${{ parameters.buildConfig }}
- _buildScript: build.cmd

- ${{ if ne(parameters.osGroup, 'Windows_NT') }}:
Expand All @@ -43,6 +48,6 @@ jobs:
- script: $(_buildScript)
-ci
$(_testBuildArg)
-c ${{ parameters.buildConfig }}
-c $(_BuildConfig)
/p:TargetPlatform=${{ parameters.archType }}
displayName: Build and Test
43 changes: 0 additions & 43 deletions eng/pipelines/templates/platform-matrix.yml

This file was deleted.

0 comments on commit ba879fc

Please sign in to comment.