From f34b9544c32e2384105b855b0dcf844115038e64 Mon Sep 17 00:00:00 2001 From: Pankhudi Jain Date: Fri, 23 Jan 2026 14:34:27 +0530 Subject: [PATCH 1/4] Added support for ppc64le architecture to build wheel in kit.yml and tested jobs for ppc64le in testsuite.yml --- .github/workflows/kit.yml | 22 +++++++++--- .github/workflows/publish.yml | 2 +- .github/workflows/testsuite.yml | 59 +++++++++++++++++++++++++++++++++ 3 files changed, 78 insertions(+), 5 deletions(-) diff --git a/.github/workflows/kit.yml b/.github/workflows/kit.yml index 8a30ae287..6f9e2a310 100644 --- a/.github/workflows/kit.yml +++ b/.github/workflows/kit.yml @@ -36,7 +36,7 @@ env: PIP_DISABLE_PIP_VERSION_CHECK: 1 # PYVERSIONS: changing the list of versions will change the number of # expected distributions. This must match the same number in publish.yml. - EXPECTED: 92 + EXPECTED: 106 permissions: contents: read @@ -48,7 +48,7 @@ concurrency: jobs: wheels: name: "${{ matrix.py }} ${{ matrix.os }} ${{ matrix.arch }} wheels" - runs-on: "${{ matrix.os }}-${{ matrix.os-version || 'latest' }}" + runs-on: "${{ matrix.arch == 'ppc64le' && matrix.os || (format('{0}-{1}', matrix.os, matrix.os-version || 'latest'))}}" env: MATRIX_ID: "${{ matrix.py }}-${{ matrix.os }}-${{ matrix.arch }}" strategy: @@ -73,7 +73,7 @@ jobs: # # # For each OS, what arch to use with cibuildwheel: # os_archs = { - # "ubuntu": ["x86_64", "i686", "aarch64", "riscv64"], + # "ubuntu": ["x86_64", "i686", "aarch64", "riscv64", ppc64le], # "macos": ["arm64", "x86_64"], # "windows": ["x86", "AMD64", "ARM64"], # } @@ -157,6 +157,11 @@ jobs: - {"os": "windows", "py": "cp312", "arch": "ARM64", "cipy": "3.11", "os-version": "11-arm"} - {"os": "windows", "py": "cp313", "arch": "ARM64", "cipy": "3.11", "os-version": "11-arm"} - {"os": "windows", "py": "cp314", "arch": "ARM64", "cipy": "3.11", "os-version": "11-arm"} + - {"os": "ubuntu-24.04-ppc64le", "py": "cp310", "arch": "ppc64le", "cipy": "3.11"} + - {"os": "ubuntu-24.04-ppc64le", "py": "cp311", "arch": "ppc64le", "cipy": "3.11"} + - {"os": "ubuntu-24.04-ppc64le", "py": "cp312", "arch": "ppc64le", "cipy": "3.11"} + - {"os": "ubuntu-24.04-ppc64le", "py": "cp313", "arch": "ppc64le", "cipy": "3.11"} + - {"os": "ubuntu-24.04-ppc64le", "py": "cp314", "arch": "ppc64le", "cipy": "3.11"} # [[[end]]] (sum: UDdYTxMoTi) # ^^^^^^^^^^^^^^^ # If a check fails and points to this checksum line, it means you edited @@ -172,13 +177,22 @@ jobs: with: persist-credentials: false - - name: "Install Python" + - if: ${{ matrix.arch != 'ppc64le' }} + name: "Install Python" uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0 with: python-version: "${{ matrix.cipy }}" cache: pip cache-dependency-path: 'requirements/*.pip' + - if: ${{ matrix.arch == 'ppc64le' }} + name: "Install Python" + run: | + sudo apt update -y + sudo apt install -y python3 python3-pip python3-dev + python3 -m pip install --upgrade pip + python3 -m pip install cibuildwheel + # Rust toolchain is not currently installed on windows arm64 images. # We need it for nh3, needed by readme-renderer, needed by twine. # https://github.com/actions/partner-runner-images/issues/77 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 3f6817651..111b6712f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -17,7 +17,7 @@ defaults: env: # PYVERSIONS: changing the list of versions will change the number of # expected distributions. This must match the same number in kit.yml. - EXPECTED: 92 + EXPECTED: 106 permissions: contents: read diff --git a/.github/workflows/testsuite.yml b/.github/workflows/testsuite.yml index b870b6ce4..13adf7429 100644 --- a/.github/workflows/testsuite.yml +++ b/.github/workflows/testsuite.yml @@ -161,6 +161,64 @@ jobs: # `exit 1` makes sure that the job remains red with flaky runs python -m tox -- -rfsEX --lf -vvvvv && exit 1 + ppc64le-tests: + name: "${{ matrix.python-version }} on ${{ matrix.arch }}" + runs-on: ubuntu-24.04-ppc64le + timeout-minutes: 10 + + # Don't run tests if the branch name includes "-notests". + # Only run tests if files that affect tests have changed. + needs: changed + if: + needs.changed.outputs.run_tests == 'true' + && !contains(github.ref, '-notests') + + env: + TOX_GH_MAJOR_MINOR: "${{ matrix.python-version }}" + + strategy: + matrix: + arch: + - ppc64le + python-version: + - "3.10" + - "3.11" + - "3.12" + - "3.13" + - "3.14" + - "3.15" + + fail-fast: false + + steps: + - name: "Check out the repo" + uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + with: + persist-credentials: false + + - name: "Set up Python" + run: | + sudo apt update + sudo apt install software-properties-common gcc gfortran build-essential -y + sudo add-apt-repository ppa:deadsnakes/ppa -y + sudo apt update + sudo apt install python${{ matrix.python-version }} python${{ matrix.python-version }}-venv python${{ matrix.python-version }}-dev -y + + - name: "Install dependencies" + run: | + set -xe + python${{ matrix.python-version }} -m pip install -r requirements/tox.pip + + - name: "Run tox for ${{ matrix.python-version }}" + run: | + python${{ matrix.python-version }} -m tox -- -rfsEX + + - name: "Retry tox for ${{ matrix.python-version }}" + if: failure() + run: | + # `exit 1` makes sure that the job remains red with flaky runs + python${{ matrix.python-version }} -m tox -- -rfsEX --lf -vvvvv && exit 1 + # This job aggregates test results. It's the required check for branch protection. # https://github.com/marketplace/actions/alls-green#why # https://github.com/orgs/community/discussions/33579 @@ -168,6 +226,7 @@ jobs: name: Tests successful needs: - tests + - ppc64le-tests runs-on: ubuntu-latest steps: - name: Decide whether the needed jobs succeeded or failed From 196a826076a1b80d7f5f8baa11d5bf6a185f3a59 Mon Sep 17 00:00:00 2001 From: Pankhudi Jain Date: Fri, 23 Jan 2026 15:52:42 +0530 Subject: [PATCH 2/4] fix zizmor reported template injection issue --- .github/workflows/kit.yml | 2 +- .github/workflows/testsuite.yml | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/kit.yml b/.github/workflows/kit.yml index 6f9e2a310..7315c45bf 100644 --- a/.github/workflows/kit.yml +++ b/.github/workflows/kit.yml @@ -73,7 +73,7 @@ jobs: # # # For each OS, what arch to use with cibuildwheel: # os_archs = { - # "ubuntu": ["x86_64", "i686", "aarch64", "riscv64", ppc64le], + # "ubuntu": ["x86_64", "i686", "aarch64", "riscv64", "ppc64le"], # "macos": ["arm64", "x86_64"], # "windows": ["x86", "AMD64", "ARM64"], # } diff --git a/.github/workflows/testsuite.yml b/.github/workflows/testsuite.yml index 13adf7429..336235c4c 100644 --- a/.github/workflows/testsuite.yml +++ b/.github/workflows/testsuite.yml @@ -175,6 +175,7 @@ jobs: env: TOX_GH_MAJOR_MINOR: "${{ matrix.python-version }}" + PYTHON_VERSION: "${{ matrix.python-version }}" strategy: matrix: @@ -202,22 +203,22 @@ jobs: sudo apt install software-properties-common gcc gfortran build-essential -y sudo add-apt-repository ppa:deadsnakes/ppa -y sudo apt update - sudo apt install python${{ matrix.python-version }} python${{ matrix.python-version }}-venv python${{ matrix.python-version }}-dev -y + sudo apt install python${PYTHON_VERSION} python${PYTHON_VERSION}-venv python${PYTHON_VERSION}-dev -y - name: "Install dependencies" run: | set -xe - python${{ matrix.python-version }} -m pip install -r requirements/tox.pip + python${PYTHON_VERSION} -m pip install -r requirements/tox.pip - name: "Run tox for ${{ matrix.python-version }}" run: | - python${{ matrix.python-version }} -m tox -- -rfsEX + python${PYTHON_VERSION} -m tox -- -rfsEX - name: "Retry tox for ${{ matrix.python-version }}" if: failure() run: | # `exit 1` makes sure that the job remains red with flaky runs - python${{ matrix.python-version }} -m tox -- -rfsEX --lf -vvvvv && exit 1 + python${PYTHON_VERSION} -m tox -- -rfsEX --lf -vvvvv && exit 1 # This job aggregates test results. It's the required check for branch protection. # https://github.com/marketplace/actions/alls-green#why From 3a990238df411c8f45fce6a0da09aa79716530bd Mon Sep 17 00:00:00 2001 From: Pankhudi Jain Date: Thu, 29 Jan 2026 17:41:59 +0530 Subject: [PATCH 3/4] Incorporated review comments --- .github/workflows/kit.yml | 20 +++----- .github/workflows/testsuite.yml | 87 ++++++++++----------------------- 2 files changed, 32 insertions(+), 75 deletions(-) diff --git a/.github/workflows/kit.yml b/.github/workflows/kit.yml index 245cd0e9a..4b89652f7 100644 --- a/.github/workflows/kit.yml +++ b/.github/workflows/kit.yml @@ -103,6 +103,8 @@ jobs: # "arch": the_arch, # "cipy": cipy, # } + # if the_arch == "ppc64le": + # them["os"] == "ubuntu-24.04-ppc64le" # if the_os == "macos": # them["os-version"] = "14" # if the_os == "windows" and the_arch == "ARM64": @@ -133,6 +135,11 @@ jobs: - {"os": "ubuntu", "py": "cp312", "arch": "riscv64", "cipy": "3.11"} - {"os": "ubuntu", "py": "cp313", "arch": "riscv64", "cipy": "3.11"} - {"os": "ubuntu", "py": "cp314", "arch": "riscv64", "cipy": "3.11"} + - {"os": "ubuntu-24.04-ppc64le", "py": "cp310", "arch": "ppc64le", "cipy": "3.11"} + - {"os": "ubuntu-24.04-ppc64le", "py": "cp311", "arch": "ppc64le", "cipy": "3.11"} + - {"os": "ubuntu-24.04-ppc64le", "py": "cp312", "arch": "ppc64le", "cipy": "3.11"} + - {"os": "ubuntu-24.04-ppc64le", "py": "cp313", "arch": "ppc64le", "cipy": "3.11"} + - {"os": "ubuntu-24.04-ppc64le", "py": "cp314", "arch": "ppc64le", "cipy": "3.11"} - {"os": "macos", "py": "cp310", "arch": "arm64", "cipy": "3.11", "os-version": "14"} - {"os": "macos", "py": "cp311", "arch": "arm64", "cipy": "3.11", "os-version": "14"} - {"os": "macos", "py": "cp312", "arch": "arm64", "cipy": "3.11", "os-version": "14"} @@ -157,11 +164,6 @@ jobs: - {"os": "windows", "py": "cp312", "arch": "ARM64", "cipy": "3.11", "os-version": "11-arm"} - {"os": "windows", "py": "cp313", "arch": "ARM64", "cipy": "3.11", "os-version": "11-arm"} - {"os": "windows", "py": "cp314", "arch": "ARM64", "cipy": "3.11", "os-version": "11-arm"} - - {"os": "ubuntu-24.04-ppc64le", "py": "cp310", "arch": "ppc64le", "cipy": "3.11"} - - {"os": "ubuntu-24.04-ppc64le", "py": "cp311", "arch": "ppc64le", "cipy": "3.11"} - - {"os": "ubuntu-24.04-ppc64le", "py": "cp312", "arch": "ppc64le", "cipy": "3.11"} - - {"os": "ubuntu-24.04-ppc64le", "py": "cp313", "arch": "ppc64le", "cipy": "3.11"} - - {"os": "ubuntu-24.04-ppc64le", "py": "cp314", "arch": "ppc64le", "cipy": "3.11"} # [[[end]]] (sum: UDdYTxMoTi) # ^^^^^^^^^^^^^^^ # If a check fails and points to this checksum line, it means you edited @@ -185,14 +187,6 @@ jobs: cache: pip cache-dependency-path: 'requirements/*.pip' - - if: ${{ matrix.arch == 'ppc64le' }} - name: "Install Python" - run: | - sudo apt update -y - sudo apt install -y python3 python3-pip python3-dev - python3 -m pip install --upgrade pip - python3 -m pip install cibuildwheel - # Rust toolchain is not currently installed on windows arm64 images. # We need it for nh3, needed by readme-renderer, needed by twine. # https://github.com/actions/partner-runner-images/issues/77 diff --git a/.github/workflows/testsuite.yml b/.github/workflows/testsuite.yml index b9bcce2e6..bc44f7596 100644 --- a/.github/workflows/testsuite.yml +++ b/.github/workflows/testsuite.yml @@ -60,7 +60,7 @@ jobs: tests: name: "${{ matrix.python-version }} on ${{ matrix.os }}" - runs-on: "${{ matrix.os }}-${{ matrix.os-version }}" + runs-on: ${{ matrix.os == 'ppc64le' && 'ubuntu-24.04-ppc64le' || (format('{0}-{1}', matrix.os, matrix.os-version))}} timeout-minutes: 15 # Don't run tests if the branch name includes "-notests". @@ -79,6 +79,7 @@ jobs: - ubuntu - macos - windows + - ppc64le os-version: - latest python-version: @@ -98,6 +99,20 @@ jobs: - "3.15t" - "pypy-3.10" - "pypy-3.11" + + exclude: + - os: ppc64le + python-version: "3.13t" + - os: ppc64le + python-version: "3.14t" + - os: ppc64le + python-version: "3.15" + - os: ppc64le + python-version: "3.15t" + - os: ppc64le + python-version: "pypy-3.10" + - os: ppc64le + python-version: "pypy-3.11" # # If we need to exclude any combinations, do it like this: # exclude: @@ -120,7 +135,8 @@ jobs: with: persist-credentials: false - - name: "Set up Python" + - if: ${{ matrix.os != 'ppc64le' }} + name: "Set up Python" uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0 with: python-version: "${{ matrix.python-version }}" @@ -131,6 +147,13 @@ jobs: #cache: pip #cache-dependency-path: 'requirements/*.pip' + - if: ${{ matrix.os == 'ppc64le' }} + name: Set up Python + uses: IBM/setup-python-pz@v6 + with: + python-version: "${{ matrix.python-version }}" + architecture: ppc64le + - name: "Show environment" run: | set -xe @@ -161,65 +184,6 @@ jobs: # `exit 1` makes sure that the job remains red with flaky runs python -m tox -- -rfsEX --lf -vvvvv && exit 1 - ppc64le-tests: - name: "${{ matrix.python-version }} on ${{ matrix.arch }}" - runs-on: ubuntu-24.04-ppc64le - timeout-minutes: 10 - - # Don't run tests if the branch name includes "-notests". - # Only run tests if files that affect tests have changed. - needs: changed - if: - needs.changed.outputs.run_tests == 'true' - && !contains(github.ref, '-notests') - - env: - TOX_GH_MAJOR_MINOR: "${{ matrix.python-version }}" - PYTHON_VERSION: "${{ matrix.python-version }}" - - strategy: - matrix: - arch: - - ppc64le - python-version: - - "3.10" - - "3.11" - - "3.12" - - "3.13" - - "3.14" - - "3.15" - - fail-fast: false - - steps: - - name: "Check out the repo" - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 - with: - persist-credentials: false - - - name: "Set up Python" - run: | - sudo apt update - sudo apt install software-properties-common gcc gfortran build-essential -y - sudo add-apt-repository ppa:deadsnakes/ppa -y - sudo apt update - sudo apt install python${PYTHON_VERSION} python${PYTHON_VERSION}-venv python${PYTHON_VERSION}-dev -y - - - name: "Install dependencies" - run: | - set -xe - python${PYTHON_VERSION} -m pip install -r requirements/tox.pip - - - name: "Run tox for ${{ matrix.python-version }}" - run: | - python${PYTHON_VERSION} -m tox -- -rfsEX - - - name: "Retry tox for ${{ matrix.python-version }}" - if: failure() - run: | - # `exit 1` makes sure that the job remains red with flaky runs - python${PYTHON_VERSION} -m tox -- -rfsEX --lf -vvvvv && exit 1 - # This job aggregates test results. It's the required check for branch protection. # https://github.com/marketplace/actions/alls-green#why # https://github.com/orgs/community/discussions/33579 @@ -227,7 +191,6 @@ jobs: name: Tests successful needs: - tests - - ppc64le-tests runs-on: ubuntu-latest steps: - name: Decide whether the needed jobs succeeded or failed From a94501b3b60e51c53401c4e7faee5801176cb96c Mon Sep 17 00:00:00 2001 From: Pankhudi Jain Date: Mon, 9 Feb 2026 12:10:33 +0530 Subject: [PATCH 4/4] Reverting changes in testsuite.yml and added os-version in kit.yml file for ppc64le --- .github/workflows/kit.yml | 18 +++++++++--------- .github/workflows/testsuite.yml | 27 ++------------------------- 2 files changed, 11 insertions(+), 34 deletions(-) diff --git a/.github/workflows/kit.yml b/.github/workflows/kit.yml index f44d41967..816378285 100644 --- a/.github/workflows/kit.yml +++ b/.github/workflows/kit.yml @@ -48,7 +48,7 @@ concurrency: jobs: wheels: name: "${{ matrix.py }} ${{ matrix.os }} ${{ matrix.arch }} wheels" - runs-on: "${{ matrix.arch == 'ppc64le' && matrix.os || (format('{0}-{1}', matrix.os, matrix.os-version || 'latest'))}}" + runs-on: "${{ matrix.os }}-${{ matrix.os-version || 'latest' }}" env: MATRIX_ID: "${{ matrix.py }}-${{ matrix.os }}-${{ matrix.arch }}" strategy: @@ -103,8 +103,6 @@ jobs: # "arch": the_arch, # "cipy": cipy, # } - # if the_arch == "ppc64le": - # them["os"] = "ubuntu-24.04-ppc64le" # if the_os == "macos": # them["os-version"] = "14" # if the_os == "windows" and the_arch == "ARM64": @@ -113,6 +111,8 @@ jobs: # if the_arch == "aarch64": # # https://github.com/pypa/cibuildwheel/issues/2257 # them["os-version"] = "22.04-arm" + # if the_arch == "ppc64le": + # them["os-version"] = "24.04-ppc64le" # print(f"- {json.dumps(them)}") # ]]] - {"os": "ubuntu", "py": "cp310", "arch": "x86_64", "cipy": "3.11"} @@ -135,11 +135,11 @@ jobs: - {"os": "ubuntu", "py": "cp312", "arch": "riscv64", "cipy": "3.11"} - {"os": "ubuntu", "py": "cp313", "arch": "riscv64", "cipy": "3.11"} - {"os": "ubuntu", "py": "cp314", "arch": "riscv64", "cipy": "3.11"} - - {"os": "ubuntu-24.04-ppc64le", "py": "cp310", "arch": "ppc64le", "cipy": "3.11"} - - {"os": "ubuntu-24.04-ppc64le", "py": "cp311", "arch": "ppc64le", "cipy": "3.11"} - - {"os": "ubuntu-24.04-ppc64le", "py": "cp312", "arch": "ppc64le", "cipy": "3.11"} - - {"os": "ubuntu-24.04-ppc64le", "py": "cp313", "arch": "ppc64le", "cipy": "3.11"} - - {"os": "ubuntu-24.04-ppc64le", "py": "cp314", "arch": "ppc64le", "cipy": "3.11"} + - {"os": "ubuntu", "py": "cp310", "arch": "ppc64le", "cipy": "3.11", "os-version": "24.04-ppc64le"} + - {"os": "ubuntu", "py": "cp311", "arch": "ppc64le", "cipy": "3.11", "os-version": "24.04-ppc64le"} + - {"os": "ubuntu", "py": "cp312", "arch": "ppc64le", "cipy": "3.11", "os-version": "24.04-ppc64le"} + - {"os": "ubuntu", "py": "cp313", "arch": "ppc64le", "cipy": "3.11", "os-version": "24.04-ppc64le"} + - {"os": "ubuntu", "py": "cp314", "arch": "ppc64le", "cipy": "3.11", "os-version": "24.04-ppc64le"} - {"os": "macos", "py": "cp310", "arch": "arm64", "cipy": "3.11", "os-version": "14"} - {"os": "macos", "py": "cp311", "arch": "arm64", "cipy": "3.11", "os-version": "14"} - {"os": "macos", "py": "cp312", "arch": "arm64", "cipy": "3.11", "os-version": "14"} @@ -164,7 +164,7 @@ jobs: - {"os": "windows", "py": "cp312", "arch": "ARM64", "cipy": "3.11", "os-version": "11-arm"} - {"os": "windows", "py": "cp313", "arch": "ARM64", "cipy": "3.11", "os-version": "11-arm"} - {"os": "windows", "py": "cp314", "arch": "ARM64", "cipy": "3.11", "os-version": "11-arm"} - # [[[end]]] (sum: GLlE/BLyNS) + # [[[end]]] (sum: AhCqn9SafY) # ^^^^^^^^^^^^^^^ # If a check fails and points to this checksum line, it means you edited # the matrix directly instead of editing the Python code in the comment diff --git a/.github/workflows/testsuite.yml b/.github/workflows/testsuite.yml index f7dd1896b..d1ce49c42 100644 --- a/.github/workflows/testsuite.yml +++ b/.github/workflows/testsuite.yml @@ -60,7 +60,7 @@ jobs: tests: name: "${{ matrix.python-version }} on ${{ matrix.os }}" - runs-on: ${{ matrix.os == 'ppc64le' && 'ubuntu-24.04-ppc64le' || (format('{0}-{1}', matrix.os, matrix.os-version))}} + runs-on: "${{ matrix.os }}-${{ matrix.os-version }}" timeout-minutes: 15 # Don't run tests if the branch name includes "-notests". @@ -79,7 +79,6 @@ jobs: - ubuntu - macos - windows - - ppc64le os-version: - latest python-version: @@ -99,20 +98,6 @@ jobs: - "3.15t" - "pypy-3.10" - "pypy-3.11" - - exclude: - - os: ppc64le - python-version: "3.13t" - - os: ppc64le - python-version: "3.14t" - - os: ppc64le - python-version: "3.15" - - os: ppc64le - python-version: "3.15t" - - os: ppc64le - python-version: "pypy-3.10" - - os: ppc64le - python-version: "pypy-3.11" # # If we need to exclude any combinations, do it like this: # exclude: @@ -135,8 +120,7 @@ jobs: with: persist-credentials: false - - if: ${{ matrix.os != 'ppc64le' }} - name: "Set up Python" + - name: "Set up Python" uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 with: python-version: "${{ matrix.python-version }}" @@ -147,13 +131,6 @@ jobs: #cache: pip #cache-dependency-path: 'requirements/*.pip' - - if: ${{ matrix.os == 'ppc64le' }} - name: Set up Python (ppc64le) - uses: IBM/setup-python-pz@4ca38bfac8eac147e9c7aad9ab246f68655afb36 - with: - python-version: "${{ matrix.python-version }}" - architecture: ppc64le - - name: "Show environment" run: | set -xe