Skip to content

Commit 3452630

Browse files
godlygeekpablogsal
authored andcommitted
ci: Run coverage analysis with Python 3.13
Update to run Coverage with a more recent Python version. Now that we have tests exercising Python object lifetime tracking which require 3.13, there's a large number of tests that are skipped on Python 3.10, causing false negatives on coverage reports. Signed-off-by: Pablo Galindo <[email protected]> Signed-off-by: Matt Wozniski <[email protected]>
1 parent 370a0bd commit 3452630

File tree

2 files changed

+17
-12
lines changed

2 files changed

+17
-12
lines changed

.github/workflows/coverage.yml

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,17 @@ concurrency:
2323

2424
jobs:
2525
coverage:
26-
runs-on: ubuntu-22.04
26+
runs-on: ubuntu-24.04
27+
env:
28+
PYTHON: python3.13
29+
MEMRAY_MINIMIZE_INLINING: 1
2730
strategy:
2831
fail-fast: false
2932
steps:
3033
- uses: actions/checkout@v5
31-
- name: Set up Python
32-
uses: actions/setup-python@v6
33-
with:
34-
python-version: "3.10"
3534
- name: Set up dependencies
3635
run: |
36+
sudo add-apt-repository ppa:deadsnakes/ppa
3737
sudo apt-get update
3838
sudo apt-get install -qy \
3939
pkg-config \
@@ -44,18 +44,23 @@ jobs:
4444
lcov \
4545
libdw-dev \
4646
libelf-dev \
47-
python3.10-dev \
48-
python3.10-dbg
47+
${PYTHON}-dev \
48+
${PYTHON}-dbg \
49+
${PYTHON}-venv
50+
- name: Create a virtualenv
51+
run: |
52+
${PYTHON} -m venv /tmp/coverage-venv
53+
- name: Set up PATH
54+
run: |
55+
echo /tmp/coverage-venv/bin >>"$GITHUB_PATH"
56+
echo /home/runner/node_modules/.bin >>"$GITHUB_PATH"
4957
- name: Install Python dependencies
5058
run: |
51-
python3 -m pip install --upgrade pip cython pkgconfig
59+
${PYTHON} -m pip install --upgrade pip cython pkgconfig
5260
make test-install
5361
- name: Disable ptrace security restrictions
5462
run: |
5563
echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope
56-
- name: Add ./node_modules/.bin to PATH
57-
run: |
58-
export PATH="./node_modules/.bin:$PATH"
5964
- name: Compute C++ coverage
6065
run: |
6166
make ccoverage

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ helgrind: ## Run helgrind, with the correct configuration
126126
.PHONY: ccoverage
127127
ccoverage: ## Run the test suite, with C++ code coverage
128128
$(MAKE) clean
129-
CFLAGS="$(CFLAGS) -O0 -pg --coverage" $(MAKE) build
129+
CFLAGS="$(CFLAGS) -O0 -pg --coverage" CXXFLAGS="$(CXXFLAGS) -O0 -pg --coverage" $(MAKE) build
130130
$(MAKE) check
131131
gcov -i build/*/src/memray/_memray -i -d
132132
lcov --capture --directory . --output-file cppcoverage.lcov

0 commit comments

Comments
 (0)