-
Notifications
You must be signed in to change notification settings - Fork 86
80 lines (71 loc) · 2.36 KB
/
windows-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
71
72
73
74
75
76
77
78
79
80
name: CI-windows-build
on:
push:
branches:
- master
- main
paths-ignore:
- 'docs/**'
- '**.md'
pull_request:
branches:
- master
- main
paths-ignore:
- 'docs/**'
- '**.md'
jobs:
windows-msvc-build:
runs-on: ${{matrix.run-machine}}
strategy:
fail-fast: false
max-parallel: 20
matrix:
compiler: [msvc-2019]
base-flags: ["", -DJINJA2CPP_CXX_STANDARD=17]
build-config: [Release, Debug]
build-platform: [x86, x64]
build-runtime: ["", /MT, /MD]
build-shared: [FALSE, TRUE]
include:
- compiler: msvc-2019
build-platform: x86
run-machine: windows-2019
generator: Visual Studio 16 2019
vc_vars: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars32.bat
- compiler: msvc-2019
build-platform: x64
run-machine: windows-2019
generator: Visual Studio 16 2019
vc_vars: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat
steps:
- uses: actions/checkout@v3
- name: Build
shell: cmd
env:
INPUT_COMPILER: ${{ matrix.compiler }}
INPUT_BASE_FLAGS: ${{ matrix.base-flags }}
INPUT_BUILD_CONFIG: ${{ matrix.build-config }}
INPUT_BUILD_SHARED: ${{ matrix.build-shared }}
INPUT_EXTRA_FLAGS: ${{ matrix.extra_flags }}
INPUT_BUILD_PLATFORM: ${{ matrix.build-platform }}
INPUT_BUILD_RUNTIME: ${{ matrix.build-runtime }}
INPUT_GENERATOR: ${{ matrix.generator }}
VC_VARS: "${{ matrix.vc_vars }}"
run: |
call "%VC_VARS%"
mkdir -p .build
cd .build
cmake --version
cmake .. -G "%INPUT_GENERATOR%" -DCMAKE_BUILD_TYPE=%INPUT_BUILD_CONFIG% -DJINJA2CPP_MSVC_RUNTIME_TYPE="%INPUT_BUILD_RUNTIME%" -DJINJA2CPP_DEPS_MODE=internal -DJINJA2CPP_BUILD_SHARED=%INPUT_BUILD_SHARED% %INPUT_BASE_FLAGS% %INPUT_EXTRA_FLAGS%
cmake --build . --config %INPUT_BUILD_CONFIG% --verbose
- name: Test
shell: cmd
env:
INPUT_BUILD_CONFIG: ${{ matrix.build-config }}
VC_VARS: "${{ matrix.vc_vars }}"
run: |
cd .build
call "%VC_VARS%"
set path=%BOOST_ROOT%\lib;%PATH%
ctest -C %INPUT_BUILD_CONFIG% -V