Skip to content

Commit a9801f9

Browse files
jeplerdpgeorge
authored andcommitted
github/workflows: Use Python 3.11 for unix coverage testing.
This removes the need for an explicit `sys_settrace_features.py.exp` file. This means that people testing locally will also need to install Python 3.11 in some way, such as with pyenv or uv, and use it during `make VARIANT=coverage test`, or they will get failures. When using Python from GitHub actions/setup-python, pip3 can't be wrapped by sudo, because this invokes the operating system python instead. Signed-off-by: Jeff Epler <jepler@gmail.com>
1 parent a8c2b91 commit a9801f9

File tree

2 files changed

+18
-3
lines changed

2 files changed

+18
-3
lines changed

.github/workflows/ports_unix.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,11 @@ jobs:
7171
runs-on: ubuntu-latest
7272
steps:
7373
- uses: actions/checkout@v4
74+
- uses: actions/setup-python@v5
75+
# Python 3.12 is the default for ubuntu-24.04, but that has compatibility issues with settrace tests.
76+
# Can remove this step when ubuntu-latest uses a more recent Python 3.x as the default.
77+
with:
78+
python-version: '3.11'
7479
- name: Install packages
7580
run: source tools/ci.sh && ci_unix_coverage_setup
7681
- name: Build
@@ -250,6 +255,11 @@ jobs:
250255
runs-on: ubuntu-latest
251256
steps:
252257
- uses: actions/checkout@v4
258+
- uses: actions/setup-python@v5
259+
# Python 3.12 is the default for ubuntu-24.04, but that has compatibility issues with settrace tests.
260+
# Can remove this step when ubuntu-latest uses a more recent Python 3.x as the default.
261+
with:
262+
python-version: '3.11'
253263
- name: Install packages
254264
run: source tools/ci.sh && ci_unix_coverage_setup
255265
- name: Build
@@ -270,6 +280,11 @@ jobs:
270280
runs-on: ubuntu-latest
271281
steps:
272282
- uses: actions/checkout@v4
283+
- uses: actions/setup-python@v5
284+
# Python 3.12 is the default for ubuntu-24.04, but that has compatibility issues with settrace tests.
285+
# Can remove this step when ubuntu-latest uses a more recent Python 3.x as the default.
286+
with:
287+
python-version: '3.11'
273288
- name: Install packages
274289
run: source tools/ci.sh && ci_unix_coverage_setup
275290
- name: Build

tools/ci.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -612,9 +612,9 @@ function ci_unix_standard_v2_run_tests {
612612
}
613613

614614
function ci_unix_coverage_setup {
615-
sudo pip3 install setuptools
616-
sudo pip3 install pyelftools
617-
sudo pip3 install ar
615+
pip3 install setuptools
616+
pip3 install pyelftools
617+
pip3 install ar
618618
gcc --version
619619
python3 --version
620620
}

0 commit comments

Comments
 (0)