Skip to content

Fix minimum required cmake version #18

Fix minimum required cmake version

Fix minimum required cmake version #18

Workflow file for this run

name: CMake
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
env:
BUILD_TYPE: Debug
jobs:
macos:
strategy:
matrix:
cxx_standard: [ 20, 23 ]
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: Configure
run: cmake -B ${{github.workspace}}/build -DCMAKE_CXX_STANDARD=${{matrix.cxx_standard}} -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: Build
run: cmake --build ${{github.workspace}}/build -j 4
linux:
strategy:
matrix:
compiler:
- { pkg: g++, exe: g++, version: 14 }
- { pkg: clang, exe: clang++, version: 18 }
cxx_standard: [ 20, 23 ]
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v3
- name: Install Compiler
run: |
sudo apt update
sudo apt install -y ${{matrix.compiler.pkg}}-${{matrix.compiler.version}}
- name: Configure
env:
CXX: ${{matrix.compiler.exe}}-${{matrix.compiler.version}}
run: cmake -B ${{github.workspace}}/build -DCMAKE_CXX_STANDARD=${{matrix.cxx_standard}} -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DLIBHAT_TESTING=ON
- name: Build
run: cmake --build ${{github.workspace}}/build -j 4
- name: Test
working-directory: ${{github.workspace}}/build
run: ctest -C ${{env.BUILD_TYPE}} -R libhat_test_.*
windows:
strategy:
matrix:
target: [ Win32, x64 ]
toolset: [ v143, ClangCL ]
cxx_standard: [ 20, 23 ]
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Configure
run: cmake -B ${{github.workspace}}/build -DCMAKE_CXX_STANDARD=${{matrix.cxx_standard}} -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DLIBHAT_SHARED_C_LIB=ON -DLIBHAT_TESTING=ON -A ${{matrix.target}} -T ${{matrix.toolset}}
- name: Build
run: cmake --build ${{github.workspace}}/build -j 4
- name: Test
working-directory: ${{github.workspace}}/build
shell: cmd
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\${{matrix.target == 'Win32' && 'vcvars32' || 'vcvars64'}}.bat"
ctest -C ${{env.BUILD_TYPE}} -R libhat_test_.*