-
Notifications
You must be signed in to change notification settings - Fork 111
77 lines (64 loc) · 2.09 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: Valgrind
on:
workflow_dispatch:
inputs:
test-file:
description: 'new_test/<test-file>'
required: false
default: ""
use-server-rc:
type: boolean
description: 'Use server release candidate?'
required: true
default: false
massif:
type: boolean
description: 'Use massif for testing memory usage'
required: false
default: false
jobs:
build-manylinux-wheel:
uses: ./.github/workflows/build-wheels.yml
with:
python-tags: '["cp38"]'
platform-tag: manylinux_x86_64
sha-to-build-and-test: ${{ github.sha }}
secrets: inherit
valgrind:
env:
MASSIF_REPORT_FILE_NAME: massif.out
needs: build-manylinux-wheel
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- uses: actions/setup-python@v2
with:
python-version: '3.8'
architecture: 'x64'
- uses: actions/download-artifact@v4
with:
name: cp38-manylinux_x86_64.build
- name: Install client
run: pip install ./*.whl
- name: Install test dependencies
run: pip install -r test/requirements.txt
- name: Run EE server
uses: ./.github/actions/run-ee-server
with:
use-server-rc: ${{ inputs.use-server-rc }}
docker-hub-username: ${{ secrets.DOCKER_HUB_BOT_USERNAME }}
docker-hub-password: ${{ secrets.DOCKER_HUB_BOT_PW }}
- run: sudo apt update
- run: sudo apt install valgrind -y
- run: echo VALGRIND_ARGS="--tool=massif --massif-out-file=./${{ env.MASSIF_REPORT_FILE_NAME }}" >> $GITHUB_ENV
if: ${{ inputs.massif }}
- run: echo VALGRIND_ARGS="--leak-check=full" >> $GITHUB_ENV
if: ${{ !inputs.massif }}
- run: PYTHONMALLOC=malloc valgrind --error-exitcode=1 ${{ env.VALGRIND_ARGS }} python3 -m pytest -v new_tests/${{ github.event.inputs.test-file }}
working-directory: test
- run: ms_print ./${{ env.MASSIF_REPORT_FILE_NAME }}
if: ${{ !cancelled() && inputs.massif }}
working-directory: test