Skip to content

Depend on boost>=1.81 when building tests #57

Depend on boost>=1.81 when building tests

Depend on boost>=1.81 when building tests #57

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 -o with_tests=True .
- name: Run CMake
run: cmake --preset conan-debug -DUSE_COVERAGE=ON .
- name: Compile
run: cmake --build build/Debug --target tests
- name: Run Tests
run: ./build/Debug/test/tests --log_format=JUNIT --log_level=all --log_sink=boosttest.xml
- name: Install GCovr
run: pip install gcovr
- name: Extract Coverage
run: gcovr -r . -e ./test --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)
fail_ci_if_error: true
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
powershell -Command "(gc $(conan profile path default)) -replace 'compiler.cppstd=14', 'compiler.cppstd=17' | Out-File -encoding ASCII $(conan profile path default)"
conan install -of . -o with_tests=True .
- name: Run CMake
run: cmake --preset conan-default .
- name: Compile
run: cmake --build build --preset conan-release --target tests
- name: Run Tests
run: ./build/test/Release/tests.exe
test_without_conan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install parallelism library for C++
run: sudo apt update && sudo apt install libtbb2
- uses: MarkusJx/[email protected]
with:
boost_version: 1.81.0
- name: Install SCIP
run: |
wget https://github.com/scipopt/scip/releases/download/v803/SCIPOptSuite-8.0.3-Linux-ubuntu.sh
chmod +x SCIPOptSuite-8.0.3-Linux-ubuntu.sh
./SCIPOptSuite-8.0.3-Linux-ubuntu.sh --skip-license
- name: Build SCIP++
run: |
CMAKE_PREFIX_PATH=./lib/cmake/scip:./boost/boost/lib/cmake/Boost-1.81.0 cmake -DBUILD_TESTS=ON .
make -j tests
- name: Run tests
run: ./test/tests
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 . -o with_tests=True .
- name: Run CMake
run: cmake --preset conan-release .
- name: Compile
run: cmake --build build/Release --target tests
- name: Run Tests
run: ./build/Release/test/tests
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