Updated logging to include the class/method so that it is more obvious where these...
[ACE_TAO.git] / .github / workflows / windows.yml
blob1d5f9cfa6084e9eff3f80cb868f99a49a81eb30a
1 name: windows
3 on:
4   push:
5   pull_request:
6   schedule:
7     - cron: '0 1 * * SUN'
8   workflow_dispatch:
10 concurrency:
11   group: ${{ github.workflow }}-${{ github.ref }}
12   cancel-in-progress: true
14 jobs:
15   msvc:
16     strategy:
17       fail-fast: false
18       matrix:
19         include:
20           - name: VS2019WChar
21             vmimage: windows-2019
22             mpctype: vs2019
23             BuildPlatform: x64
24             BuildConfiguration: Debug
25             vcpkgarch: x64-windows
26             vcpkglibdir: debug/lib
27             vcpkgpackages: '"openssl", {"name": "xerces-c", "features": ["xmlch-wchar"]}, "zlib"'
28             OptionalFeatures: uses_wchar=1
29           - name: VS2019Debug64
30             vmimage: windows-2019
31             mpctype: vs2019
32             BuildPlatform: x64
33             BuildConfiguration: Debug
34             vcpkgarch: x64-windows
35             vcpkglibdir: debug/lib
36             vcpkgpackages: '"openssl", "xerces-c", "zlib"'
37           - name: VS2019Release64
38             vmimage: windows-2019
39             mpctype: vs2019
40             BuildPlatform: x64
41             BuildConfiguration: Release
42             vcpkgarch: x64-windows
43             vcpkglibdir: lib
44             vcpkgpackages: '"openssl", "xerces-c", "zlib"'
45           - name: VS2019Debug32
46             vmimage: windows-2019
47             mpctype: vs2019
48             BuildPlatform: Win32
49             BuildConfiguration: Debug
50             vcpkgarch: x86-windows
51             vcpkglibdir: debug/lib
52             vcpkgpackages: '"openssl", "xerces-c", "zlib"'
53           - name: VS2019Release32
54             vmimage: windows-2019
55             mpctype: vs2019
56             BuildPlatform: Win32
57             BuildConfiguration: Release
58             vcpkgarch: x86-windows
59             vcpkglibdir: lib
60             vcpkgpackages: '"openssl", "xerces-c", "zlib"'
61           - name: VS2019Debug64Cxx17
62             vmimage: windows-2019
63             mpctype: vs2019
64             BuildPlatform: x64
65             BuildConfiguration: Debug
66             vcpkgarch: x64-windows
67             vcpkglibdir: debug/lib
68             vcpkgpackages: '"openssl", "xerces-c", "zlib"'
69             OptionalMpcArgs: -value_template LanguageStandard=stdcpp17
70           - name: VS2019Debug64Cxx20
71             vmimage: windows-2019
72             mpctype: vs2019
73             BuildPlatform: x64
74             BuildConfiguration: Debug
75             vcpkgarch: x64-windows
76             vcpkglibdir: debug/lib
77             vcpkgpackages: '"openssl", "xerces-c", "zlib"'
78             OptionalMpcArgs: -value_template LanguageStandard=stdcpp20
79           - name: VS2022WChar
80             vmimage: windows-2022
81             mpctype: vs2022
82             BuildPlatform: x64
83             BuildConfiguration: Debug
84             vcpkgarch: x64-windows
85             vcpkglibdir: debug/lib
86             vcpkgpackages: '"openssl", {"name": "xerces-c", "features": ["xmlch-wchar"]}, "zlib"'
87             OptionalFeatures: uses_wchar=1
88           - name: VS2022Debug64
89             vmimage: windows-2022
90             mpctype: vs2022
91             BuildPlatform: x64
92             BuildConfiguration: Debug
93             vcpkgarch: x64-windows
94             vcpkglibdir: debug/lib
95             vcpkgpackages: '"openssl", "xerces-c", "zlib"'
96           - name: VS2022Release64
97             vmimage: windows-2022
98             mpctype: vs2022
99             BuildPlatform: x64
100             BuildConfiguration: Release
101             vcpkgarch: x64-windows
102             vcpkglibdir: lib
103             vcpkgpackages: '"openssl", "xerces-c", "zlib"'
104     runs-on: ${{ matrix.vmimage }}
105     name: ${{ matrix.name }}
106     env:
107       ACE_ROOT: ${{ github.workspace }}/ACE
108       TAO_ROOT: ${{ github.workspace }}/TAO
109       MPC_ROOT: ${{ github.workspace }}/MPC
110       VCPKG_ROOT: ${{ github.workspace }}/vcpkg
111       XERCESC_INCDIR: ${{ github.workspace }}/vcpkg_installed/${{ matrix.vcpkgarch }}/include
112       XERCESC_LIBDIR: ${{ github.workspace }}/vcpkg_installed/${{ matrix.vcpkgarch }}/${{ matrix.vcpkglibdir }}
113       SSL_INCDIR: ${{ github.workspace }}/vcpkg_installed/${{ matrix.vcpkgarch }}/include
114       SSL_LIBDIR: ${{ github.workspace }}/vcpkg_installed/${{ matrix.vcpkgarch }}/${{ matrix.vcpkglibdir }}
115       ZLIB_INCDIR: ${{ github.workspace }}/vcpkg_installed/${{ matrix.vcpkgarch }}/include
116       ZLIB_LIBDIR: ${{ github.workspace }}/vcpkg_installed/${{ matrix.vcpkgarch }}/${{ matrix.vcpkglibdir }}
117       VCPKG_DEFAULT_TRIPLET: ${{ matrix.vcpkgarch }}
118       VCPKG_INSTALLED_DIR: ${{ github.workspace }}/vcpkg_installed
119     steps:
120     - name: checkout ACE/TAO
121       uses: actions/checkout@v3
122     - name: checkout MPC
123       uses: actions/checkout@v3
124       with:
125         repository: DOCGroup/MPC
126         path: ${{ env.MPC_ROOT }}
127     - name: create vcpkg.json
128       run: |
129         '{"name": "tao","version-string": "githubaction","dependencies": [ ${{ matrix.vcpkgpackages }} ]}' > vcpkg.json
130       shell: pwsh
131     - name: Install vcpkg
132       uses: lukka/run-vcpkg@v10
133       with:
134         vcpkgGitCommitId: f93ba152d55e1d243160e690bc302ffe8638358e
135         appendedCacheKey: ${{ matrix.name }}
136         runVcpkgInstall: true
137     - name: create $ACE_ROOT/ace/config.h
138       run: |
139         '#include "ace/config-win32.h"' > ${env:ACE_ROOT}/ace/config.h
140       shell: pwsh
141     - name: create $ACE_ROOT/bin/MakeProjectCreator/config/default.features
142       run: |
143         echo "ipv6=1" | out-file -encoding ASCII ${env:ACE_ROOT}/bin/MakeProjectCreator/config/default.features
144         echo "xerces3=1" | out-file -encoding ASCII ${env:ACE_ROOT}/bin/MakeProjectCreator/config/default.features
145         echo "ssl=1" | out-file -append -encoding ASCII ${env:ACE_ROOT}/bin/MakeProjectCreator/config/default.features
146         echo "openssl11=1" | out-file -append -encoding ASCII ${env:ACE_ROOT}/bin/MakeProjectCreator/config/default.features
147         echo "versioned_namespace=1" | out-file -append -encoding ASCII ${env:ACE_ROOT}/bin/MakeProjectCreator/config/default.features
148         echo "zlib=1" | out-file -append -encoding ASCII ${env:ACE_ROOT}/bin/MakeProjectCreator/config/default.features
149       shell: pwsh
150     - name: Add optional features ${{ matrix.OptionalFeatures }}
151       run: |
152         echo "${{ matrix.OptionalFeatures }}" | out-file -append -encoding ASCII ${env:ACE_ROOT}/bin/MakeProjectCreator/config/default.features
153       shell: pwsh
154       if: matrix.OptionalFeatures != ''
155     - name: Run mwc.pl on $(TAO_ROOT)/TAO_ACE.mwc
156       run: |
157         perl ${env:ACE_ROOT}/bin/mwc.pl -type ${{ matrix.mpctype }} ${env:TAO_ROOT}/TAO_ACE.mwc -workers 4 ${{ matrix.OptionalMpcArgs }}
158       shell: pwsh
159     - name: Run mwc.pl on $(ACE_ROOT)/tests/tests.mwc
160       run: |
161         perl ${env:ACE_ROOT}/bin/mwc.pl -type ${{ matrix.mpctype }} ${env:ACE_ROOT}/tests/tests.mwc -workers 4 ${{ matrix.OptionalMpcArgs }}
162       shell: pwsh
163     - name: Run mwc.pl on $(TAO_ROOT)/tests/IDL_Test
164       run: |
165         perl ${env:ACE_ROOT}/bin/mwc.pl -type ${{ matrix.mpctype }} ${env:TAO_ROOT}/tests/IDL_Test -workers 4 ${{ matrix.OptionalMpcArgs }}
166       shell: pwsh
167     - name: Setup msbuild
168       uses: microsoft/setup-msbuild@v1
169     - name: Build solution TAO/TAO_ACE.sln
170       run: msbuild -maxcpucount -p:Platform=${{ matrix.BuildPlatform }} -p:Configuration=${{ matrix.BuildConfiguration }} TAO/TAO_ACE.sln
171     - name: Build solution ACE/tests/tests.sln
172       run: msbuild -maxcpucount -p:Platform=${{ matrix.BuildPlatform }} -p:Configuration=${{ matrix.BuildConfiguration }} ACE/tests/tests.sln
173     - name: Build solution TAO/tests/IDL_Test/IDL_Test.sln
174       run: msbuild -maxcpucount -p:Platform=${{ matrix.BuildPlatform }} -p:Configuration=${{ matrix.BuildConfiguration }} TAO/tests/IDL_Test/IDL_Test.sln
175   mingw:
176     runs-on: windows-2019
177     strategy:
178       fail-fast: false
179       matrix:
180         compiler: [gcc]
181         msystem: [MINGW64]
182         include:
183           - platform_file: include $(ACE_ROOT)/include/makeinclude/platform_mingw32.GNU
184     name: ${{ matrix.msystem }}-${{ matrix.compiler }}
185     env:
186       ACE_ROOT: ${{ github.workspace }}/ACE
187       TAO_ROOT: ${{ github.workspace }}/TAO
188       MPC_ROOT: ${{ github.workspace }}/MPC
189     steps:
190     - name: checkout ACE/TAO
191       uses: actions/checkout@v3
192     - name: checkout MPC
193       uses: actions/checkout@v3
194       with:
195         repository: DOCGroup/MPC
196         path: ${{ env.MPC_ROOT }}
197     - uses: msys2/setup-msys2@v2
198       with:
199         msystem: ${{ matrix.msystem }}
200         install: make
201     - run: pacman --noconfirm -S mingw-w64-x86_64-${{ matrix.compiler }}
202       shell: msys2 {0}
203     - run: ${{ matrix.compiler }} --version
204       shell: msys2 {0}
205     - name: create $ACE_ROOT/ace/config.h
206       run: |
207         '#include "ace/config-win32.h"' > ${env:ACE_ROOT}/ace/config.h
208       shell: pwsh
209     - name: create $ACE_ROOT/bin/MakeProjectCreator/config/default.features
210       run: |
211         echo "versioned_namespace=1" | out-file -append -encoding ASCII ${env:ACE_ROOT}/bin/MakeProjectCreator/config/default.features
212       shell: pwsh
213     - name: Add optional features ${{ matrix.OptionalFeatures }}
214       run: |
215         echo "${{ matrix.OptionalFeatures }}" | out-file -append -encoding ASCII ${env:ACE_ROOT}/bin/MakeProjectCreator/config/default.features
216       shell: pwsh
217       if: matrix.OptionalFeatures != ''
218     - name: add optional optional macros
219       run: |
220         '${{ matrix.optional_macros }}' >> ${env:ACE_ROOT}/include/makeinclude/platform_macros.GNU
221       shell: pwsh
222       if: matrix.optional_macros != ''
223     - name: extend $ACE_ROOT/include/makeinclude/platform_macros.GNU
224       run: |
225         '${{ matrix.platform_file }}' >>  ${env:ACE_ROOT}/include/makeinclude/platform_macros.GNU
226       shell: pwsh
227     - name: Run mwc.pl on $(TAO_ROOT)/TAO_ACE.mwc
228       run: |
229         perl ${env:ACE_ROOT}/bin/mwc.pl -type gnuace ${env:TAO_ROOT}/TAO_ACE.mwc -workers 4
230       shell: pwsh
231     - name: Run mwc.pl on $(ACE_ROOT)/tests/tests.mwc
232       run: |
233         perl ${env:ACE_ROOT}/bin/mwc.pl -type gnuace ${env:ACE_ROOT}/tests/tests.mwc -workers 4
234       shell: pwsh
235     - name: Run mwc.pl on $(TAO_ROOT)/tests/IDL_Test
236       run: |
237         perl ${env:ACE_ROOT}/bin/mwc.pl -type gnuace ${env:TAO_ROOT}/tests/IDL_Test -workers 4
238       shell: pwsh
239     - name: Build TAO_ACE project
240       run: |
241         export ACE_ROOT=`cygpath -u $ACE_ROOT`
242         export TAO_ROOT=`cygpath -u $TAO_ROOT`
243         make -j 6 -C $TAO_ROOT
244       shell: msys2 {0}
245     - name: Build ACE/tests project
246       run: |
247         export ACE_ROOT=`cygpath -u $ACE_ROOT`
248         export TAO_ROOT=`cygpath -u $TAO_ROOT`
249         make -j 6 -C $ACE_ROOT/tests
250       shell: msys2 {0}
251     - name: Build TAO/tests/IDL_Test project
252       run: |
253         export ACE_ROOT=`cygpath -u $ACE_ROOT`
254         export TAO_ROOT=`cygpath -u $TAO_ROOT`
255         make -j 6 -C $TAO_ROOT/tests/IDL_Test
256       shell: msys2 {0}