Skip to content

c: fix all memory leaks; add sanitizer checks #4940

c: fix all memory leaks; add sanitizer checks

c: fix all memory leaks; add sanitizer checks #4940

Workflow file for this run

on:
push:
pull_request:
name: Test Python
jobs:
testpython:
name: Test Python
runs-on: ubuntu-22.04
strategy:
matrix:
include:
- python: 3.8
tf:
torch:
- python: "3.11"
tf:
torch:
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
cache: 'pip'
- uses: mpi4py/setup-mpi@v1
with:
mpi: openmpi
# https://github.com/pypa/pip/issues/11770
- run: python -m pip install -U "pip>=21.3.1,!=23.0.0"
- run: python -m pip install -U "torch==${{ matrix.torch }}" "numpy<1.20"
if: matrix.torch != ''
- run: pip install -e .[cpu,test,torch]
env:
TENSORFLOW_VERSION: ${{ matrix.tf }}
DP_BUILD_TESTING: 1
- run: pip install horovod mpi4py
env:
HOROVOD_WITH_TENSORFLOW: 1
HOROVOD_WITHOUT_PYTORCH: 1
HOROVOD_WITHOUT_GLOO: 1
- run: dp --version
- run: pytest --cov=deepmd source/tests --durations=0
env:
NUM_WORKERS: 0
- uses: codecov/codecov-action@v3
with:
gcov: true
pass:
name: Pass testing Python
needs: [testpython]
runs-on: ubuntu-latest
if: always()
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}