Build C examples using Cmake and free memory #138
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: Tests | |
on: | |
push: | |
branches: | |
- '*' | |
pull_request: | |
branches: | |
- '*' | |
env: | |
CMAKE_BUILD_TYPE: Release | |
ENABLE_SANITIZERS: ON | |
jobs: | |
tests: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ ubuntu-latest, macos-latest, windows-latest ] | |
eigen: [ 3.3.4, 3.3.7, 3.4.0 ] | |
exclude: | |
- os: macos-latest | |
eigen: 3.3.4 | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: 'recursive' | |
- name: Setup working directories | |
run: | | |
mkdir -p build_external | |
mkdir -p build | |
- name: Install Eigen | |
working-directory: build_external | |
run: bash ../ci/install_eigen.sh | |
env: | |
EIGEN_VERSION: ${{ matrix.eigen }} | |
- name: Install python dependencies | |
run: pip3 install numpy scipy | |
- name: Configure piqp | |
working-directory: build | |
run: cmake .. -DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -DENABLE_SANITIZERS=$ENABLE_SANITIZERS | |
- name: Build piqp | |
if: runner.os == 'Windows' | |
working-directory: build | |
run: cmake --build . | |
- name: Build piqp | |
if: runner.os != 'Windows' | |
working-directory: build | |
run: cmake --build . -- -j2 | |
- name: Test piqp | |
if: runner.os != 'Linux' | |
working-directory: build | |
run: ctest --test-dir tests --verbose | |
- name: Test piqp | |
if: runner.os == 'Linux' | |
working-directory: build | |
run: ASAN_OPTIONS=detect_leaks=1 LSAN_OPTIONS=suppressions=lsan/suppressions.txt ctest --test-dir tests --verbose |