Upgrade to lukka/run-vcpkg v7
[MPC.git] / .github / workflows / windows.yml
blob02bf8af2f90ab5ea416f8ae12e21489fb8740eff
1 name: windows
3 on:
4   push:
5   pull_request:
6   schedule:
7     - cron: '0 1 * * SUN'
9 jobs:
10   build:
11     strategy:
12       matrix:
13         include:
14           - name: VS2017Debug64
15             vmimage: windows-2016
16             mpctype: vs2017
17             BuildPlatform: x64
18             BuildConfiguration: Debug
19             vcpkgarch: x64-windows
20             vcpkglibdir: debug/lib
21             vcpkgpackages: openssl xerces-c
22           - name: VS2019Debug64
23             vmimage: windows-2019
24             mpctype: vs2019
25             BuildPlatform: x64
26             BuildConfiguration: Debug
27             vcpkgarch: x64-windows
28             vcpkglibdir: debug/lib
29             vcpkgpackages: openssl xerces-c
30           - name: VS2019Release32
31             vmimage: windows-2019
32             mpctype: vs2019
33             BuildPlatform: Win32
34             BuildConfiguration: Release
35             vcpkgarch: x86-windows
36             vcpkglibdir: lib
37             vcpkgpackages: openssl xerces-c
38     runs-on: ${{ matrix.vmimage }}
39     name: ${{ matrix.name }}
40     env:
41       DOC_ROOT: ${{ github.workspace }}/ACE_TAO
42       ACE_ROOT: ${{ github.workspace }}/ACE_TAO/ACE
43       TAO_ROOT: ${{ github.workspace }}/ACE_TAO/TAO
44       MPC_ROOT: ${{ github.workspace }}/
45       VCPKG_ROOT: ${{ github.workspace }}/vcpkg
46       XERCESC_INCDIR: ${{ github.workspace }}/vcpkg/installed/${{ matrix.vcpkgarch }}/include
47       XERCESC_LIBDIR: ${{ github.workspace }}/vcpkg/installed/${{ matrix.vcpkgarch }}/${{ matrix.vcpkglibdir }}
48       SSL_INCDIR: ${{ github.workspace }}/vcpkg/installed/${{ matrix.vcpkgarch }}/include
49       SSL_LIBDIR: ${{ github.workspace }}/vcpkg/installed/${{ matrix.vcpkgarch }}/${{ matrix.vcpkglibdir }}
50     steps:
51     - name: checkout MPC
52       uses: actions/checkout@v2
53     - name: checkout ACE_TAO
54       uses: actions/checkout@v2
55       with:
56         repository: DOCGroup/ACE_TAO
57         path: ${{ env.DOC_ROOT }}
58     - name: Install vcpkg
59       uses: lukka/run-vcpkg@v7
60       with:
61         vcpkgGitCommitId: 0bf3923f9fab4001c00f0f429682a0853b5749e0
62         vcpkgArguments: --recurse ${{ matrix.vcpkgpackages }}
63         vcpkgTriplet: ${{ matrix.vcpkgarch }}
64         appendedCacheKey: ${{ matrix.name }}
65     - name: create $ACE_ROOT/ace/config.h
66       run: |
67         '#include "ace/config-win32.h"' > ${env:ACE_ROOT}/ace/config.h
68       shell: pwsh
69     - name: create $ACE_ROOT/bin/MakeProjectCreator/config/default.features
70       run: |
71         echo "ipv6=1" | out-file -encoding ASCII ${env:ACE_ROOT}/bin/MakeProjectCreator/config/default.features
72         echo "xerces3=1" | out-file -encoding ASCII ${env:ACE_ROOT}/bin/MakeProjectCreator/config/default.features
73         echo "ssl=1" | out-file -append -encoding ASCII ${env:ACE_ROOT}/bin/MakeProjectCreator/config/default.features
74         echo "openssl11=1" | out-file -append -encoding ASCII ${env:ACE_ROOT}/bin/MakeProjectCreator/config/default.features
75         echo "versioned_namespace=1" | out-file -append -encoding ASCII ${env:ACE_ROOT}/bin/MakeProjectCreator/config/default.features
76       shell: pwsh
77     - name: Add optional features ${{ matrix.OptionalFeatures }}
78       run: |
79         echo "${{ matrix.OptionalFeatures }}" | out-file -append -encoding ASCII ${env:ACE_ROOT}/bin/MakeProjectCreator/config/default.features
80       shell: pwsh
81       if: matrix.OptionalFeatures != ''
82     - name: Run mwc.pl on $(TAO_ROOT)/TAO_ACE.mwc
83       run: |
84         perl ${env:ACE_ROOT}/bin/mwc.pl -type ${{ matrix.mpctype }} ${env:TAO_ROOT}/TAO_ACE.mwc -workers 4
85       shell: pwsh
86     - name: Setup msbuild
87       uses: microsoft/setup-msbuild@v1
88     - name: Build solution $(TAO_ROOT)/TAO_ACE.sln
89       run: |
90         msbuild -maxcpucount -p:Platform=${{ matrix.BuildPlatform }} -p:Configuration=${{ matrix.BuildConfiguration }} ${env:TAO_ROOT}/TAO_ACE.sln
91       shell: pwsh