Skip to content

Build and test on Linux #1

Build and test on Linux

Build and test on Linux #1

Workflow file for this run

name: CMake
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
env:
BUILD_TYPE: Debug
jobs:
linux:
matrix:

Check failure on line 14 in .github/workflows/cmake.yml

View workflow run for this annotation

GitHub Actions / CMake

Invalid workflow file

The workflow is not valid. .github/workflows/cmake.yml (Line: 14, Col: 9): Unexpected value 'matrix'
compiler:
- { exe: g++, version: 14 }
- { exe: clang++, version: 18 }
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Configure
env:
CXX: ${{matrix.compiler.exe}}-${{matrix.compiler.version}}
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DLIBHAT_SHARED_C_LIB=ON -DLIBHAT_TESTING=ON
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- name: Test
working-directory: ${{github.workspace}}/build
run: ctest -C ${{env.BUILD_TYPE}} -R libhat_test_.*
windows:
strategy:
matrix:
target:
- { target: Win32, vcvars: vcvars32 }
- { target: x64, vcvars: vcvars64 }
toolset: [ v143, ClangCL ]
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Configure
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DLIBHAT_SHARED_C_LIB=ON -DLIBHAT_TESTING=ON -A ${{matrix.target.target}} -T ${{matrix.toolset}}
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- name: Test
working-directory: ${{github.workspace}}/build
shell: cmd
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\${{matrix.target.vcvars}}.bat"
ctest -C ${{env.BUILD_TYPE}} -R libhat_test_.*