-
Notifications
You must be signed in to change notification settings - Fork 29
61 lines (52 loc) · 1.68 KB
/
valgrind.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Valgrind
on:
pull_request:
branches:
- master
workflow_dispatch:
defaults:
run:
shell: bash
jobs:
pre_job:
# continue-on-error: true # Uncomment once integration is finished
runs-on: ubuntu-latest
# Map a step output to a job output
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@master
with:
# All of these options are optional, so you can remove them if you are happy with the defaults
cancel_others: 'true'
do_not_skip: '["pull_request", "workflow_dispatch", "schedule"]'
build:
name: Valgrind
needs: pre_job
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
with:
submodules: false
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- 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 pytest
- name: Install
run: |
# temp fix for Valgrind issue with later versions
pip install scipy==1.9.1
CMAKE_ARGS="-DCMAKE_BUILD_TYPE=Debug" pip install . -v
- name: Test
run: |
cd tests
PYTHONMALLOC=malloc valgrind --leak-check=yes --track-origins=yes --log-file=valgrind-log.txt python -m pytest test_phik.py -W ignore::DeprecationWarning