[Tizen] Unify dnetmemoryenumlib terms to match the codebase (#291)
[platform/upstream/coreclr.git] / eng / xplat-job.yml
1 parameters:
2   buildConfig: ''
3   archType: ''
4   osGroup: ''
5   osIdentifier: ''
6   name: ''
7   helixType: '(unspecified)'
8   container: ''
9   crossrootfsDir: ''
10
11   # arcade-specific parameters
12   condition: ''
13   continueOnError: false
14   dependsOn: ''
15   displayName: ''
16   timeoutInMinutes: ''
17   enableMicrobuild: ''
18   gatherAssetManifests: false
19
20   variables: {} ## any extra variables to add to the defaults defined below
21
22 jobs:
23 - template: /eng/common/templates/job/job.yml
24   parameters:
25
26     name: ${{ parameters.name }}
27     displayName: ${{ parameters.displayName }}
28
29     condition: ${{ parameters.condition }}
30     dependsOn: ${{ parameters.dependsOn }}
31     timeoutInMinutes: ${{ parameters.timeoutInMinutes }}
32     continueOnError: ${{ parameters.continueOnError }}
33
34     # Send telemetry for all builds
35     enableTelemetry: true
36     helixRepo: 'dotnet/coreclr'
37     helixType: ${{ parameters.helixType }}
38
39     enableMicrobuild: ${{ parameters.enableMicrobuild }}
40     enablePublishUsingPipelines: true
41
42     pool:
43
44       # Public Linux Build Pool
45       ${{ if and(eq(parameters.osGroup, 'Linux'), eq(variables['System.TeamProject'], 'public')) }}:
46         name:  NetCorePublic-Pool
47         queue: BuildPool.Ubuntu.1604.Amd64.Open
48
49       # Official Build Linux Pool
50       ${{ if and(eq(parameters.osGroup, 'Linux'), ne(variables['System.TeamProject'], 'public')) }}:
51         name: NetCoreInternal-Pool
52         queue: BuildPool.Ubuntu.1604.Amd64
53
54       # FreeBSD builds only in the internal project
55       ${{ if and(eq(parameters.osGroup, 'FreeBSD'), ne(variables['System.TeamProject'], 'public')) }}:
56         name: dnceng-freebsd-internal
57
58       # Public OSX Build Pool
59       ${{ if and(eq(parameters.osGroup, 'OSX'), ne(variables['System.TeamProject'], 'public')) }}:
60         name: Hosted Mac Internal
61
62       # Official Build OSX Pool
63       ${{ if and(eq(parameters.osGroup, 'OSX'), eq(variables['System.TeamProject'], 'public')) }}:
64         name: Hosted MacOS
65
66       # Official Build Windows Pool
67       ${{ if and(eq(parameters.osGroup, 'Windows_NT'), ne(variables['System.TeamProject'], 'public')) }}:
68         name: NetCoreInternal-Pool
69         queue: BuildPool.Windows.10.Amd64.VS2017
70
71       # Public Windows Build Pool
72       ${{ if and(eq(parameters.osGroup, 'Windows_NT'), eq(variables['System.TeamProject'], 'public')) }}:
73         name: NetCorePublic-Pool
74         queue: BuildPool.Windows.10.Amd64.VS2017.Open
75
76     workspace:
77       clean: all
78
79     ${{ if ne(parameters.container, '') }}:
80       ${{ if eq(parameters.container.registry, 'mcr') }}:
81         container: ${{ format('{0}:{1}', 'mcr.microsoft.com/dotnet-buildtools/prereqs', parameters.container.image) }}
82       ${{ if ne(parameters.container.registry, 'mcr') }}:
83         container: ${{ format('{0}:{1}', parameters.container.registry, parameters.container.image) }}
84
85     ${{ if eq(parameters.osGroup, 'Linux') }}:
86       agentOs: Ubuntu
87     ${{ if eq(parameters.osGroup, 'FreeBSD') }}:
88       agentOs: FreeBSD
89     ${{ if eq(parameters.osGroup, 'OSX') }}:
90       agentOs: MacOS
91     ${{ if eq(parameters.osGroup, 'Windows_NT') }}:
92       agentOs: Windows_NT
93
94     # Setting this results in the arcade job template including a step
95     # that gathers asset manifests and publishes them to pipeline
96     # storage. Only relevant for build jobs.
97     enablePublishBuildAssets: ${{ parameters.gatherAssetManifests }}
98
99     variables:
100     - name: buildConfig
101       value: ${{ parameters.buildConfig }}
102         
103     - ${{ if eq(parameters.buildConfig, 'checked') }}:
104       - name: buildConfigUpper
105         value: 'Checked'
106
107     - ${{ if eq(parameters.buildConfig, 'debug') }}:
108       - name: buildConfigUpper
109         value: 'Debug'
110
111     - ${{ if eq(parameters.buildConfig, 'release') }}:
112       - name: buildConfigUpper
113         value: 'Release'
114
115     - name: _BuildConfig
116       value: $(buildConfigUpper)
117
118     - name: archType
119       value: ${{ parameters.archType }}
120
121     - name: osGroup
122       value: ${{ parameters.osGroup }}
123
124     - name: osIdentifier
125       value: ${{ parameters.osIdentifier }}
126       
127     - ${{ if and(eq(variables['System.TeamProject'], 'internal'), ne(variables['Build.Reason'], 'PullRequest')) }}:
128       - name: _HelixSource
129         value: official/dotnet/coreclr/$(Build.SourceBranch)
130     - ${{ if and(eq(variables['System.TeamProject'], 'public'), eq(variables['Build.Reason'], 'PullRequest')) }}:
131       - name: _HelixSource
132         value: pr/dotnet/coreclr/$(Build.SourceBranch)
133     - ${{ if and(eq(variables['System.TeamProject'], 'public'), ne(variables['Build.Reason'], 'PullRequest')) }}:
134       - name: _HelixSource
135         value: ci/dotnet/coreclr/$(Build.SourceBranch)
136
137     - ${{ if ne(parameters.crossrootfsDir, '') }}:
138       - name: crossArg
139         value: 'cross'
140       - name: crossPackagesArg
141         value: '-__DoCrossArchBuild=1'
142       # This is only required for cross builds.
143       - name: ROOTFS_DIR
144         value: ${{ parameters.crossrootfsDir }}
145     - ${{ if eq(parameters.crossrootfsDir, '') }}:
146       - name: crossArg
147         value: ''
148       - name: crossPackagesArg
149         value: ''
150
151     - ${{ each variable in parameters.variables }}:
152       - ${{insert}}: ${{ variable }}
153
154     steps: ${{ parameters.steps }}