Skip to content

Add Linux support

Add Linux support #37

Workflow file for this run

name: CI
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, windows-latest]
build_type: [Debug, Release]
compiler: [{cpp: clang++, c: clang}, {cpp: cl, c: cl}]
exclude:
- os: ubuntu-24.04
compiler: {cpp: cl, c: cl}
steps:
- uses: actions/checkout@v4
- name: Set reusable strings
id: strings
shell: bash
run: |
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
- name: Configure CMake
run: >
cmake -B ${{ steps.strings.outputs.build-output-dir }}
-DCMAKE_CXX_COMPILER=${{ matrix.compiler.cpp }}
-DCMAKE_C_COMPILER=${{ matrix.compiler.c }}
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-S ${{ github.workspace }}
- name: Build
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }}
- name: Test
working-directory: ${{ steps.strings.outputs.build-output-dir }}
run: ctest --build-config ${{ matrix.build_type }} || ctest --build-config ${{ matrix.build_type }} --rerun-failed --output-on-failure
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run clang-format
uses: jidicula/[email protected]
with:
clang-format-version: '17'
check-path: 'src'