-
-
Notifications
You must be signed in to change notification settings - Fork 162
70 lines (56 loc) · 2.02 KB
/
windows-msvc-build.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
name: msvc
on:
push:
branches:
- 'main'
- 'ci/cache'
paths-ignore:
- 'docs/**'
- '**/*.md'
- 'LICENSE'
workflow_dispatch:
pull_request:
jobs:
build:
name: ci-windows-msvc-19
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Configure Visual Studio Environment
uses: ilammy/[email protected]
- name: Install ccache
uses: hendrikmuhs/[email protected]
- name: Install Ninja
uses: seanmiddleditch/gha-setup-ninja@v4
- name: Cache Conan packages
id: cache-conan
uses: actions/[email protected]
env:
cache-name: cache-conan-packages
with:
path: ~/.conan2
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('conanfile.txt') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Configure python
uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'pip'
- name: Install Python dependencies
run: python -m pip install -r .github/requirements.txt
- name: Configure Conan profile
run: conan profile detect --force --name msvc-19
- name: Install Conan dependencies
run: |
conan install conanfile.txt -r conancenter -pr:b msvc-19 -pr:h msvc-19 -s compiler.cppstd=20 -s build_type=Debug -c tools.cmake.cmaketoolchain:generator=Ninja --build=missing
- name: Configure CMake
run: |
cmake -S . --preset=windows-msvc-debug -DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}\build\Debug\generators\conan_toolchain.cmake -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER=cl.exe -DBUILD_TESTING:BOOL=ON -DUSE_STD_FORMAT:BOOL=ON -DUSE_SYSTEM_DEPENDENCIES:BOOL=ON
- name: Build
run: cmake --build --preset=windows-msvc-debug
- name: Test
run: ctest --preset=windows-msvc-debug