Don't overwrite file content
[ACE_TAO.git] / azure-pipelines.yml
blobb019bd450e292ffdf7cfb659f9d1b6b991eb567c
1 variables:
2    ACE_ROOT: $(Build.SourcesDirectory)/ACE
3    TAO_ROOT: $(Build.SourcesDirectory)/TAO
4    MPC_ROOT: $(Build.SourcesDirectory)/ACE/MPC
5    system.prefergit: true
7 schedules:
8 - cron: "0 7 * * SUN"
9   displayName: Weekly Sunday
10   branches:
11     include:
12     - master
13   always: true
15 resources:
16 - repo: self
17   fetchDepth: 1
19 jobs:
20 - job: VisualStudio2019
21   timeoutInMinutes: 120
22   pool:
23     vmImage: windows-2019
24   strategy:
25     matrix:
26       WChar:
27         BuildPlatform: x64
28         BuildConfiguration: Debug
29         vcpkgarch: x64-windows
30         vcpkglibdir: debug\lib
31         vcpkgpackages: 'openssl xerces-c[xmlch_wchar]'
32         OptionalFeatures: uses_wchar=1
33       Debug64:
34         BuildPlatform: x64
35         BuildConfiguration: Debug
36         vcpkgarch: x64-windows
37         vcpkglibdir: debug\lib
38         vcpkgpackages: openssl xerces-c
39       Release64:
40         BuildPlatform: x64
41         BuildConfiguration: Release
42         vcpkgarch: x64-windows
43         vcpkglibdir: lib
44         vcpkgpackages: openssl xerces-c
45       Debug32:
46         BuildPlatform: Win32
47         BuildConfiguration: Debug
48         vcpkgarch: x86-windows
49         vcpkglibdir: debug\lib
50         vcpkgpackages: openssl xerces-c
51       Release32:
52         BuildPlatform: Win32
53         BuildConfiguration: Release
54         vcpkgarch: x86-windows
55         vcpkglibdir: lib
56         vcpkgpackages: openssl xerces-c
57   variables:
58     VCPKG_ROOT: $(Build.SourcesDirectory)\vcpkg
59     XERCESC_INCDIR: $(VCPKG_ROOT)\installed\$(vcpkgarch)\include
60     XERCESC_LIBDIR: $(VCPKG_ROOT)\installed\$(vcpkgarch)\$(vcpkglibdir)
61     SSL_INCDIR: $(VCPKG_ROOT)\installed\$(vcpkgarch)\include
62     SSL_LIBDIR: $(VCPKG_ROOT)\installed\$(vcpkgarch)\$(vcpkglibdir)
63   steps:
64   - powershell: |
65       git clone -q --depth 1 git://github.com/Microsoft/vcpkg.git $(VCPKG_ROOT)
66       $(VCPKG_ROOT)\bootstrap-vcpkg.bat
67       $(VCPKG_ROOT)\vcpkg install --recurse --triplet $(vcpkgarch) $(vcpkgpackages)
68     displayName: Install additional packages using vcpkg
69   - powershell: |
70       '#include "ace/config-win32.h"' > $(ACE_ROOT)/ace/config.h
71     displayName: Create config.h file
72   - powershell: |
73       echo "xerces3=1" | out-file -encoding ASCII $(ACE_ROOT)\bin\MakeProjectCreator\config\default.features
74       echo "ssl=1" | out-file -append -encoding ASCII $(ACE_ROOT)\bin\MakeProjectCreator\config\default.features
75       echo "openssl11=1" | out-file -append -encoding ASCII $(ACE_ROOT)\bin\MakeProjectCreator\config\default.features
76       echo "versioned_namespace=1" | out-file -append -encoding ASCII $(ACE_ROOT)\bin\MakeProjectCreator\config\default.features
77     displayName: Create default.features file
78   - powershell: |
79       echo $(OptionalFeatures) | out-file -append -encoding ASCII $(ACE_ROOT)\bin\MakeProjectCreator\config\default.features
80     displayName: Add optional features ($(OptionalFeatures))
81     condition: and(succeeded(), ne(variables['OptionalFeatures'], ''))
82   - powershell: git clone -q --depth 1 git://github.com/DOCGroup/MPC.git $(MPC_ROOT)
83     displayName: git clone MPC
84   - powershell: perl $(ACE_ROOT)/bin/mwc.pl -type vs2019 $(TAO_ROOT)/TAO_ACE.mwc -workers 4
85     displayName: Run script mwc.pl on $(TAO_ROOT)/TAO_ACE.mwc
86   - powershell: perl $(ACE_ROOT)/bin/mwc.pl -type vs2019 $(ACE_ROOT)/tests/tests.mwc -workers 4
87     displayName: Run script mwc.pl on $(ACE_ROOT)/tests/tests.mwc
88   - task: VSBuild@1
89     displayName: Build solution TAO/TAO_ACE.sln
90     inputs:
91       solution: TAO/TAO_ACE.sln
92       platform: $(BuildPlatform)
93       configuration: $(BuildConfiguration)
94       maximumCpuCount: true
95   - task: VSBuild@1
96     displayName: Build solution ACE/tests/tests.sln
97     inputs:
98       solution: ACE/tests/tests.sln
99       platform: $(BuildPlatform)
100       configuration: $(BuildConfiguration)
101       maximumCpuCount: true
103 - job: VisualStudio2017
104   timeoutInMinutes: 120
105   pool:
106     vmImage: vs2017-win2016
107   strategy:
108     matrix:
109       WChar:
110         BuildPlatform: x64
111         BuildConfiguration: Debug
112         vcpkgarch: x64-windows
113         vcpkglibdir: debug\lib
114         vcpkgpackages: 'openssl xerces-c[xmlch_wchar]'
115         OptionalFeatures: uses_wchar=1
116       Debug64:
117         BuildPlatform: x64
118         BuildConfiguration: Debug
119         vcpkgarch: x64-windows
120         vcpkglibdir: debug\lib
121         vcpkgpackages: openssl xerces-c
122       Release64:
123         BuildPlatform: x64
124         BuildConfiguration: Release
125         vcpkgarch: x64-windows
126         vcpkglibdir: lib
127         vcpkgpackages: openssl xerces-c
128   variables:
129     VCPKG_ROOT: $(Build.SourcesDirectory)\vcpkg
130     XERCESC_INCDIR: $(VCPKG_ROOT)\installed\$(vcpkgarch)\include
131     XERCESC_LIBDIR: $(VCPKG_ROOT)\installed\$(vcpkgarch)\$(vcpkglibdir)
132     SSL_INCDIR: $(VCPKG_ROOT)\installed\$(vcpkgarch)\include
133     SSL_LIBDIR: $(VCPKG_ROOT)\installed\$(vcpkgarch)\$(vcpkglibdir)
134   steps:
135   - powershell: |
136       git clone --depth 1 git://github.com/Microsoft/vcpkg.git $(VCPKG_ROOT)
137       $(VCPKG_ROOT)\bootstrap-vcpkg.bat
138       $(VCPKG_ROOT)\vcpkg install --recurse --triplet $(vcpkgarch) $(vcpkgpackages)
139     displayName: Install additional packages using vcpkg
140   - powershell: |
141       '#include "ace/config-win32.h"' > $(ACE_ROOT)/ace/config.h
142     displayName: Create config.h file
143   - powershell: |
144       echo "xerces3=1" | out-file -encoding ASCII $(ACE_ROOT)\bin\MakeProjectCreator\config\default.features
145       echo "ssl=1" | out-file -append -encoding ASCII $(ACE_ROOT)\bin\MakeProjectCreator\config\default.features
146       echo "openssl11=1" | out-file -append -encoding ASCII $(ACE_ROOT)\bin\MakeProjectCreator\config\default.features
147       echo "versioned_namespace=1" | out-file -append -encoding ASCII $(ACE_ROOT)\bin\MakeProjectCreator\config\default.features
148       echo "ipv6=1" | out-file -append -encoding ASCII $(ACE_ROOT)\bin\MakeProjectCreator\config\default.features
149     displayName: Create default.features file
150   - powershell: |
151       echo $(OptionalFeatures) | out-file -append -encoding ASCII $(ACE_ROOT)\bin\MakeProjectCreator\config\default.features
152     displayName: Add optional features ($(OptionalFeatures))
153     condition: and(succeeded(), ne(variables['OptionalFeatures'], ''))
154   - powershell: git clone --depth 1 git://github.com/DOCGroup/MPC.git $(MPC_ROOT)
155     displayName: git clone MPC
156   - powershell: perl $(ACE_ROOT)/bin/mwc.pl -type vs2017 $(TAO_ROOT)/TAO_ACE.mwc -workers 4
157     displayName: Run script mwc.pl on $(TAO_ROOT)/TAO_ACE.mwc
158   - powershell: perl $(ACE_ROOT)/bin/mwc.pl -type vs2017 $(ACE_ROOT)/tests/tests.mwc -workers 4
159     displayName: Run script mwc.pl on $(ACE_ROOT)/tests/tests.mwc
160   - task: VSBuild@1
161     displayName: Build solution TAO/TAO_ACE.sln
162     inputs:
163       solution: TAO/TAO_ACE.sln
164       platform: $(BuildPlatform)
165       configuration: $(BuildConfiguration)
166       maximumCpuCount: true
167   - task: VSBuild@1
168     displayName: Build solution ACE/tests/tests.sln
169     inputs:
170       solution: ACE/tests/tests.sln
171       platform: $(BuildPlatform)
172       configuration: $(BuildConfiguration)
173       maximumCpuCount: true
175 - job: Linux
176   timeoutInMinutes: 90
177   pool:
178     vmImage: ubuntu-18.04
179   strategy:
180     matrix:
181       GCC48:
182         CC: gcc-4.8
183         CXX: g++-4.8
184         PackageDeps: g++-4.8
185         platform_file: include $(ACE_ROOT)/include/makeinclude/platform_linux.GNU
186       GCC6:
187         CC: gcc-6
188         CXX: g++-6
189         PackageDeps: g++-6
190         platform_file: include $(ACE_ROOT)/include/makeinclude/platform_linux.GNU
191       GCC7:
192         CC: gcc-7
193         CXX: g++-7
194         PackageDeps: g++-7
195         platform_file: include $(ACE_ROOT)/include/makeinclude/platform_linux.GNU
196       GCC8:
197         CC: gcc-8
198         CXX: g++-8
199         PackageDeps: g++-8
200         platform_file: include $(ACE_ROOT)/include/makeinclude/platform_linux.GNU
201       GCC9:
202         CC: gcc-9
203         CXX: g++-9
204         PackageDeps: g++-9
205         platform_file: include $(ACE_ROOT)/include/makeinclude/platform_linux.GNU
206       CLANG5:
207         CC: clang-5.0
208         CXX: clang++-5.0
209         PackageDeps: clang-5.0
210         platform_file: include $(ACE_ROOT)/include/makeinclude/platform_linux_clang.GNU
211       CLANG6:
212         CC: clang-6.0
213         CXX: clang++-6.0
214         PackageDeps: clang-6.0
215         platform_file: include $(ACE_ROOT)/include/makeinclude/platform_linux_clang.GNU
216       CLANG7:
217         CC: clang-7
218         CXX: clang++-7
219         PackageDeps: clang-7
220         platform_file: include $(ACE_ROOT)/include/makeinclude/platform_linux_clang.GNU
221       CLANG8:
222         CC: clang-8
223         CXX: clang++-8
224         PackageDeps: clang-8
225         platform_file: include $(ACE_ROOT)/include/makeinclude/platform_linux_clang.GNU
226       CLANG9:
227         CC: clang-9
228         CXX: clang++-9
229         PackageDeps: clang-9
230         Repo: llvm-toolchain-$(lsb_release -cs)-9
231         platform_file: include $(ACE_ROOT)/include/makeinclude/platform_linux_clang.GNU
232       CLANG10:
233         CC: clang-10
234         CXX: clang++-10
235         PackageDeps: clang-10
236         Repo: llvm-toolchain-$(lsb_release -cs)-10
237         platform_file: include $(ACE_ROOT)/include/makeinclude/platform_linux_clang.GNU
238   steps:
239   - script: |
240       wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
241       sudo apt-add-repository "deb http://apt.llvm.org/$(lsb_release -cs)/ $(Repo) main"
242     displayName: Add repository ($(Repo))
243     condition: and(succeeded(), ne(variables['Repo'], ''))
244   - script: |
245       sudo apt-get --yes update
246       sudo apt-get --yes install libxerces-c-dev libssl-dev $(PackageDeps)
247     displayName: install system package dependencies
248   - powershell: |
249       '#include "ace/config-linux.h"' > $(ACE_ROOT)/ace/config.h
250     displayName: Create config.h file
251   - powershell: |
252       'xerces3=1' > $(ACE_ROOT)/bin/MakeProjectCreator/config/default.features
253       'ssl=1' >> $(ACE_ROOT)/bin/MakeProjectCreator/config/default.features
254       'versioned_namespace=1' >> $(ACE_ROOT)/bin/MakeProjectCreator/config/default.features
255     displayName: Create default.features file
256   - powershell: |
257       'c++11=1' > $(ACE_ROOT)/include/makeinclude/platform_macros.GNU
258       'xerces3=1' >> $(ACE_ROOT)/include/makeinclude/platform_macros.GNU
259       'ssl=1' >> $(ACE_ROOT)/include/makeinclude/platform_macros.GNU
260       'ipv6=1' >> $(ACE_ROOT)/include/makeinclude/platform_macros.GNU
261       "$(platform_file)" >> $(ACE_ROOT)/include/makeinclude/platform_macros.GNU
262     displayName: Create platform_macros file
263   - powershell: git clone --depth 1 git://github.com/DOCGroup/MPC.git $(MPC_ROOT)
264     displayName: git clone MPC
265   - powershell: perl $(ACE_ROOT)/bin/mwc.pl -type gnuace $(TAO_ROOT)/TAO_ACE.mwc -workers 4
266     displayName: Run mwc.pl on $(TAO_ROOT)/TAO_ACE.mwc
267   - powershell: perl $(ACE_ROOT)/bin/mwc.pl -type gnuace $(ACE_ROOT)/tests/tests.mwc -workers 4
268     displayName: Run mwc.pl on $(ACE_ROOT)/tests/tests.mwc
269   - bash: make -j 6 -C TAO
270     displayName: Build TAO project
271   - bash: make -j 6 -C ACE/tests
272     displayName: Build tests project
274 - job: MacOSX
275   timeoutInMinutes: 90
276   pool:
277     vmImage: macOS-latest
278   steps:
279   - powershell: |
280       '#include "ace/config-macosx.h"' > $(ACE_ROOT)/ace/config.h
281     displayName: Create config.h file
282   - powershell: |
283       'include $(ACE_ROOT)/include/makeinclude/platform_macosx.GNU' > $(ACE_ROOT)/include/makeinclude/platform_macros.GNU;
284     displayName: Create platform_macros file
285   - powershell: git clone --depth 1 git://github.com/DOCGroup/MPC.git $(MPC_ROOT)
286     displayName: git clone MPC
287   - powershell: perl $(ACE_ROOT)/bin/mwc.pl -type gnuace $(TAO_ROOT)/TAO_ACE.mwc -workers 4
288     displayName: Run mwc.pl on $(TAO_ROOT)/TAO_ACE.mwc
289   - powershell: perl $(ACE_ROOT)/bin/mwc.pl -type gnuace $(ACE_ROOT)/tests/tests.mwc -workers 4
290     displayName: Run mwc.pl on $(ACE_ROOT)/tests/tests.mwc
291   - bash: make -j 6 -C TAO
292     displayName: Build TAO project
293   - bash: make -j 6 -C ACE/tests
294     displayName: Build tests project