-
Notifications
You must be signed in to change notification settings - Fork 961
41 lines (38 loc) · 1.44 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
41
name: Windows
on: [push, pull_request]
jobs:
msbuild:
runs-on: windows-2022
strategy:
matrix:
toolset: [ClangCL, MSVC]
configuration: [Debug, Release]
steps:
- uses: actions/checkout@v4
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v2
- name: Set toolset
if: matrix.toolset == 'ClangCL'
run: echo "toolset=/p:PlatformToolset=${{ matrix.toolset }}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Build
shell: cmd
run: msbuild Osiris.sln /p:Platform=x64 /p:Configuration=${{ matrix.configuration }} ${{ env.toolset }}
cmake:
runs-on: windows-2022
strategy:
matrix:
toolset: [ClangCL, MSVC]
configuration: [Debug, Release]
steps:
- uses: actions/checkout@v4
- 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 -Werror=dev -D BUILD_TESTS=1 -D CMAKE_COMPILE_WARNING_AS_ERROR=1 -A x64 ${{ env.toolset }} -B build
- name: build source
run: cmake --build build --target Osiris --config ${{ matrix.configuration }}
- name: build unit tests
run: cmake --build build --target Tests --config ${{ matrix.configuration }}
- name: run unit tests
run: ctest --test-dir build --output-on-failure --schedule-random -j $env:NUMBER_OF_PROCESSORS