Package refactor and feature addition #125
Workflow file for this run
This file contains hidden or 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: 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=AVX2,FMA3 | |
| valgrind \ | |
| --leak-check=full \ | |
| --show-leak-kinds=all \ | |
| --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) |