-
Notifications
You must be signed in to change notification settings - Fork 37
71 lines (60 loc) · 1.81 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: Windows
on:
pull_request:
release:
types: [published]
push:
tags:
branches:
- main
env:
CTEST_OUTPUT_ON_FAILURE: 1
CPM_SOURCE_CACHE: ${{ github.workspace }}/cpm_modules
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Setup Cache
uses: actions/cache@v2
with:
key: ${{ runner.os }}-${{ github.workflow }}-${{ env.BUILD_TYPE }}-${{ hashFiles('**/CMakeLists.txt') }}-${{ hashFiles('./vcpkg.json')}}
restore-keys: |
${{ runner.os }}-${{ env.BUILD_TYPE }}-
path: |
./vcpkg
~/vcpkg
./build/vcpkg_installed
${{ env.HOME }}/.cache/vcpkg/archives
${{ env.XDG_CACHE_HOME }}/vcpkg/archives
${{ env.LOCALAPPDATA }}\vcpkg\archives
${{ env.APPDATA }}\vcpkg\archives
"**/cpm_modules"
- name: Setup Cpp
uses: aminya/setup-cpp@v1
with:
vcvarsall: true
cmake: true
ninja: true
conan: false
vcpkg: true
ccache: true
clangtidy: false
cppcheck: true
gcovr: false
opencppcoverage: true
- name: Configure CMake
run: cmake -S . -B build -DCMAKE_TOOLCHAIN_FILE=C:\Users\runneradmin\vcpkg\scripts\buildsystems\vcpkg.cmake
- name: Build
run: cmake --build build --config Debug -j4
- name: Test
working-directory: ./build
run: |
ctest --build-config Debug
# TODO: add test and coverage for windows
#- name: Test and coverage
# working-directory: ./build
# run: |
# OpenCppCoverage.exe --export_type cobertura:coverage.xml --cover_children -- ctest --build-config Debug