Blocksparse Stagewise KKT Solver #198
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: | |
pull_request: | |
push: | |
branches: | |
- main | |
env: | |
CMAKE_BUILD_TYPE: Release | |
ENABLE_SANITIZERS: ON | |
jobs: | |
tests: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ ubuntu-latest, macos-12, macos-14, windows-latest ] | |
eigen: [ 3.3.7, 3.4.0 ] | |
exclude: | |
- os: macos-14 | |
eigen: 3.3.7 | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: 'recursive' | |
- uses: ilammy/msvc-dev-cmd@v1 | |
- uses: conda-incubator/setup-miniconda@v3 | |
with: | |
miniforge-version: latest | |
channels: conda-forge | |
python-version: "3.10" | |
activate-environment: piqp | |
- name: Install dependencies | |
shell: bash -l {0} | |
run: | | |
# Workaround for https://github.com/conda-incubator/setup-miniconda/issues/186 | |
conda config --remove channels defaults | |
# Compiler infrastructure | |
conda install cmake compilers make pkg-config | |
# Dependencies | |
conda install eigen=${{ matrix.eigen }} libmatio | |
- name: Setup external build directory | |
run: mkdir -p build_external | |
- name: Setup Ninja | |
if: runner.os == 'Windows' | |
uses: seanmiddleditch/gha-setup-ninja@master | |
# replace with conda as soon as https://github.com/giaf/blasfeo/issues/181 is resolved | |
- name: Install blasfeo | |
working-directory: build_external | |
run: | | |
bash ../ci/download_blasfeo.sh | |
bash ../ci/build_install_blasfeo.sh GENERIC generic | |
- name: Setup working directories | |
shell: bash -l {0} | |
run: mkdir -p build | |
- name: Configure piqp | |
shell: bash -l {0} | |
working-directory: build | |
run: cmake .. -DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -DENABLE_SANITIZERS=$ENABLE_SANITIZERS | |
- name: Build piqp | |
shell: bash -l {0} | |
if: runner.os == 'Windows' | |
working-directory: build | |
run: cmake --build . --config $CMAKE_BUILD_TYPE | |
- name: Build piqp | |
shell: bash -l {0} | |
if: runner.os != 'Windows' | |
working-directory: build | |
run: cmake --build . --config $CMAKE_BUILD_TYPE -- -j2 | |
- name: Install piqp | |
shell: bash -l {0} | |
if: runner.os == 'Windows' | |
working-directory: build | |
run: cmake --install . --config $CMAKE_BUILD_TYPE | |
- name: Install piqp | |
shell: bash -l {0} | |
if: runner.os != 'Windows' | |
working-directory: build | |
run: sudo cmake --install . --config $CMAKE_BUILD_TYPE | |
- name: Test piqp | |
shell: bash -l {0} | |
working-directory: build | |
run: ctest -C $CMAKE_BUILD_TYPE --test-dir tests --verbose | |
- name: Test piqp c interface | |
shell: bash -l {0} | |
working-directory: build | |
run: ctest -C $CMAKE_BUILD_TYPE --test-dir interfaces/c/tests --verbose |