Skip to content

Commit

Permalink
Add valgrind tests in pixi
Browse files Browse the repository at this point in the history
  • Loading branch information
traversaro committed Nov 5, 2024
1 parent b787f74 commit d39dddd
Show file tree
Hide file tree
Showing 3 changed files with 91 additions and 3 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/test-pixi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
fail-fast: false
matrix:
os: [
ubuntu-22.04,
ubuntu-24.04,
macos-latest,
windows-2019
]
Expand All @@ -36,6 +36,14 @@ jobs:
run: |
rm pixi.lock
# To use valgrind even with conda/pixi we still need to install libc6-dbg via apt on Debian-based distros
# See https://github.com/robotology/osqp-eigen/pull/171#issuecomment-2458149581
- name: Install libc6-dbg
if: contains(matrix.os, 'ubuntu')
run: |
sudo apt-get install libc6-dbg
- name: Set up pixi
uses: prefix-dev/setup-pixi@v0.8.1

Expand Down
71 changes: 71 additions & 0 deletions pixi.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 11 additions & 2 deletions pixi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,23 @@ description = "Simple Eigen-C++ wrapper for OSQP library."
channels = ["conda-forge"]
platforms = ["linux-64", "linux-aarch64", "win-64", "osx-64", "osx-arm64"]


[target.win.activation.env]
CMAKE_INSTALL_PREFIX = "%CONDA_PREFIX%\\Library"
OSQPEIGEN_RUN_Valgrind_tests = "OFF"

[target.unix.activation.env]
CMAKE_INSTALL_PREFIX = "$CONDA_PREFIX"
OSQPEIGEN_RUN_Valgrind_tests = "OFF"

[target.linux.activation.env]
OSQPEIGEN_RUN_Valgrind_tests = "ON"

[tasks]
configure = { cmd = [
"cmake",
"-DCMAKE_BUILD_TYPE=Release",
"-DCMAKE_INSTALL_PREFIX=$CMAKE_INSTALL_PREFIX",
"-DOSQPEIGEN_RUN_Valgrind_tests=$OSQPEIGEN_RUN_Valgrind_tests",
"-DBUILD_TESTING:BOOL=ON",
# Use the cross-platform Ninja generator
"-G",
Expand All @@ -33,7 +39,7 @@ configure = { cmd = [
]}

build = { cmd = "cmake --build .build --config Release", depends_on = ["configure"] }
test = { cmd = "ctest --test-dir .build --build-config Release", depends_on = ["build"] }
test = { cmd = "ctest --test-dir .build --build-config Release --output-on-failure", depends_on = ["build"] }
install = { cmd = ["cmake", "--install", ".build", "--config", "Release"], depends_on = ["build"] }
uninstall = { cmd = ["cmake", "--build", ".build", "--target", "uninstall"]}

Expand All @@ -48,3 +54,6 @@ libosqp = "*"
eigen = "*"
ycm-cmake-modules = "*"
catch2 = "*"

[target.linux.dependencies]
valgrind = "*"

0 comments on commit d39dddd

Please sign in to comment.