Skip to content

Add fixes to support CMake 3.16 #19

Add fixes to support CMake 3.16

Add fixes to support CMake 3.16 #19

Workflow file for this run

name: "Build & Test"
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: turtlebrowser/get-conan@main
- name: Run Conan Install
run: |
conan profile detect
conan profile detect --name debug
echo "&:build_type=Debug" >> $(conan profile path debug)
conan install -of . -pr debug .
- name: Run CMake
run: cmake --preset conan-debug -DBUILD_TESTS=ON -DUSE_COVERAGE=ON .
- name: Compile
run: cmake --build build/Debug --target testScipPP
- name: Run Tests
run: ./build/Debug/test/testScipPP --log_format=JUNIT --log_level=all --log_sink=boosttest.xml
- name: Install GCovr
run: pip install gcovr
- name: Extract Coverage
run: gcovr -r . --object-directory=./build/Debug/CMakeFiles --exclude-unreachable-branches --exclude-throw-branches -b --sonarqube coverage.xml --xml cobertura.xml
- uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./boosttest.xml,./coverage.xml,./cobertura.xml
verbose: true # optional (default = false)
test_release_win:
runs-on: windows-2019
steps:
- uses: actions/checkout@v3
- uses: turtlebrowser/get-conan@main
- uses: ilammy/msvc-dev-cmd@v1
- name: Run Conan Install
run: |
conan profile detect
conan install -of . .
- name: Run CMake
run: cmake --preset conan-default -DBUILD_TESTS=ON .
- name: Compile
run: cmake --build build --preset conan-release --target testScipPP
- name: Run Tests
run: ./build/test/Release/testScipPP.exe
test_release_inx:
strategy:
matrix:
os: [ ubuntu-latest, macos-11 ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: turtlebrowser/get-conan@main
- name: Run Conan Install
run: |
conan profile detect
conan install -of . .
- name: Run CMake
run: cmake --preset conan-release -DBUILD_TESTS=ON .
- name: Compile
run: cmake --build build/Release --target testScipPP
- name: Run Tests
run: ./build/Release/test/testScipPP
clang_tidy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: turtlebrowser/get-conan@main
- name: Run Conan Install
run: |
conan profile detect
conan install -of . .
- name: Create CMake Compilation Database
run: cmake --preset conan-release -DCMAKE_EXPORT_COMPILE_COMMANDS=ON .
- name: Run Clang-Tidy
run: clang-tidy-14 -p build/Release source/*.cpp include/**/*.hpp
clang_format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: DoozyX/[email protected]
with:
source: source include test
extensions: 'hpp,cpp'
clangFormatVersion: 16
doxygen:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ssciwr/doxygen-install@v1
with:
version: "1.9.6"
- uses: ts-graphviz/setup-graphviz@v1
- name: Prepare Doxygen Config
run: echo "PROJECT_NUMBER = ${GITHUB_REF}" >> Doxyfile
- name: Run Doxygen
run: doxygen
- name: Zip HTML Docu
run: zip -q -9 -r html.zip html
- name: Store HTML Docu
uses: actions/upload-artifact@v3
with:
name: doxygen-html
path: html.zip
retention-days: 2