Merge pull request #1844 from jrw972/monterey
[ACE_TAO.git] / .github / workflows / windows.yml
blob75dd8c790ab0c8f027f54933e1e0584f82f6de75
1 name: windows
3 on:
4   push:
5   pull_request:
6   schedule:
7     - cron: '0 1 * * SUN'
9 concurrency:
10   group: ${{ github.workflow }}-${{ github.ref }}
11   cancel-in-progress: true
13 jobs:
14   build:
15     strategy:
16       fail-fast: false
17       matrix:
18         include:
19           - name: VS2019WChar
20             vmimage: windows-2019
21             mpctype: vs2019
22             BuildPlatform: x64
23             BuildConfiguration: Debug
24             vcpkgarch: x64-windows
25             vcpkglibdir: debug/lib
26             vcpkgpackages: 'openssl xerces-c[xmlch-wchar]'
27             OptionalFeatures: uses_wchar=1
28           - name: VS2019Debug64
29             vmimage: windows-2019
30             mpctype: vs2019
31             BuildPlatform: x64
32             BuildConfiguration: Debug
33             vcpkgarch: x64-windows
34             vcpkglibdir: debug/lib
35             vcpkgpackages: openssl xerces-c
36           - name: VS2019Release64
37             vmimage: windows-2019
38             mpctype: vs2019
39             BuildPlatform: x64
40             BuildConfiguration: Release
41             vcpkgarch: x64-windows
42             vcpkglibdir: lib
43             vcpkgpackages: openssl xerces-c
44           - name: VS2019Debug32
45             vmimage: windows-2019
46             mpctype: vs2019
47             BuildPlatform: Win32
48             BuildConfiguration: Debug
49             vcpkgarch: x86-windows
50             vcpkglibdir: debug/lib
51             vcpkgpackages: openssl xerces-c
52           - name: VS2019Release32
53             vmimage: windows-2019
54             mpctype: vs2019
55             BuildPlatform: Win32
56             BuildConfiguration: Release
57             vcpkgarch: x86-windows
58             vcpkglibdir: lib
59             vcpkgpackages: openssl xerces-c
60           - name: VS2019Debug64Cxx17
61             vmimage: windows-2019
62             mpctype: vs2019
63             BuildPlatform: x64
64             BuildConfiguration: Debug
65             vcpkgarch: x64-windows
66             vcpkglibdir: debug/lib
67             vcpkgpackages: openssl xerces-c zlib
68             OptionalMpcArgs: -value_template LanguageStandard=stdcpp17
69           - name: VS2019Debug64Cxx20
70             vmimage: windows-2019
71             mpctype: vs2019
72             BuildPlatform: x64
73             BuildConfiguration: Debug
74             vcpkgarch: x64-windows
75             vcpkglibdir: debug/lib
76             vcpkgpackages: openssl xerces-c zlib
77             OptionalMpcArgs: -value_template LanguageStandard=stdcpp20
78     runs-on: ${{ matrix.vmimage }}
79     name: ${{ matrix.name }}
80     env:
81       ACE_ROOT: ${{ github.workspace }}/ACE
82       TAO_ROOT: ${{ github.workspace }}/TAO
83       MPC_ROOT: ${{ github.workspace }}/MPC
84       VCPKG_ROOT: ${{ github.workspace }}/vcpkg
85       XERCESC_INCDIR: ${{ github.workspace }}/vcpkg/installed/${{ matrix.vcpkgarch }}/include
86       XERCESC_LIBDIR: ${{ github.workspace }}/vcpkg/installed/${{ matrix.vcpkgarch }}/${{ matrix.vcpkglibdir }}
87       SSL_INCDIR: ${{ github.workspace }}/vcpkg/installed/${{ matrix.vcpkgarch }}/include
88       SSL_LIBDIR: ${{ github.workspace }}/vcpkg/installed/${{ matrix.vcpkgarch }}/${{ matrix.vcpkglibdir }}
89     steps:
90     - name: checkout ACE/TAO
91       uses: actions/checkout@v2
92     - name: checkout MPC
93       uses: actions/checkout@v2
94       with:
95         repository: DOCGroup/MPC
96         path: ${{ env.MPC_ROOT }}
97     - name: Install vcpkg
98       uses: lukka/run-vcpkg@v7
99       with:
100         vcpkgGitCommitId: b86c0c35b88e2bf3557ff49dc831689c2f085090
101         vcpkgArguments: --recurse ${{ matrix.vcpkgpackages }}
102         vcpkgTriplet: ${{ matrix.vcpkgarch }}
103         appendedCacheKey: ${{ matrix.name }}
104     - name: create $ACE_ROOT/ace/config.h
105       run: |
106         '#include "ace/config-win32.h"' > ${env:ACE_ROOT}/ace/config.h
107       shell: pwsh
108     - name: create $ACE_ROOT/bin/MakeProjectCreator/config/default.features
109       run: |
110         echo "ipv6=1" | out-file -encoding ASCII ${env:ACE_ROOT}/bin/MakeProjectCreator/config/default.features
111         echo "xerces3=1" | out-file -encoding ASCII ${env:ACE_ROOT}/bin/MakeProjectCreator/config/default.features
112         echo "ssl=1" | out-file -append -encoding ASCII ${env:ACE_ROOT}/bin/MakeProjectCreator/config/default.features
113         echo "openssl11=1" | out-file -append -encoding ASCII ${env:ACE_ROOT}/bin/MakeProjectCreator/config/default.features
114         echo "versioned_namespace=1" | out-file -append -encoding ASCII ${env:ACE_ROOT}/bin/MakeProjectCreator/config/default.features
115       shell: pwsh
116     - name: Add optional features ${{ matrix.OptionalFeatures }}
117       run: |
118         echo "${{ matrix.OptionalFeatures }}" | out-file -append -encoding ASCII ${env:ACE_ROOT}/bin/MakeProjectCreator/config/default.features
119       shell: pwsh
120       if: matrix.OptionalFeatures != ''
121     - name: Run mwc.pl on $(TAO_ROOT)/TAO_ACE.mwc
122       run: |
123         perl ${env:ACE_ROOT}/bin/mwc.pl -type ${{ matrix.mpctype }} ${env:TAO_ROOT}/TAO_ACE.mwc -workers 4 ${{ matrix.OptionalMpcArgs }}
124       shell: pwsh
125     - name: Run mwc.pl on $(ACE_ROOT)/tests/tests.mwc
126       run: |
127         perl ${env:ACE_ROOT}/bin/mwc.pl -type ${{ matrix.mpctype }} ${env:ACE_ROOT}/tests/tests.mwc -workers 4 ${{ matrix.OptionalMpcArgs }}
128       shell: pwsh
129     - name: Setup msbuild
130       uses: microsoft/setup-msbuild@v1
131     - name: Build solution TAO/TAO_ACE.sln
132       run: msbuild -maxcpucount -p:Platform=${{ matrix.BuildPlatform }} -p:Configuration=${{ matrix.BuildConfiguration }} TAO/TAO_ACE.sln
133     - name: Build solution ACE/tests/tests.sln
134       run: msbuild -maxcpucount -p:Platform=${{ matrix.BuildPlatform }} -p:Configuration=${{ matrix.BuildConfiguration }} ACE/tests/tests.sln