Welcome to mirror list, hosted at ThFree Co, Russian Federation.

azure-pipelines.yml « eng - github.com/mono/linker.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 8166f7d4530af672f43f64b157bd8a7fdf76ef07 (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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
trigger:
  batch: true
  branches:
    include:
    - main
    - release/*
    - mono-*

pr:
  branches:
    include:
    - main
    - release/*
    - mono-*
    - feature/*

variables:
- name: officialBuild
  value: ${{ and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}
- name: _BuildConfig
  value: Release
- name: _BuildArgs
  value:
- name: _DotNetArtifactsCategory
  value: .NETCore
- ${{ if eq(variables.officialBuild, 'true') }}:
  - name: _BuildArgs
    value: ${{ format('{0} /p:OfficialBuildId=$(Build.BuildNumber) /p:Test=false /p:IntegrationTest=false', variables['_BuildArgs']) }}
  # Provide HelixApiAccessToken for telemetry
  - group: DotNet-HelixApi-Access
  - name: Codeql.Enabled
    value: True
  - name: Codeql.TSAEnabled
    value: True

stages:
- stage: build
  displayName: Build
  jobs:
  - template: /eng/common/templates/jobs/jobs.yml
    parameters:

      enableTelemetry: true # send helix telemetry
      helixRepo: dotnet/linker
      enablePublishUsingPipelines: true
      enablePublishBuildArtifacts: true # publish build logs to pipeline storage
      ${{ if eq(variables.officialBuild, 'false') }}:
        enablePublishTestResults: true
        testResultsFormat: vstest
      enablePublishBuildAssets: true # generate build manifests and publish to BAR in internal builds
      enableMicrobuild: true # only affects internal builds
      # See https://github.com/dotnet/source-build/issues/2049
      # enableSourceBuild: true

      jobs:

      - job: Windows_NT
        pool:
          ${{ if eq(variables.officialBuild, 'false') }}:
            vmImage: windows-latest
          ${{ if eq(variables.officialBuild, 'true') }}:
            name: NetCore1ESPool-Internal
            demands: ImageOverride -equals 1es-windows-2019
        variables:
          - ${{ if eq(variables.officialBuild, 'false') }}:
            - _SignType: test
            - _PublishArgs: ''
          - ${{ if eq(variables.officialBuild, 'true') }}:
            - group: DotNet-Blob-Feed
            - _TeamName: .NET # required by microbuild install step
            - _SignType: real # used in the arcade templates that install microbuild.
            - _DotNetPublishToBlobFeed: true # used by arcade templates that gather build asset manifests
            - _PublishArgs: /p:DotNetPublishToBlobFeed=$(_DotNetPublishToBlobFeed)
                            /p:DotNetPublishBlobFeedUrl=https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json
                            /p:DotNetPublishBlobFeedKey=$(dotnetfeed-storage-access-key-1)
                            /p:DotNetArtifactsCategory=$(_DotNetArtifactsCategory)
                            /p:DotNetPublishUsingPipelines=true
          - DotNetSignType: ${{ format('{0}', variables._SignType) }} # DotNetSignType defaults to real if not specified
        steps:
        - checkout: self
          submodules: true
        - script: eng\common\cibuild.cmd -projects $(Build.SourcesDirectory)\illink.sln
                  -configuration $(_BuildConfig) $(_BuildArgs) $(_PublishArgs)
                  -integrationTest
                  -nodeReuse "$false" # https://github.com/Microsoft/vstest/issues/1503
          env:
            # https://github.com/Microsoft/vstest/issues/1503#issuecomment-410732193
            MSBUILDENSURESTDOUTFORTASKPROCESSES: 1
          ${{ if eq(variables.officialBuild, 'false') }}:
            displayName: Build illink.sln $(_BuildConfig)
          ${{ if eq(variables.officialBuild, 'true') }}:
            displayName: Build and publish illink.sln $(_BuildConfig)

      - job: SourceBuild_Managed
        displayName: Source-Build (Managed)
        pool:
          ${{ if eq(variables.officialBuild, 'false' )}}:
            vmImage: ubuntu-latest
          ${{ if eq(variables.officialBuild, 'true' )}}:
            name: NetCore1ESPool-Internal
            demands: ImageOverride -equals Build.Ubuntu.1804.Amd64
        container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:centos-7'
        workspace:
          clean: all
        steps:
        - checkout: self
          submodules: true
        - template: /eng/common/templates/steps/source-build.yml
          parameters:
            enablePublishTestResults: true

      - ${{ if eq(variables.officialBuild, 'false') }}:
        - job: Linux
          condition: eq(variables.officialBuild, 'false')
          pool:
            vmImage: ubuntu-latest
          steps:
          - checkout: self
            submodules: true
          - script: eng/common/cibuild.sh --projects $(Build.SourcesDirectory)/illink.sln
                    --configuration $(_BuildConfig) $(_BuildArgs)
                    --integrationTest
                    --nodeReuse false # https://github.com/Microsoft/vstest/issues/1503
            env:
              # https://github.com/Microsoft/vstest/issues/1503#issuecomment-410732193
              MSBUILDENSURESTDOUTFORTASKPROCESSES: 1
            displayName: Build illink.sln $(_BuildConfig)

      - ${{ if eq(variables.officialBuild, 'false') }}:
        - job: macOS
          pool:
              vmImage: macOS-latest
          steps:
          - checkout: self
            submodules: true
          - script: eng/common/cibuild.sh --projects $(Build.SourcesDirectory)/illink.sln
                    --configuration $(_BuildConfig) $(_BuildArgs)
                    --integrationTest
                    --nodeReuse false # https://github.com/Microsoft/vstest/issues/1503
            env:
              # https://github.com/Microsoft/vstest/issues/1503#issuecomment-410732193
              MSBUILDENSURESTDOUTFORTASKPROCESSES: 1
            displayName: Build illink.sln $(_BuildConfig)

  - ${{ if eq(variables.officialBuild, 'false') }}:
    - job: Lint
      pool:
        vmImage: ubuntu-latest
      steps:
      - checkout: self
        submodules: true
      - script: ./lint.sh --verify-no-changes --verbosity diagnostic

# Post-Build Arcade logic
- ${{ if eq(variables.officialBuild, 'true') }}:
  - template: /eng/common/templates/post-build/post-build.yml
    parameters:
      publishingInfraVersion: 3