-
-
Notifications
You must be signed in to change notification settings - Fork 3
42 lines (35 loc) · 1.22 KB
/
RunTestsWindows.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
42
name: CMake Build for Windows
on:
push:
branches:
- main
jobs:
build-and-test:
runs-on: windows-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Cache CMake builds
uses: actions/cache@v2
with:
path: ${{ github.workspace }}/build
key: ${{ runner.os }}-build-${{ hashFiles('**/CMakeLists.txt', '**/*.cpp', '**/*.h') }}
restore-keys: |
${{ runner.os }}-build-
- name: Configure CMake
run: cmake -B build -DCMAKE_CXX_COMPILER=cl -DCMAKE_C_COMPILER=cl -DCMAKE_BUILD_TYPE=Release -DRN_ENABLE_SANITIZER=OFF -DRN_BUILD_TESTS=ON -S .
working-directory: ${{ github.workspace }}
shell: C:\Program Files\PowerShell\7\pwsh.EXE -command ". '{0}'"
- name: Build
run: cmake --build build --config Release
working-directory: ${{ github.workspace }}
- name: Run Tests
run: ctest -C Release --output-on-failure
working-directory: ${{ github.workspace }}/build
- name: Upload Test Results
if: always()
uses: actions/upload-artifact@v2
with:
name: Test Results
path: ${{ github.workspace }}/build/Testing/**/*.xml