-
Notifications
You must be signed in to change notification settings - Fork 111
66 lines (58 loc) · 1.76 KB
/
windows-build.yml
File metadata and controls
66 lines (58 loc) · 1.76 KB
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
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: windows-latest
strategy:
fail-fast: false
max-parallel: 20
matrix:
base-flags: ["", -DJINJA2CPP_CXX_STANDARD=17]
build-config: [Release, Debug]
build-platform: [x64]
build-runtime: ["", /MT, /MD]
build-shared: [FALSE, TRUE]
steps:
- uses: actions/checkout@v4
# Setup MSVC environment
- name: Setup MSVC
uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{ matrix.build-platform }}
- 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 }}
run: |
mkdir -p .build
cd .build
cmake --version
cmake .. -G "NMake Makefiles" -Dvariant_CONFIG_SELECT_VARIANT=variant_VARIANT_NONSTD -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 }}
run: |
cd .build
ctest -C %INPUT_BUILD_CONFIG% -V