Add unit tests to increase coverage #643
Workflow file for this run
This file contains hidden or 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
| ############################################################################## | |
| # GitHub Actions Workflow for volesti to build examples | |
| # | |
| # Copyright (c) 2020-2025 Vissarion Fisikopoulos | |
| # | |
| # Licensed under GNU LGPL.3, see LICENCE file | |
| ############################################################################## | |
| name: cmake-examples | |
| on: [push, pull_request] | |
| jobs: | |
| build: | |
| name: ${{ matrix.config.os }} - ${{ matrix.config.compiler }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| config: | |
| - {os: ubuntu-22.04, compiler_pkg: clang-11, compiler: clang++-11} | |
| - {os: ubuntu-22.04, compiler_pkg: g++-11, compiler: g++-11} | |
| runs-on: ${{ matrix.config.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Cache external dependencies (Eigen, Spectra, SuiteSparse) | |
| uses: actions/cache@v4 | |
| with: | |
| path: external/_deps | |
| key: deps-${{ runner.os }}-${{ hashFiles('external/cmake-files/*.cmake') }} | |
| - run: sudo apt-get update || true; | |
| sudo apt-get install ${{ matrix.config.compiler_pkg }} lp-solve libopenblas-dev liblapack-dev libomp-dev libarpack2-dev; | |
| - name: Build examples | |
| run: | | |
| cd examples | |
| for dir in */; do | |
| if [ "$dir" != "EnvelopeProblemSOS/" ] && [ "$dir" != "python_utilities/" ]; then | |
| echo | |
| echo "Building examples in $dir ....................." | |
| cd "$dir" | |
| mkdir build && cd build | |
| cmake -DCMAKE_CXX_COMPILER=${{ matrix.config.compiler }} -DUSE_MKL=OFF .. | |
| make -j$(nproc) | |
| cd ../.. | |
| fi | |
| done |