summaryrefslogtreecommitdiff
path: root/eng/xplat-job.yml
blob: db8cf3ba50d8ec10ee675a3e39fe75d87a7d08eb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
parameters:
  buildConfig: ''
  archType: ''
  osGroup: ''
  osGroupName: ''
  name: ''
  displayName: ''
  condition: ''
  dependsOn: ''
  containerName: ''
  timeoutInMinutes: ''
  helixType: ''
  crossrootfsDir: ''
  variables: {} ## any extra variables to add to the defaults defined below

jobs:
- template: /eng/common/templates/job/job.yml
  parameters:

    name: ${{ parameters.name }}
    displayName: ${{ parameters.displayName }}

    condition: ${{ parameters.condition }}
    dependsOn: ${{ parameters.dependsOn }}
    timeoutInMinutes: ${{ parameters.timeoutInMinutes }}

    helixRepo: 'dotnet/coreclr'
    helixType: ${{ parameters.helixType }}

    pool:
      ${{ if and(eq(parameters.osGroup, 'Linux'), eq(variables['System.TeamProject'], 'public')) }}:
        name: Hosted Ubuntu 1604
      ${{ if and(eq(parameters.osGroup, 'Linux'), ne(variables['System.TeamProject'], 'public')) }}:
        name: dnceng-linux-internal-temp
      ${{ if and(eq(parameters.osGroup, 'OSX'), ne(variables['System.TeamProject'], 'public')) }}:
        name: Hosted Mac Internal
      ${{ if and(eq(parameters.osGroup, 'OSX'), eq(variables['System.TeamProject'], 'public')) }}:
        name: Hosted MacOS
      ${{ if and(eq(parameters.osGroup, 'Windows_NT'), ne(variables['System.TeamProject'], 'public')) }}:
        name: dotnet-internal-temp
      ${{ if and(eq(parameters.osGroup, 'Windows_NT'), eq(variables['System.TeamProject'], 'public')) }}:
        name: dotnet-external-temp

    workspace:
      clean: all

    ${{ if ne(parameters.containerName, '') }}:
      container: ${{ parameters.containerName }}

    ${{ if eq(parameters.osGroup, 'Linux') }}:
      agentOs: Ubuntu
    ${{ if eq(parameters.osGroup, 'OSX') }}:
      agentOs: MacOS
    ${{ if eq(parameters.osGroup, 'Windows_NT') }}:
      agentOs: Windows_NT

    variables:
      - name: buildConfig
        value: ${{ parameters.buildConfig }}
        
      - ${{ if eq(parameters.buildConfig, 'checked') }}:
          - name: buildConfigUpper
            value: 'Checked'

      - ${{ if eq(parameters.buildConfig, 'debug') }}:
          - name: buildConfigUpper
            value: 'Debug'

      - ${{ if eq(parameters.buildConfig, 'release') }}:
          - name: buildConfigUpper
            value: 'Release'

      - name: archType
        value: ${{ parameters.archType }}

      - name: osGroup
        value: ${{ parameters.osGroup }}

      - name: osGroupName
        value: ${{ parameters.osGroupName }}
      
      - ${{ if ne(parameters.crossrootfsDir, '') }}:
          - name: crossArg
            value: 'cross'
          # This is only required for cross builds.
          - name: ROOTFS_DIR
            value: ${{ parameters.crossrootfsDir }}
      - ${{ if eq(parameters.crossrootfsDir, '') }}:
          - name: crossArg
            value: ''

      - ${{ each variable in parameters.variables }}:
        - ${{insert}}: ${{ variable }}

    steps: ${{ parameters.steps }}