-
Notifications
You must be signed in to change notification settings - Fork 8
40 lines (38 loc) · 1.49 KB
/
windows.yml
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
name: Windows
on: [push, pull_request]
jobs:
build:
strategy:
matrix:
os: [windows-2019, windows-2022]
platform: [x64, Win32]
toolset: [ClangCL, MSVC]
configuration: [Debug, Release]
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }}.${{ matrix.platform }}.${{ matrix.toolset }}.${{ matrix.configuration }}
steps:
- uses: actions/checkout@v2
- name: Set toolset
if: matrix.toolset == 'ClangCL'
run: echo "toolset=-T ${{ matrix.toolset }}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: configure
run: cmake -D BUILD_EXAMPLES=1 -D BUILD_TESTS=1 -A ${{ matrix.platform }} ${{ env.toolset }} -S . -B build
- name: build
run: cmake --build build --config ${{ matrix.configuration }}
- name: Run unit tests
run: cd build && ctest --output-on-failure --schedule-random -j $env:NUMBER_OF_PROCESSORS
mingw:
strategy:
matrix:
configuration: [Debug, Release]
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: set mingw path
run: echo "C:\msys64\mingw32\bin\" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: configure
run: cmake -D CMAKE_BUILD_TYPE=${{ matrix.configuration }} -D BUILD_EXAMPLES=1 -D BUILD_TESTS=1 -G "MinGW Makefiles" -S . -B build
- name: build
run: cmake --build build
- name: run unit tests
run: cd build && ctest --output-on-failure --schedule-random -j $env:NUMBER_OF_PROCESSORS