Skip to content

Package refactor and feature addition #127

Package refactor and feature addition

Package refactor and feature addition #127

Workflow file for this run

name: Valgrind
on:
workflow_dispatch:
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
defaults:
run:
shell: bash
jobs:
build:
name: Valgrind
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v6
with:
submodules: false
- uses: actions/setup-python@v6
with:
python-version: '3.12'
- name: Install dependencies on ubuntu
run: |
sudo apt-get update
sudo apt-get install -y valgrind
- name: Install python packages
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade pybind11 cmake ninja pytest
- name: Install packages
run: |
CMAKE_ARGS="-DMMU_ENABLE_INTERNAL_TESTS=ON -DMMU_VALGRIND_MODE=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo" python -m pip install . -v
- name: Test
run: |
cd tests
export PYTHONMALLOC=malloc
export OPENBLAS_NUM_THREADS=1
export OMP_NUM_THREADS=1
export NPY_DISABLE_CPU_FEATURES="X86_V4,X86_V3"
valgrind \
--suppressions=valgrind.supp \
--leak-check=full \
--show-leak-kinds=all \
--errors-for-leak-kinds=definite,indirect \
--track-origins=yes \
--num-callers=50 \
--error-exitcode=99 \
--log-file=valgrind-log.txt \
python -X faulthandler -m pytest -vv \
|| (status=$?; echo "===== VALGRIND LOG ====="; cat valgrind-log.txt; exit $status)