2020-11-03 18:46:03 +00:00
|
|
|
name: windows
|
2020-11-03 18:45:16 +00:00
|
|
|
|
2020-11-04 00:01:26 +00:00
|
|
|
on: [push, pull_request]
|
2020-11-03 18:45:16 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
2020-11-03 20:16:15 +00:00
|
|
|
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]
|
2020-11-12 13:51:00 +00:00
|
|
|
include:
|
2020-11-19 14:04:16 +00:00
|
|
|
- os: windows-2016
|
|
|
|
standard: 11
|
|
|
|
- os: windows-2019
|
|
|
|
standard: 14
|
2020-11-12 13:51:00 +00:00
|
|
|
- os: windows-2016
|
|
|
|
platform: Win32
|
|
|
|
build_type: Debug
|
|
|
|
shared: -DBUILD_SHARED_LIBS=ON
|
2020-11-03 20:16:15 +00:00
|
|
|
exclude:
|
|
|
|
- os: windows-2016
|
|
|
|
platform: Win32
|
2020-11-03 18:45:16 +00:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Create Build Environment
|
|
|
|
run: cmake -E make_directory ${{runner.workspace}}/build
|
|
|
|
|
2020-11-03 22:02:07 +00:00
|
|
|
- name: Configure
|
2020-11-03 20:16:15 +00:00
|
|
|
# Use a bash shell for $GITHUB_WORKSPACE.
|
2020-11-03 18:45:16 +00:00
|
|
|
shell: bash
|
|
|
|
working-directory: ${{runner.workspace}}/build
|
2020-11-03 20:16:15 +00:00
|
|
|
run: |
|
2020-11-12 13:51:00 +00:00
|
|
|
cmake -DCMAKE_BUILD_TYPE=${{matrix.build_type}} ${{matrix.shared}} \
|
2020-11-19 14:04:16 +00:00
|
|
|
-A ${{matrix.platform}} \
|
|
|
|
-DCMAKE_CXX_STANDARD=${{matrix.standard}} \
|
|
|
|
$GITHUB_WORKSPACE
|
2020-11-03 18:45:16 +00:00
|
|
|
|
|
|
|
- name: Build
|
|
|
|
working-directory: ${{runner.workspace}}/build
|
2020-11-03 20:16:15 +00:00
|
|
|
run: cmake --build . --config ${{matrix.build_type}}
|
2020-11-03 18:45:16 +00:00
|
|
|
|
|
|
|
- name: Test
|
|
|
|
working-directory: ${{runner.workspace}}/build
|
2020-11-03 20:16:15 +00:00
|
|
|
run: ctest -C ${{matrix.build_type}}
|