mirror of
https://github.com/micropython/micropython.git
synced 2025-07-21 21:11:12 +02:00
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>
This commit is contained in:
committed by
Damien George
parent
a8c2b917e2
commit
a9801f9960
15
.github/workflows/ports_unix.yml
vendored
15
.github/workflows/ports_unix.yml
vendored
@@ -71,6 +71,11 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
- uses: actions/setup-python@v5
|
||||||
|
# Python 3.12 is the default for ubuntu-24.04, but that has compatibility issues with settrace tests.
|
||||||
|
# Can remove this step when ubuntu-latest uses a more recent Python 3.x as the default.
|
||||||
|
with:
|
||||||
|
python-version: '3.11'
|
||||||
- name: Install packages
|
- name: Install packages
|
||||||
run: source tools/ci.sh && ci_unix_coverage_setup
|
run: source tools/ci.sh && ci_unix_coverage_setup
|
||||||
- name: Build
|
- name: Build
|
||||||
@@ -250,6 +255,11 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
- uses: actions/setup-python@v5
|
||||||
|
# Python 3.12 is the default for ubuntu-24.04, but that has compatibility issues with settrace tests.
|
||||||
|
# Can remove this step when ubuntu-latest uses a more recent Python 3.x as the default.
|
||||||
|
with:
|
||||||
|
python-version: '3.11'
|
||||||
- name: Install packages
|
- name: Install packages
|
||||||
run: source tools/ci.sh && ci_unix_coverage_setup
|
run: source tools/ci.sh && ci_unix_coverage_setup
|
||||||
- name: Build
|
- name: Build
|
||||||
@@ -270,6 +280,11 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
- uses: actions/setup-python@v5
|
||||||
|
# Python 3.12 is the default for ubuntu-24.04, but that has compatibility issues with settrace tests.
|
||||||
|
# Can remove this step when ubuntu-latest uses a more recent Python 3.x as the default.
|
||||||
|
with:
|
||||||
|
python-version: '3.11'
|
||||||
- name: Install packages
|
- name: Install packages
|
||||||
run: source tools/ci.sh && ci_unix_coverage_setup
|
run: source tools/ci.sh && ci_unix_coverage_setup
|
||||||
- name: Build
|
- name: Build
|
||||||
|
@@ -612,9 +612,9 @@ function ci_unix_standard_v2_run_tests {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function ci_unix_coverage_setup {
|
function ci_unix_coverage_setup {
|
||||||
sudo pip3 install setuptools
|
pip3 install setuptools
|
||||||
sudo pip3 install pyelftools
|
pip3 install pyelftools
|
||||||
sudo pip3 install ar
|
pip3 install ar
|
||||||
gcc --version
|
gcc --version
|
||||||
python3 --version
|
python3 --version
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user