forked from equinor/layered-file-protocols
-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (58 loc) · 1.63 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
name: Build on Windows
on:
push:
branches: [master]
pull_request:
branches: [master]
workflow_dispatch:
jobs:
windows_build:
runs-on: windows-2019
strategy:
matrix:
platform:
- x86
- x64
config:
- Release
- Debug
fmt-header-only:
- ON
include:
- platform: x86
cmake_generator: '-G "Visual Studio 16 2019" -A Win32'
- platform: x64
cmake_generator: '-G "Visual Studio 16 2019" -A x64'
- platform: x64
cmake_generator: '-G "Visual Studio 16 2019" -A x64'
config: Release
fmt-header-only: OFF
steps:
- name: Explicitly disable autocrlf
run: git config --global core.autocrlf false
- uses: actions/checkout@v4
- name: Install fmtlib
shell: bash
run: |
git clone https://github.com/fmtlib/fmt.git
mkdir fmt/build
cd fmt/build
cmake -DFMT_TEST=OFF \
-DFMT_DOC=OFF \
-DCMAKE_BUILD_TYPE=Release \
${{ matrix.cmake_generator }} \
..
cmake --build . --config Release --target install
- name: Build and test lfp
shell: bash
run: |
mkdir build
cd build
cmake \
-DCMAKE_CXX_FLAGS="-DCRT_SECURE_NO_WARNINGS" \
-DLFP_FMT_HEADER_ONLY=${{ matrix.fmt-header-only }} \
-DCMAKE_BUILD_TYPE=${{ matrix.config }} \
${{ matrix.cmake_generator }} \
..
cmake --build . --config ${{ matrix.config }} --target install
ctest -C ${{ matrix.config }} --verbose