Skip to content

Add CI, fix ct strings, various clang-tidy fixes #3

Add CI, fix ct strings, various clang-tidy fixes

Add CI, fix ct strings, various clang-tidy fixes #3

Workflow file for this run

name: Tests
on:
pull_request:
paths:
- '.github/**'
- 'cmake/**'
- 'src/**'
- 'CMakeLists.txt'
push:
branches:
- master
paths:
- '.github/**'
- 'cmake/**'
- 'src/**'
- 'CMakeLists.txt'
jobs:
test_cxx:
name: ${{ matrix.compiler }}, ${{ matrix.buildtype }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
compiler: [gcc, clang, msvc]
buildtype: [Debug, Release]
exclude:
- os: windows-latest
compiler: gcc
- os: ubuntu-latest
compiler: msvc
env:
BUILD_TYPE: ${{ matrix.buildtype }}
steps:
- uses: actions/checkout@v4
- name: Set up clang
if: matrix.compiler == 'clang'
uses: egor-tensin/setup-clang@v1
with:
platform: x64
- name: Build
run: |
cmake -B build -DCOMMON_BUILD_TESTS=1 -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DCMKR_SKIP_GENERATION=ON
cmake --build build --config ${{ env.BUILD_TYPE }} --parallel
- name: Test (Unix)
if: contains(matrix.os, 'ubuntu')
run: ./build/common-tests
- name: Test (Windows)
if: contains(matrix.os, 'windows')
run: .\build\${{ env.BUILD_TYPE }}\common-tests.exe