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.

Signed-off-by: Ilya Maximets <i.maxim...@ovn.org>
---

CC: David Marchand <dmarc...@redhat.com>
CC: Kevin Traynor <ktray...@redhat.com>

 .ci/dpdk-prepare.sh                  |  2 +-
 .github/workflows/build-and-test.yml | 11 +++++++----
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/.ci/dpdk-prepare.sh b/.ci/dpdk-prepare.sh
index f7e6215dd..4424f9eb9 100755
--- a/.ci/dpdk-prepare.sh
+++ b/.ci/dpdk-prepare.sh
@@ -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'
diff --git a/.github/workflows/build-and-test.yml 
b/.github/workflows/build-and-test.yml
index 6f5139304..44491db3e 100644
--- a/.github/workflows/build-and-test.yml
+++ b/.github/workflows/build-and-test.yml
@@ -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
-- 
2.44.0

_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to