Skip to content

Build C examples using Cmake and free memory #138

Build C examples using Cmake and free memory

Build C examples using Cmake and free memory #138

Workflow file for this run

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