From 2018c37ca02a31a3795ef101444482d2240c402e Mon Sep 17 00:00:00 2001 From: Artem Gavrilov Date: Fri, 6 Jun 2025 20:51:49 +0200 Subject: [PATCH] Use ubuntu 24.04 in CI Ubuntu 24.04 image has Python 3.12 by default. PyKMIP server and CodeCheker tool don't support this version, so we have to downgrade Python version to 3.11. --- .github/workflows/build-and-test.yml | 19 ++++++++++++++++++- .github/workflows/codechecker.yml | 8 +++++++- .github/workflows/coverage.yml | 8 +++++++- .github/workflows/matirx.yml | 4 ++-- ci_scripts/ubuntu-deps.sh | 8 +------- 5 files changed, 35 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 41af1a40686ba..0d64496bb05e8 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -31,6 +31,12 @@ jobs: submodules: recursive ref: ${{ github.ref }} + # KMIP server don't support Python 3.12 for now: https://github.com/OpenKMIP/PyKMIP/pull/707 + - name: Downgrade python to 3.11 + uses: actions/setup-python@v5 + with: + python-version: 3.11 + - name: Install dependencies run: src/ci_scripts/ubuntu-deps.sh @@ -64,9 +70,14 @@ jobs: - name: Extract artifact file run: tar -xzf artifacts.tar + - name: Downgrade python to 3.11 + uses: actions/setup-python@v5 + with: + python-version: 3.11 + - name: Install dependencies run: src/ci_scripts/ubuntu-deps.sh - + - name: Setup kmip and vault run: src/ci_scripts/setup-keyring-servers.sh @@ -109,6 +120,12 @@ jobs: - name: Extract artifact file run: tar -xzf artifacts.tar + # KMIP server don't support Python 3.12 for now: https://github.com/OpenKMIP/PyKMIP/pull/707 + - name: Downgrade python to 3.11 + uses: actions/setup-python@v5 + with: + python-version: 3.11 + - name: Install dependencies run: src/ci_scripts/ubuntu-deps.sh diff --git a/.github/workflows/codechecker.yml b/.github/workflows/codechecker.yml index 62d7e62cc5abf..d8f6866e9d661 100644 --- a/.github/workflows/codechecker.yml +++ b/.github/workflows/codechecker.yml @@ -11,13 +11,19 @@ env: jobs: run: name: Run - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - name: Clone repository uses: actions/checkout@v4 with: submodules: recursive + # CodeChecker doesn't support python 3.12 for now: https://github.com/Ericsson/codechecker/issues/4350 + - name: Downgrade python to 3.11 + uses: actions/setup-python@v5 + with: + python-version: 3.11 + - name: Install dependencies run: ci_scripts/ubuntu-deps.sh diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 28e2369bf12e4..3dd4891923dcd 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -11,13 +11,19 @@ env: jobs: collect: name: Collect and upload - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - name: Clone repository uses: actions/checkout@v4 with: submodules: recursive + # KMIP server doesn't support Python 3.12 for now: https://github.com/OpenKMIP/PyKMIP/pull/707 + - name: Downgrade python to 3.11 + uses: actions/setup-python@v5 + with: + python-version: 3.11 + - name: Install dependencies run: ci_scripts/ubuntu-deps.sh diff --git a/.github/workflows/matirx.yml b/.github/workflows/matirx.yml index 39248232c4a4d..45e4bc6134243 100644 --- a/.github/workflows/matirx.yml +++ b/.github/workflows/matirx.yml @@ -11,7 +11,7 @@ jobs: name: Main matrix strategy: matrix: - os: [ubuntu-22.04] + os: [ubuntu-24.04] compiler: [gcc, clang] build_type: [debugoptimized] build_script: [make, meson] @@ -28,7 +28,7 @@ jobs: if: github.event_name != 'pull_request' strategy: matrix: - os: [ubuntu-22.04-arm] + os: [ubuntu-24.04-arm] compiler: [gcc, clang] build_type: [debugoptimized] build_script: [make, meson] diff --git a/ci_scripts/ubuntu-deps.sh b/ci_scripts/ubuntu-deps.sh index d998289a55163..19696459d6c27 100755 --- a/ci_scripts/ubuntu-deps.sh +++ b/ci_scripts/ubuntu-deps.sh @@ -29,11 +29,6 @@ DEPS=( mawk perl pkgconf - python3-dev - python3 - python3-pip - python3-setuptools - python3-wheel systemtap-sdt-dev tcl-dev uuid-dev @@ -45,7 +40,6 @@ DEPS=( # Test libipc-run-perl # Test pg_tde - python3-pykmip libhttp-server-simple-perl lcov # Run pgperltidy @@ -56,7 +50,7 @@ sudo apt-get update sudo apt-get install -y ${DEPS[@]} sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" -pip3 install meson +pip3 install meson pykmip cryptography setuptools wheel # Vault wget -O - https://apt.releases.hashicorp.com/gpg | sudo tee /etc/apt/keyrings/hashicorp-archive-keyring.asc