-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
132 lines (118 loc) · 5.69 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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
parameters:
- name: vsVersionList
type: object
default:
- name: "vs2008"
chocoPackages:
- "msvisualcpp-2008sp1express"
- "msvisualcpp-2010express"
displayName: "Visual C++ Express 2008"
# https://cmake.org/cmake/help/latest/generator/Visual%20Studio%209%202008.html
# Note This generator is deprecated and will be removed in a future version of CMake. It will still be possible to build with VS 9 2008 tools using the Visual Studio 14 2015 generator (or above, and with VS 10 2010 also installed) with CMAKE_GENERATOR_TOOLSET set to v90, or by using the NMake Makefiles generator.
cmakeGenName: "Visual Studio 14 2015"
cmakeGenToolsetArg: "-T v90"
extraPath: "%SystemRoot%\\Microsoft.NET\\Framework\\v4.0.30319"
has64: false
- name: "vs2010"
chocoPackages:
- "msvisualcpp-2010express"
displayName: "Visual C++ Express 2010"
# https://cmake.org/cmake/help/latest/generator/Visual%20Studio%2010%202010.html
# Removed. This once generated Visual Studio 10 2010 project files, but the generator has been removed since CMake 3.25. It is still possible to build with VS 10 2010 tools using the Visual Studio 14 2015 (or above) generator with CMAKE_GENERATOR_TOOLSET set to v100, or by using the NMake Makefiles generator.
cmakeGenName: "Visual Studio 14 2015"
cmakeGenToolsetArg: "-T v100"
extraPath: "%SystemRoot%\\Microsoft.NET\\Framework\\v4.0.30319"
has64: false
- name: "vs2012"
chocoPackages:
- "msvisualstudio-2012express"
- "msvisualstudio-2013express" # just so the 2013 generator works...
displayName: "Visual C++ Express 2012"
# https://cmake.org/cmake/help/latest/generator/Visual%20Studio%2011%202012.html
# Removed. This once generated Visual Studio 11 2012 project files, but the generator has been removed since CMake 3.28. It is still possible to build with VS 11 2012 tools using the Visual Studio 14 2015 (or above) generator with CMAKE_GENERATOR_TOOLSET set to v110, or by using the NMake Makefiles generator.
# why doesn't the vs2022 generator work?
# cmakeGenName: "Visual Studio 17 2022"
cmakeGenName: "Visual Studio 12 2013"
cmakeGenToolsetArg: "-T v110"
extraPath: "%SystemRoot%\\Microsoft.NET\\Framework\\v4.0.30319"
- name: "vs2013"
chocoPackages:
- "msvisualstudio-2013express"
displayName: "Visual C++ Express 2013"
# https://cmake.org/cmake/help/latest/generator/Visual%20Studio%2012%202013.html
# Note This generator is deprecated and will be removed in a future version of CMake. It will still be possible to build with VS 12 2013 tools using the Visual Studio 14 2015 (or above) generator with CMAKE_GENERATOR_TOOLSET set to v120, or by using the NMake Makefiles generator.
cmakeGenName: "Visual Studio 17 2022"
cmakeGenToolsetArg: "-T v120"
extraPath: "%SystemRoot%\\Microsoft.NET\\Framework\\v4.0.30319"
- name: "vs2015"
chocoPackages:
- "msvisualstudio-2015community"
displayName: "Visual C++ 2015"
cmakeGenName: "Visual Studio 14 2015"
- name: "vs2017"
chocoPackages:
- "visualstudio2017buildtools"
- "visualstudio2017-workload-vctools"
displayName: "Visual C++ 2017"
cmakeGenName: "Visual Studio 15 2017"
# vs 2019 isn't working right now for unknown reasons
#- name: "vs2019"
# # A hack because VS2019 is already installed on these machines
# chocoPackages: []
# displayName: "Visual C++ 2019"
# cmakeGenName: "Visual Studio 16 2019"
# vmImage: "windows-2019"
- name: "vs2022"
# A hack because VS2019 is already installed on these machines
chocoPackages: []
displayName: "Visual C++ 2022"
cmakeGenName: "Visual Studio 17 2022"
vmImage: "windows-2022"
- name: archList
type: object
default:
- name: 'x86'
displayName: 'x86'
cmakeArch: 'win32'
toolsetArch: 'x86'
- name: 'x86_64'
displayName: 'x86-64'
cmakeArch: 'x64'
toolsetArch: 'x64'
variables:
CHOCOLATEY_CACHE_DIR: $(Pipeline.Workspace)\chocolatey_cache
CHOCOLATEY_REPO: 'https://pkgs.dev.azure.com/edmcman/choco-vc/_packaging/choco-vc@Local/nuget/v2'
jobs:
- ${{ each vsVersion in parameters.vsVersionList }}:
- ${{ each arch in parameters.archList }}:
- ${{ if not(and(eq(vsVersion.has64, false), eq(arch.name, 'x86_64'))) }}:
- template: azure-pipelines/Build_Exes.yaml
parameters:
name: ${{ vsVersion.name }}_${{ arch.name }}
#arch: ${{ arch.name }}
chocoPackages: ${{ vsVersion.chocoPackages }}
displayName: ${{ vsVersion.displayName }} ${{ arch.displayName }}
cmakeAlwaysFlags: -A ${{ arch.cmakeArch }}
cmakeGenName: ${{ vsVersion.cmakeGenName }}
${{ if ne(vsVersion.cmakeGenToolsetArg, '') }}:
cmakeGenToolsetArg: ${{ vsVersion.cmakeGenToolsetArg }},host=${{ arch.toolsetArch }}
${{ if eq(vsVersion.cmakeGenToolsetArg, '') }}:
cmakeGenToolsetArg:
extraPath: ${{ vsVersion.extraPath }}
- job: CombineArtifacts
pool:
vmImage: windows-latest
dependsOn: # Build_Exes_${{parameters.name}}
- ${{ each vsVersion in parameters.vsVersionList }}:
- ${{ each arch in parameters.archList }}:
- ${{ if not(and(eq(vsVersion.has64, false), eq(arch.name, 'x86_64'))) }}:
- Build_Exes_${{ vsVersion.name }}_${{ arch.name }}
steps:
- task: DownloadPipelineArtifact@2
inputs:
buildType: 'current'
targetPath: '$(System.ArtifactsDirectory)/combine'
- task: PublishPipelineArtifact@1
inputs:
targetPath: '$(System.ArtifactsDirectory)/combine'
artifactName: AllArtifacts