-
Notifications
You must be signed in to change notification settings - Fork 4
48 lines (40 loc) · 1.27 KB
/
profiling.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
name: Profiling
on:
workflow_dispatch:
jobs:
valgrind:
name: Valgrind Massif
runs-on: ubuntu-20.04
env:
CC: clang
CXX: clang++
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install prerequisites and test data
run: |
sudo apt-get install valgrind
python -m pip install pip --upgrade
pip install -r requirements.txt
mkdir -p test/data/profiling
wget -q https://imagecompression.info/test_images/rgb8bit.zip
unzip -d test/data/profiling rgb8bit.zip
rm rgb8bit.zip
cat test/data/profiling/readme.txt
- name: Build and install package for Valgrind
run: |
python setup.py --build-type=RelWithDebInfo install
- name: Run Valgrind Massif
run: |
MASSIF_FILE=massif.out.${GITHUB_SHA:0:8}
valgrind --tool=massif --massif-out-file=${MASSIF_FILE} \
pytest -v --profile --data test/data/profiling test/test_profile.py
ms_print ${MASSIF_FILE}
- name: Upload log files
uses: actions/upload-artifact@v3
with:
path: massif.*