forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
109 lines (107 loc) · 3.28 KB
/
azure-pipelines.yml
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
trigger:
- master
variables:
COMMON_CMAKE_ARGS: >-
-DLLVM_ENABLE_PROJECTS=clang;clang-tools-extra
-DPACKAGE_VENDOR=XYB
-DPACKAGE_VERSION=$(Build.SourceVersion)
jobs:
- job: Build_Windows_X86_Release
variables:
WORKING_DIR: 'build.x86'
timeoutInMinutes: 180
pool:
vmImage: vs2017-win2016
steps:
- checkout: self
- task: CMake@1
inputs:
workingDirectory: '$(WORKING_DIR)'
cmakeArgs: '$(COMMON_CMAKE_ARGS) -G "Visual Studio 15 2017" -A Win32 -Thost=x64 ..\\llvm'
- task: VSBuild@1
inputs:
solution: '$(WORKING_DIR)\\tools\\clang\\tools\\extra\\clang-tidy\\tool\\clang-tidy.vcxproj'
vsVersion: 15.0
platform: Win32
configuration: Release
maximumCpuCount: true
msbuildArchitecture: x64
- task: ArchiveFiles@2
inputs:
rootFolderOrFile: '$(WORKING_DIR)\\Release\\bin\\clang-tidy.exe'
includeRootFolder: false
archiveType: '7z'
archiveFile: '$(WORKING_DIR)\\Release\\bin\\clang-tidy.x86.7z'
replaceExistingArchive: true
- task: PublishPipelineArtifact@1
inputs:
targetPath: '$(WORKING_DIR)\\Release\\bin\\clang-tidy.x86.7z'
artifactName: 'clang-tidy.x86'
- job: Build_Windows_X64_Release
variables:
WORKING_DIR: 'build.x64'
timeoutInMinutes: 180
pool:
vmImage: vs2017-win2016
steps:
- checkout: self
- task: CMake@1
inputs:
workingDirectory: $(WORKING_DIR)
cmakeArgs: '$(COMMON_CMAKE_ARGS) -G "Visual Studio 15 2017" -A x64 -Thost=x64 ..\\llvm'
- task: VSBuild@1
inputs:
solution: '$(WORKING_DIR)\\tools\\clang\\tools\\extra\\clang-tidy\\tool\\clang-tidy.vcxproj'
vsVersion: 15.0
platform: x64
configuration: Release
maximumCpuCount: true
msbuildArchitecture: x64
- task: ArchiveFiles@2
inputs:
rootFolderOrFile: '$(WORKING_DIR)\\Release\\bin\\clang-tidy.exe'
includeRootFolder: false
archiveType: '7z'
archiveFile: '$(WORKING_DIR)\\Release\\bin\\clang-tidy.x64.7z'
replaceExistingArchive: true
- task: PublishPipelineArtifact@1
inputs:
targetPath: '$(WORKING_DIR)\\Release\\bin\\clang-tidy.x64.7z'
artifactName: 'clang-tidy.x64'
- job: Publish
dependsOn:
- Build_Windows_X86_Release
- Build_Windows_X64_Release
steps:
- checkout: self
persistCredentials: true
- task: DownloadPipelineArtifact@2
inputs:
targetPath: build
- task: GitHubRelease@0
displayName: 'Delete old release'
inputs:
gitHubConnection: xyb
repositoryName: 'xieyubo/llvm-project'
action: delete
tag: 'latest'
continueOnError: true
- task: CmdLine@2
displayName: 'Delete old tag'
inputs:
script: 'git push origin :refs/tags/latest'
- task: GitHubRelease@0
displayName: 'Create new release'
inputs:
gitHubConnection: xyb
repositoryName: 'xieyubo/llvm-project'
action: create
target: '$(Build.SourceVersion)'
tagSource: manual
tag: 'latest'
assets: |
build/clang-tidy.x86/clang-tidy.x86.7z
build/clang-tidy.x64/clang-tidy.x64.7z
assetUploadMode: delete
isPreRelease: true
addChangeLog: false