aboutsummaryrefslogtreecommitdiffstats
path: root/.github/workflows/ci.yml
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows/ci.yml')
-rw-r--r--.github/workflows/ci.yml53
1 files changed, 44 insertions, 9 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 3fa9c4e..23dfbb0 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -169,23 +169,53 @@ jobs:
strategy:
fail-fast: false
matrix:
- python:
- - version: 3.9
- debug: true
- - version: 3.10-dev
- debug: false
+ include:
+ - python-version: 3.9
+ python-debug: true
+ valgrind: true
+ - python-version: 3.10-dev
+ python-debug: false
- name: "🐍 ${{ matrix.python.version }}${{ matrix.python.debug && ' (debug)' || '' }} • deadsnakes • x64"
+ name: "🐍 ${{ matrix.python-version }}${{ matrix.python-debug && '-dbg' || '' }} (deadsnakes)${{ matrix.valgrind && ' • Valgrind' || '' }} • x64"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- - name: Setup Python ${{ matrix.python.version }} (deadsnakes)
+ - name: Setup Python ${{ matrix.python-version }} (deadsnakes)
uses: deadsnakes/action@v2.1.1
with:
- python-version: ${{ matrix.python.version }}
- debug: ${{ matrix.python.debug }}
+ python-version: ${{ matrix.python-version }}
+ debug: ${{ matrix.python-debug }}
+
+ - name: Update CMake
+ uses: jwlawson/actions-setup-cmake@v1.6
+
+ - name: Valgrind cache
+ if: matrix.valgrind
+ uses: actions/cache@v2
+ id: cache-valgrind
+ with:
+ path: valgrind
+ key: 3.16.1 # Valgrind version
+
+ - name: Compile Valgrind
+ if: matrix.valgrind && steps.cache-valgrind.outputs.cache-hit != 'true'
+ run: |
+ VALGRIND_VERSION=3.16.1
+ curl https://sourceware.org/pub/valgrind/valgrind-$VALGRIND_VERSION.tar.bz2 -o - | tar xj
+ mv valgrind-$VALGRIND_VERSION valgrind
+ cd valgrind
+ ./configure
+ make -j 2 > /dev/null
+
+ - name: Install Valgrind
+ if: matrix.valgrind
+ working-directory: valgrind
+ run: |
+ sudo make install
+ sudo apt-get update
+ sudo apt-get install libc6-dbg # Needed by Valgrind
- name: Prepare env
run: python -m pip install -r tests/requirements.txt --prefer-binary
@@ -193,6 +223,7 @@ jobs:
- name: Configure
run: >
cmake -S . -B build
+ -DCMAKE_BUILD_TYPE=Debug
-DPYBIND11_WERROR=ON
-DDOWNLOAD_CATCH=ON
-DDOWNLOAD_EIGEN=ON
@@ -207,6 +238,10 @@ jobs:
- name: C++ tests
run: cmake --build build --target cpptest
+ - name: Run Valgrind on Python tests
+ if: matrix.valgrind
+ run: cmake --build build --target memcheck
+
# Testing on clang using the excellent silkeh clang docker images
clang: