Skip to content

Commit

Permalink
Merge Valgrind and other deadsnakes builds
Browse files Browse the repository at this point in the history
  • Loading branch information
YannickJadoul committed Jan 15, 2021
1 parent 3c6efb6 commit 8abf0da
Showing 1 changed file with 25 additions and 52 deletions.
77 changes: 25 additions & 52 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -164,31 +164,43 @@ jobs:
- name: Setuptools helpers test
run: pytest tests/extra_setuptools

valgrind:

deadsnakes:
strategy:
fail-fast: false
matrix:
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 && '-dbg' || '' }} (deadsnakes)${{ matrix.valgrind && ' • Valgrind' || '' }} • x64"
runs-on: ubuntu-latest
name: "🐍 3.9 (debug) • Valgrind"

steps:
- uses: actions/checkout@v2

- name: Install debug Python
- name: Setup Python ${{ matrix.python-version }} (deadsnakes)
uses: deadsnakes/action@v2.1.1
with:
python-version: 3.9
debug: true
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: steps.cache-valgrind.outputs.cache-hit != 'true'
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
Expand All @@ -198,13 +210,12 @@ jobs:
make -j 2 > /dev/null
- name: Install Valgrind
if: matrix.valgrind
working-directory: valgrind
run: sudo make install

- name: Install requirement for Valgrind
run: |
sudo make install
sudo apt-get update
sudo apt-get install libc6-dbg
sudo apt-get install libc6-dbg # Needed by Valgrind
- name: Prepare env
run: python -m pip install -r tests/requirements.txt --prefer-binary
Expand All @@ -224,51 +235,13 @@ jobs:
- name: Python tests
run: cmake --build build --target pytest

- name: Run Valgrind on Python tests
run: cmake --build build --target memcheck

deadsnakes:
strategy:
fail-fast: false
matrix:
python:
- version: 3.9
debug: true
- version: 3.10-dev
debug: false

name: "🐍 ${{ matrix.python.version }}${{ matrix.python.debug && ' (debug)' || '' }} • deadsnakes • x64"
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Setup Python ${{ matrix.python.version }} (deadsnakes)
uses: deadsnakes/action@v2.1.1
with:
python-version: ${{ matrix.python.version }}
debug: ${{ matrix.python.debug }}

- name: Prepare env
run: python -m pip install -r tests/requirements.txt --prefer-binary

- name: Configure
run: >
cmake -S . -B build
-DPYBIND11_WERROR=ON
-DDOWNLOAD_CATCH=ON
-DDOWNLOAD_EIGEN=ON
-DCMAKE_CXX_STANDARD=17
- name: Build
run: cmake --build build -j 2

- name: Python tests
run: cmake --build build --target pytest

- 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:
Expand Down

0 comments on commit 8abf0da

Please sign in to comment.