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
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,10 @@ environments:
- conda: https://conda.anaconda.org/conda-forge/linux-64/rhash-1.4.5-hb9d3cd8_0.conda
- conda: https://conda.anaconda.org/conda-forge/noarch/sysroot_linux-64-2.17-h4a8ded7_18.conda
- conda: https://conda.anaconda.org/conda-forge/noarch/tzdata-2024b-hc8b5060_0.conda
- conda: https://conda.anaconda.org/conda-forge/linux-64/valgrind-3.23.0-hdf4e22f_0.conda
- conda: https://conda.anaconda.org/conda-forge/linux-64/xz-5.2.6-h166bdaf_0.tar.bz2
- conda: https://conda.anaconda.org/conda-forge/linux-64/ycm-cmake-modules-0.16.9-h5888daf_0.conda
- conda: https://conda.anaconda.org/conda-forge/linux-64/zlib-1.3.1-hb9d3cd8_2.conda
- conda: https://conda.anaconda.org/conda-forge/linux-64/zstd-1.5.6-ha6fb4c9_0.conda
linux-aarch64:
- conda: https://conda.anaconda.org/conda-forge/linux-aarch64/_openmp_mutex-4.5-2_gnu.tar.bz2
Expand Down Expand Up @@ -108,8 +110,10 @@ environments:
- conda: https://conda.anaconda.org/conda-forge/linux-aarch64/rhash-1.4.5-h86ecc28_0.conda
- conda: https://conda.anaconda.org/conda-forge/noarch/sysroot_linux-aarch64-2.17-h5b4a56d_18.conda
- conda: https://conda.anaconda.org/conda-forge/noarch/tzdata-2024b-hc8b5060_0.conda
- conda: https://conda.anaconda.org/conda-forge/linux-aarch64/valgrind-3.23.0-h45cc13e_0.conda
- conda: https://conda.anaconda.org/conda-forge/linux-aarch64/xz-5.2.6-h9cdd2b7_0.tar.bz2
- conda: https://conda.anaconda.org/conda-forge/linux-aarch64/ycm-cmake-modules-0.16.9-h5ad3122_0.conda
- conda: https://conda.anaconda.org/conda-forge/linux-aarch64/zlib-1.3.1-h86ecc28_2.conda
- conda: https://conda.anaconda.org/conda-forge/linux-aarch64/zstd-1.5.6-h02f22dd_0.conda
osx-64:
- conda: https://conda.anaconda.org/conda-forge/osx-64/bzip2-1.0.8-hfdf4475_7.conda
Expand Down Expand Up @@ -3906,6 +3910,40 @@ packages:
license: LicenseRef-MicrosoftWindowsSDK10
size: 559710
timestamp: 1728377334097
- kind: conda
name: valgrind
version: 3.23.0
build: h45cc13e_0
subdir: linux-aarch64
url: https://conda.anaconda.org/conda-forge/linux-aarch64/valgrind-3.23.0-h45cc13e_0.conda
sha256: 8a178f36b11bc6f5972b742f11d6afa450611c0367ea70dbc040de028ba6dde5
md5: 43e617c6ca437d86c59555414f837c74
depends:
- libgcc-ng >=12
- libstdcxx-ng >=12
- libzlib >=1.2.13,<2.0a0
- zlib
license: GPL-2.0-or-later
license_family: GPL
size: 48877907
timestamp: 1717169592968
- kind: conda
name: valgrind
version: 3.23.0
build: hdf4e22f_0
subdir: linux-64
url: https://conda.anaconda.org/conda-forge/linux-64/valgrind-3.23.0-hdf4e22f_0.conda
sha256: d45548de8a309c5476b2b8f74f88de8bd5208a1b8ecf2bb1d673746fb6aed130
md5: f251c4c9a93614bbdd7d925a58501811
depends:
- libgcc-ng >=12
- libstdcxx-ng >=12
- libzlib >=1.2.13,<2.0a0
- zlib
license: GPL-2.0-or-later
license_family: GPL
size: 54239669
timestamp: 1717169371083
- kind: conda
name: vc
version: '14.3'
Expand Down Expand Up @@ -4125,6 +4163,39 @@ packages:
license_family: BSD
size: 143788
timestamp: 1725628834144
- kind: conda
name: zlib
version: 1.3.1
build: h86ecc28_2
build_number: 2
subdir: linux-aarch64
url: https://conda.anaconda.org/conda-forge/linux-aarch64/zlib-1.3.1-h86ecc28_2.conda
sha256: b4f649aa3ecdae384d5dad7074e198bff120edd3dfb816588e31738fc6d627b1
md5: bc230abb5d21b63ff4799b0e75204783
depends:
- libgcc >=13
- libzlib 1.3.1 h86ecc28_2
license: Zlib
license_family: Other
size: 95582
timestamp: 1727963203597
- kind: conda
name: zlib
version: 1.3.1
build: hb9d3cd8_2
build_number: 2
subdir: linux-64
url: https://conda.anaconda.org/conda-forge/linux-64/zlib-1.3.1-hb9d3cd8_2.conda
sha256: 5d7c0e5f0005f74112a34a7425179f4eb6e73c92f5d109e6af4ddeca407c92ab
md5: c9f075ab2f33b3bbee9e62d4ad0a6cd8
depends:
- __glibc >=2.17,<3.0.a0
- libgcc >=13
- libzlib 1.3.1 hb9d3cd8_2
license: Zlib
license_family: Other
size: 92286
timestamp: 1727963153079
- kind: conda
name: zstd
version: 1.5.6
Expand Down
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.