aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/windows.yml
blob: f66e2bc9e187610de51ad4a08c55f1c2f5d9b3fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: windows

on: [push, pull_request]

jobs:
  build:
    runs-on: ${{matrix.os}}
    strategy:
      matrix:
        # windows-2016 and windows-2019 have MSVC 2017 and 2019 installed
        # respectively: https://github.com/actions/virtual-environments.
        os: [windows-2016, windows-2019]
        platform: [Win32, x64]
        build_type: [Debug, Release]
        include:
          - os: windows-2016
            platform: Win32
            build_type: Debug
            shared: -DBUILD_SHARED_LIBS=ON
        exclude:
          - os: windows-2016
            platform: Win32

    steps:
    - uses: actions/checkout@v2

    - name: Create Build Environment
      run: cmake -E make_directory ${{runner.workspace}}/build

    - name: Configure
      # Use a bash shell for $GITHUB_WORKSPACE.
      shell: bash
      working-directory: ${{runner.workspace}}/build
      run: |
        cmake -DCMAKE_BUILD_TYPE=${{matrix.build_type}} ${{matrix.shared}} \
              -A ${{matrix.platform}} $GITHUB_WORKSPACE

    - name: Build
      working-directory: ${{runner.workspace}}/build
      run: cmake --build . --config ${{matrix.build_type}}

    - name: Test
      working-directory: ${{runner.workspace}}/build
      run: ctest -C ${{matrix.build_type}}