-
Notifications
You must be signed in to change notification settings - Fork 25
48 lines (38 loc) · 1.57 KB
/
ci-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
name: ci-windows
on: [pull_request, workflow_dispatch]
jobs:
ci-windows-msvc-19:
name: ci-windows-msvc-19-static-release
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Configure Visual Studio Environment
uses: ilammy/[email protected]
- name: Configure Python 3.10
uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'pip'
- name: Cache Conan packages
uses: actions/[email protected]
env:
cache-name: cache-conan-packages
with:
path: ~/.conan2
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('conanfile.py') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install Conan
run: python -m pip install -r .github/requirements.txt
- name: Detect Conan profile
run: conan profile detect --force --name=msvc-19
- name: Install Conan Dependencies
run: |
conan install -r conancenter conanfile.py -of ${{ github.workspace }} -pr:b msvc-19 -pr:h msvc-19 -s compiler.cppstd=17 --build=missing
- name: Build
run: |
cmake -S . -B ${{ github.workspace }}/build -DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/build/conan_toolchain.cmake -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_CXX_STANDARD=17 -DCMAKE_CXX_COMPILER=cl.exe -DCMAKE_C_COMPILER=cl.exe
cmake --build ${{ github.workspace }}/build --config Release