38 lines
1.0 KiB
YAML
38 lines
1.0 KiB
YAML
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-2019, windows-latest]
|
|
platform: [Win32, x64]
|
|
build_type: [Debug, Release]
|
|
standard: [11, 17, 20]
|
|
shared: [ -DBUILD_SHARED_LIBS=ON ]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Create Build Environment
|
|
run: cmake -E make_directory build
|
|
|
|
- name: Configure
|
|
working-directory: build
|
|
run: |
|
|
cmake -DCMAKE_BUILD_TYPE=${{matrix.build_type}} ${{matrix.shared}} -A ${{matrix.platform}} -DCMAKE_CXX_STANDARD=${{matrix.standard}} ..
|
|
|
|
- name: Build
|
|
working-directory: build
|
|
run: cmake --build . --config ${{matrix.build_type}}
|
|
|
|
- name: Test
|
|
working-directory: build
|
|
run: ctest -C ${{matrix.build_type}} -V
|
|
env:
|
|
CTEST_OUTPUT_ON_FAILURE: True
|