fix segfault #61
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: main-check | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
env: | |
BUILD_TYPE: Release | |
jobs: | |
# both tests and static analysis depend on build artifact so | |
# they are grouped under the same job as it's simpler than cahing | |
# or artifact upload/download. Rith now the tests are pretty fast | |
# so not much would be gained from parallel run of test & analysis | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Prepare environment | |
run: sudo apt-get update && sudo apt-get install libboost-program-options-dev clang-tidy | |
- name: Configure CMake | |
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_TESTS=ON | |
- name: Build | |
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} | |
- name: Test | |
working-directory: ${{github.workspace}}/build | |
# Exclude LocalLogRepository test as they write to the filesystem | |
run: ctest -C ${{env.BUILD_TYPE}} --output-on-failure -E "LocalLogRepository" | |
- name: Static Analysis | |
if: always() | |
run: ln -s ./build/compile_commands.json && run-clang-tidy ./source/ | |
code-formatting: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: clang-format | |
run: find ./source ./test -iname '*.cpp' -o -iname '*.hpp' | xargs clang-format -n -Werror --ferror-limit=1 |