Skip to content

Merge pull request #24 from SemaiCZE/update-ci #49

Merge pull request #24 from SemaiCZE/update-ci

Merge pull request #24 from SemaiCZE/update-ci #49

Workflow file for this run

name: Windows Build
on: [push, pull_request]
jobs:
tests:
name: Windows ${{ matrix.compiler }} ${{ matrix.build_type }} - ${{ matrix.lib_type }}
runs-on: windows-2022
strategy:
fail-fast: false
matrix:
compiler: [Clang, MSVC]
build_type: [Debug, Release]
build_shared: [ON, OFF]
include:
- compiler: clang
generator: "Visual Studio 17 2022"
msvc_toolset: ClangCL
- compiler: msvc
generator: "Visual Studio 17 2022"
msvc_toolset: v143
- build_shared: ON
lib_type: Shared
- build_shared: OFF
lib_type: Static
steps:
- uses: lukka/get-cmake@v3.23.0
- uses: seanmiddleditch/gha-setup-ninja@v3
- uses: ilammy/msvc-dev-cmd@v1
- name: Checkout
uses: actions/checkout@v2
with:
submodules: true
- name: Buildtools Version
run: |
if [ "${{ matrix.compiler }}" == "Clang" ]; then
clang-cl.exe --version
else
cl.exe
fi
shell: bash
- name: Configure
run: |
mkdir build
cd build
cmake .. -G "${{matrix.generator}}" -DINICPP_BUILD_TESTS=ON -DINICPP_BUILD_EXAMPLES=ON -DINICPP_BUILD_SHARED=${{matrix.build_shared}} -T${{matrix.msvc_toolset}} -A x64
shell: bash
- name: Build
run: |
cmake --build . --config ${{matrix.build_type}}
shell: bash
working-directory: build
- name: Tests
run: ctest . -C ${{matrix.build_type}} --output-on-failure
shell: bash
working-directory: build