2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-22 01:51:26 +00:00

github: Update python to 3.12.

We pinned the python version to 3.9 because we had issues building
older meson 0.47.1 with python 3.10.  Since then meson was updated to
0.53.2 in our CI, but we didn't reconsider the python version.

Newer versions of python uncover more issues with our python files.
And newer major distributions are using newer versions of python.  But
we do not really want to use bleeding edge of python releases either to
avoid unexpected CI failures that need immediate fixes.

Pin python version to 3.12 as it is the latest released version and we
should not have any issues with this version.

While at it, updating meson to a newer version that plays nicely with
python 3.12.  We do not really care much about the version we use here
as long as it is able to build the version of DPDK we're using.  Meson
has no LTS releases, as far as I can tell, so just choosing the latest
stable 1.4.x series.  It should be fine to use for a next few years.
Major distributions are using 1.0+ versions.  Upcoming F40 and Ubuntu
24.03 have meson 1.3.

It would also be nice to test the minimal supported version of python,
but 3.6 is not available in setup-python for 22.04.  The oldest is 3.7.
And 3.7 is EoL, so pip fails to install some of our dependencies.  The
oldest version we can use today is 3.8.  But, in the end, this becomes
a race against older python versions reaching end of their life and
packages dropping support of these versions.  This may cause unexpected
CI failures.  So, not doing that for now.

Acked-by: Simon Horman <horms@ovn.org>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
This commit is contained in:
Ilya Maximets 2024-04-11 00:43:30 +02:00
parent dd24c57ded
commit 16b7475414
2 changed files with 8 additions and 5 deletions

View File

@ -8,4 +8,4 @@ set -ev
# https://github.com/pypa/pip/issues/10655
pip3 install --disable-pip-version-check --user wheel
pip3 install --disable-pip-version-check --user pyelftools
pip3 install --user 'meson==0.53.2'
pip3 install --user 'meson>=1.4,<1.5'

View File

@ -2,6 +2,9 @@ name: Build and Test
on: [push, pull_request]
env:
python_default: 3.12
jobs:
build-dpdk:
env:
@ -54,7 +57,7 @@ jobs:
if: steps.dpdk_cache.outputs.cache-hit != 'true'
uses: actions/setup-python@v5
with:
python-version: '3.9'
python-version: ${{ env.python_default }}
- name: update APT cache
if: steps.dpdk_cache.outputs.cache-hit != 'true'
@ -217,7 +220,7 @@ jobs:
- name: set up python
uses: actions/setup-python@v5
with:
python-version: '3.9'
python-version: ${{ env.python_default }}
- name: cache
if: matrix.dpdk != '' || matrix.dpdk_shared != ''
@ -354,7 +357,7 @@ jobs:
- name: set up python
uses: actions/setup-python@v5
with:
python-version: '3.9'
python-version: ${{ env.python_default }}
- name: get cached dpdk-dir
uses: actions/cache/restore@v4
@ -407,7 +410,7 @@ jobs:
- name: set up python
uses: actions/setup-python@v5
with:
python-version: '3.9'
python-version: ${{ env.python_default }}
- name: install dependencies
run: brew install automake libtool
- name: prepare