-
Notifications
You must be signed in to change notification settings - Fork 1.1k
70 lines (58 loc) · 1.99 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
name: win64
on:
push:
branches:
- master
- pymem
pull_request:
release:
jobs:
build:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- {
name: "Windows 2022 MSVC",
os: windows-2022,
build_type: "Debug",
generators: "Ninja"
}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 25
- name: Setup VS Environment
uses: ilammy/msvc-dev-cmd@v1
- name: Print env
run: |
echo github.ref: ${{github.ref}}
echo github.event.action: ${{github.event.action}}
echo github.event_name: ${{github.event_name}}
echo runner.os: ${{runner.os}}
Get-ChildItem Env:
- name: Install libraries with vcpkg
run: |
vcpkg --triplet x64-windows install eigen3 nlohmann-json
- name: Eigen Introspection
run: |
type C:/vcpkg/packages/eigen3_x64-windows/debug/lib/pkgconfig/eigen3.pc
- name: Configure CMake
run: |
cmake --version
cmake -B ${{github.workspace}}/build -G "${{matrix.config.generators}}" -DBUILD_UNITTESTS=ON -DG2O_BUILD_EXAMPLES=OFF -DCMAKE_BUILD_TYPE=${{matrix.config.build_type}} -DCMAKE_TOOLCHAIN_FILE=C:\vcpkg\scripts\buildsystems\vcpkg.cmake
- name: Build Introspection
run: |
echo "Number of processors: $Env:NUMBER_OF_PROCESSORS"
echo "g2o config.h"
type ${{github.workspace}}/build/g2o/config.h
- name: Build
run: cmake --build ${{github.workspace}}/build -j $Env:NUMBER_OF_PROCESSORS --config ${{matrix.config.build_type}}
- name: Test
run: |
cd ${{github.workspace}}/build
$Env:PATH += ";${{github.workspace}}\build\bin"
$Env:PATH += ";${{github.workspace}}\build\lib"
ctest -C ${{matrix.config.build_type}} --extra-verbose --output-on-failure