• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1name: windows
2
3on: [push, pull_request]
4
5jobs:
6  build:
7    runs-on: ${{matrix.os}}
8    strategy:
9      matrix:
10        # windows-2016 and windows-2019 have MSVC 2017 and 2019 installed
11        # respectively: https://github.com/actions/virtual-environments.
12        os: [windows-2016, windows-2019]
13        platform: [Win32, x64]
14        build_type: [Debug, Release]
15        include:
16          - os: windows-2016
17            platform: Win32
18            build_type: Debug
19            shared: -DBUILD_SHARED_LIBS=ON
20        exclude:
21          - os: windows-2016
22            platform: Win32
23
24    steps:
25    - uses: actions/checkout@v2
26
27    - name: Create Build Environment
28      run: cmake -E make_directory ${{runner.workspace}}/build
29
30    - name: Configure
31      # Use a bash shell for $GITHUB_WORKSPACE.
32      shell: bash
33      working-directory: ${{runner.workspace}}/build
34      run: |
35        cmake -DCMAKE_BUILD_TYPE=${{matrix.build_type}} ${{matrix.shared}} \
36              -A ${{matrix.platform}} $GITHUB_WORKSPACE
37
38    - name: Build
39      working-directory: ${{runner.workspace}}/build
40      run: cmake --build . --config ${{matrix.build_type}}
41
42    - name: Test
43      working-directory: ${{runner.workspace}}/build
44      run: ctest -C ${{matrix.build_type}}
45