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

azure-pipelines.yml - github.com/dotnet/llvm-project.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: cfe657dee04098ccf1a1c74f2b543aeda1f437b4 (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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
trigger:
  batch: true
  branches:
    include:
    - release/11.x

pr:
  branches:
    include:
    - release/11.x

variables:
- template: eng/common-variables.yml

stages:
- stage: build
  displayName: Build
  jobs:
  - template: /eng/common/templates/jobs/jobs.yml
    parameters:
      enablePublishBuildArtifacts: true
      enablePublishBuildAssets: true
      enablePublishUsingPipelines: true
      variables:
        - _BuildConfig: Release
      jobs:

      ############ LINUX BUILD ############
      - job: Build_Linux
        displayName: Linux
        timeoutInMinutes: 180
        strategy:
          matrix:
            x64:
              assetManifestOS: linux
              assetManifestPlatform: x64
              imagename: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-7-bfcd90a-20200121150017
              rootfs: 
              archflag: --arch x64
              LLVMTableGenArg: 
              ClangTableGenArg: 
            arm64:
              assetManifestOS: linux
              assetManifestPlatform: arm64
              imagename: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-cross-arm64-cfdd435-20200121150126
              rootfs: /crossrootfs/arm64
              archflag: --arch arm64
              LLVMTableGenArg: /p:LLVMTableGenPath=$(Build.SourcesDirectory)/artifacts/obj/BuildRoot-x64/bin/llvm-tblgen
              ClangTableGenArg: /p:ClangTableGenPath=$(Build.SourcesDirectory)/artifacts/obj/BuildRoot-x64/bin/clang-tblgen
            arm:
              assetManifestOS: linux
              assetManifestPlatform: arm
              imagename: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-cross-09ec757-20200320131433
              rootfs: /crossrootfs/arm
              archflag: --arch arm
              LLVMTableGenArg: /p:LLVMTableGenPath=$(Build.SourcesDirectory)/artifacts/obj/BuildRoot-x64/bin/llvm-tblgen
              ClangTableGenArg: /p:ClangTableGenPath=$(Build.SourcesDirectory)/artifacts/obj/BuildRoot-x64/bin/clang-tblgen
        pool:
          ${{ if eq(variables['System.TeamProject'], 'public') }}:
            vmImage: ubuntu-20.04
          ${{ if eq(variables['System.TeamProject'], 'internal') }}:
            name: NetCore1ESPool-Internal
            demands: ImageOverride -equals Build.Ubuntu.1804.Amd64
        container:
          image: $(imagename)
        steps:
        - bash: |
            set -ex
            git clean -ffdx
            git reset --hard HEAD
          displayName: 'Clean up working directory'

        - bash: |
            ./build.sh --ci --restore --build --arch x64 -configuration $(_BuildConfig) $(_InternalBuildArgs) /p:BuildLLVMTableGenOnly=true
          displayName: 'Build host llvm-tblgen for cross-compiling'
          condition: and(succeeded(), ne(variables['assetManifestPlatform'], 'x64'))

        - bash: |
            ./build.sh --ci --restore --build --pack $(archflag) --configuration $(_BuildConfig) $(_InternalBuildArgs) $(LLVMTableGenArg) $(ClangTableGenArg)
          displayName: 'Build and package'
          env:
            ROOTFS_DIR: $(rootfs)

        - bash: |
            ./eng/common/build.sh --ci --restore --publish --configuration $(_BuildConfig) $(_InternalBuildArgs) /p:AssetManifestOS=$(assetManifestOS) /p:PlatformName=$(assetManifestPlatform) --projects $(Build.SourcesDirectory)/llvm.proj
          displayName: Publish packages
          condition: and(succeeded(), ne(variables['System.TeamProject'], 'public'), ne(variables['Build.Reason'], 'PullRequest'))

      ############ MACOS BUILD ############
      - job: Build_macOS
        displayName: macOS
        timeoutInMinutes: 180
        strategy:
          matrix:
            x64:
              assetManifestOS: osx
              assetManifestPlatform: x64
              archflag: --arch x64
              LLVMTableGenArg: 
              ClangTableGenArg: 
            arm64:
              assetManifestOS: osx
              assetManifestPlatform: arm64
              archflag: --arch arm64
              LLVMTableGenArg: /p:LLVMTableGenPath=$(Build.SourcesDirectory)/artifacts/obj/BuildRoot-x64/bin/llvm-tblgen
              ClangTableGenArg: /p:ClangTableGenPath=$(Build.SourcesDirectory)/artifacts/obj/BuildRoot-x64/bin/clang-tblgen
        pool:
          vmImage: macOS-10.15
        steps:
        - bash: |
            set -ex
            git clean -ffdx
            git reset --hard HEAD
          displayName: 'Clean up working directory'

        - bash: |
            ./build.sh --ci --restore --build --arch x64 -configuration $(_BuildConfig) $(_InternalBuildArgs) /p:BuildLLVMTableGenOnly=true
          displayName: 'Build host llvm-tblgen for cross-compiling'
          condition: and(succeeded(), ne(variables['assetManifestPlatform'], 'x64'))

        - bash: |
            ./build.sh --ci --restore --build --pack $(archflag) --configuration $(_BuildConfig) $(_InternalBuildArgs) $(LLVMTableGenArg) $(ClangTableGenArg)
          displayName: 'Build and package'

        - bash: 
            ./eng/common/build.sh --ci --restore --publish --configuration $(_BuildConfig) $(_InternalBuildArgs) /p:AssetManifestOS=$(assetManifestOS) /p:PlatformName=$(assetManifestPlatform) --projects $(Build.SourcesDirectory)/llvm.proj
          displayName: Publish packages
          condition: and(succeeded(), ne(variables['System.TeamProject'], 'public'), ne(variables['Build.Reason'], 'PullRequest'))

      ############ WINDOWS BUILD ############
      - job: Build_Windows
        displayName: Windows
        timeoutInMinutes: 180
        strategy:
          matrix:
            x64:
              assetManifestOS: win
              assetManifestPlatform: x64
              archflag: -arch x64
              LLVMTableGenArg:
              ClangTableGenArg:
            arm64:
              assetManifestOS: win
              assetManifestPlatform: arm64
              archflag: -arch arm64
              LLVMTableGenArg: /p:LLVMTableGenPath=$(Build.SourcesDirectory)\artifacts\obj\BuildRoot-x64\bin\llvm-tblgen.exe
              ClangTableGenArg: /p:ClangTableGenPath=$(Build.SourcesDirectory)\artifacts\obj\BuildRoot-x64\bin\clang-tblgen.exe
            arm:
              assetManifestOS: win
              assetManifestPlatform: arm
              archflag: -arch arm
              LLVMTableGenArg: /p:LLVMTableGenPath=$(Build.SourcesDirectory)\artifacts\obj\BuildRoot-x64\bin\llvm-tblgen.exe
              ClangTableGenArg: /p:ClangTableGenPath=$(Build.SourcesDirectory)\artifacts\obj\BuildRoot-x64\bin\clang-tblgen.exe
        pool:
          ${{ if eq(variables['System.TeamProject'], 'public') }}:
            name: NetCore1ESPool-Public
            demands: ImageOverride -equals Build.Windows.Amd64.VS2022.Pre.Open
          ${{ if eq(variables['System.TeamProject'], 'internal') }}:
            name: NetCore1ESPool-Internal
            demands: ImageOverride -equals Build.Windows.Amd64.VS2022.Pre
        steps:
        - script: |
            git clean -ffdx
            git reset --hard HEAD
          displayName: 'Clean up working directory'

        - powershell: eng\build.ps1 -ci -restore -build -arch x64 -configuration $(_BuildConfig) $(_InternalBuildArgs) /p:BuildLLVMTableGenOnly=true
          displayName: 'Build host llvm-tblgen for cross-compiling'
          condition: and(succeeded(), ne(variables['assetManifestPlatform'], 'x64'))

        - powershell: eng\build.ps1 -ci -restore -build -pack $(archflag) -configuration $(_BuildConfig) $(_InternalBuildArgs) $(LLVMTableGenArg) $(ClangTableGenArg)
          displayName: 'Build and package'

        - powershell: eng\common\build.ps1 -ci -restore -publish -configuration $(_BuildConfig) $(_InternalBuildArgs) /p:AssetManifestOS=$(assetManifestOS) /p:PlatformName=$(assetManifestPlatform) -projects $(Build.SourcesDirectory)\llvm.proj
          displayName: Publish packages
          condition: and(succeeded(), ne(variables['System.TeamProject'], 'public'), ne(variables['Build.Reason'], 'PullRequest'))

############ POST BUILD ARCADE LOGIC ############
- ${{ if and(ne(variables['System.TeamProject'], 'public'), ne(variables['Build.Reason'], 'PullRequest')) }}:
  - template: /eng/common/templates/post-build/post-build.yml
    parameters:
      publishingInfraVersion: 3
      enableSourceLinkValidation: false
      enableSigningValidation: false
      enableSymbolValidation: false
      enableNugetValidation: true