Skip to content

Build on Windows

Build on Windows #19

Workflow file for this run

name: Build on Windows
on:
push:
branches: [master]
pull_request:
branches: [master]
workflow_dispatch:
jobs:
windows_build:
runs-on: windows-2019
env:
cmake_generator_x86: '-G "Visual Studio 16 2019" -A Win32'
cmake_generator_x64: '-G "Visual Studio 16 2019" -A x64'
strategy:
matrix:
platform:
- x86
- x64
config:
- Release
- Debug
fmt-header-only:
- ON
include:
- platform: x86
cmake_generator: $cmake_generator_x86
- platform: x64
cmake_generator: $cmake_generator_x64
- platform: x64
cmake_generator: $cmake_generator_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