Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
144 changes: 52 additions & 92 deletions .github/workflows/build-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,7 @@ jobs:
runs-on: macos-15
strategy:
matrix:
# Python 3.9/3.10 macOS builds require libintl from Homebrew gettext,
# which is not available on macos-15 runners
python-version: ["3.11", "3.12", "3.13", "3.14"]
python-version: ["3.12", "3.13", "3.14"]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify whether Python 3.10/3.11 are still covered anywhere in CI and metadata.
set -euo pipefail

echo "== Declared Python support in pyproject =="
fd -a pyproject.toml | xargs -I{} sh -c 'echo "--- {} ---"; sed -n "1,140p" "{}" | rg -n "requires-python|Programming Language :: Python :: 3\.(10|11|12|13|14)"'

echo
echo "== Workflow coverage for 3.10/3.11 =="
fd -a --glob ".github/workflows/*.yml" --glob ".github/workflows/*.yaml" | while read -r f; do
  echo "--- $f ---"
  rg -n "3\.10|3\.11|python-version|maturin|tox|nox|cibuildwheel" "$f" || true
done

Repository: tower/tower-cli

Length of output: 1064


🏁 Script executed:

# Find and inspect the workflow file
find .github/workflows -name "*.yml" -o -name "*.yaml" | head -20

Repository: tower/tower-cli

Length of output: 514


🏁 Script executed:

# Read the build-binaries.yml workflow file to confirm the matrix versions
cat -n .github/workflows/build-binaries.yml | sed -n '65,75p; 110,120p; 163,173p; 211,221p; 260,270p; 311,321p; 350,360p'

Repository: tower/tower-cli

Length of output: 3400


🏁 Script executed:

# Search for any other workflow files that may test Python 3.10/3.11
rg -l "python.*3\.10|python.*3\.11" .github/workflows/

Repository: tower/tower-cli

Length of output: 41


🏁 Script executed:

# Check for tox, nox, or other test configuration files
find . -maxdepth 2 -type f \( -name "tox.ini" -o -name "noxfile.py" -o -name ".python-version" -o -name "setup.py" -o -name "setup.cfg" \) | head -20

Repository: tower/tower-cli

Length of output: 77


🏁 Script executed:

cat -n .github/workflows/test-python.yml | head -100

Repository: tower/tower-cli

Length of output: 1501


🏁 Script executed:

cat .python-version

Repository: tower/tower-cli

Length of output: 64


Declared Python support in packaging metadata does not match CI/build matrix.

pyproject.toml declares requires-python = ">=3.10" with classifiers for Python 3.10, 3.11, 3.12, 3.13, and 3.14. However, build-binaries.yml (lines 70, 115, 168) and all maturin invocations (lines 216, 265, 316, 355) only build and test wheels for 3.12–3.14. Additionally, .python-version is pinned to 3.12, and test-python.yml uses only that version. This means no Python 3.10/3.11 testing or wheel building occurs anywhere in CI.

Either update pyproject.toml to reflect requires-python = ">=3.12" (and remove 3.10/3.11 classifiers) if support is intentionally dropped, or add 3.10/3.11 to the test matrix in both build-binaries.yml and test-python.yml if those versions remain supported.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/build-binaries.yml at line 70, There is a mismatch between
the Python versions declared as supported in pyproject.toml (requires-python =
">=3.10" with classifiers for 3.10, 3.11, 3.12, 3.13, 3.14) and the versions
actually being built and tested in the CI workflows. The build-binaries.yml
python-version matrix only includes 3.12, 3.13, and 3.14 (at lines 70, 115, 168
and maturin invocations at lines 216, 265, 316, 355), and test-python.yml only
uses 3.12. Either update pyproject.toml to change requires-python to ">=3.12"
and remove the 3.10/3.11 classifiers if support for those versions is
intentionally dropped, or add Python 3.10 and 3.11 to the python-version matrix
in build-binaries.yml and test-python.yml workflows and update the
.python-version file to match the minimum supported version if those versions
should remain supported.

steps:
- uses: actions/checkout@v6
with:
Expand Down Expand Up @@ -98,12 +96,12 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: "Build wheels - x86_64"
- name: Build wheel
uses: PyO3/maturin-action@v1.50.1
with:
target: x86_64
args: --release --locked --out dist -i python${{ matrix.python-version }}
- name: "Upload wheels"
- name: Upload wheel
uses: actions/upload-artifact@v6
with:
name: wheels-macos-x86_64-py${{ matrix.python-version }}
Expand All @@ -114,9 +112,7 @@ jobs:
runs-on: macos-15
strategy:
matrix:
# Python 3.9/3.10 macOS builds require libintl from Homebrew gettext,
# which is not available on macos-15 runners
python-version: ["3.11", "3.12", "3.13", "3.14"]
python-version: ["3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@v6
with:
Expand Down Expand Up @@ -145,17 +141,17 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
architecture: arm64
- name: "Build wheels - aarch64"
- name: Build wheel
uses: PyO3/maturin-action@v1.50.1
with:
target: aarch64
args: --release --locked --out dist -i python${{ matrix.python-version }}
- name: "Test wheel - aarch64"
- name: Test wheel
run: |
pip install dist/*.whl --force-reinstall
${{ env.EXECUTABLE_NAME }} --help
python -m ${{ env.MODULE_NAME }} --help
- name: "Upload wheels"
- name: Upload wheel
uses: actions/upload-artifact@v6
with:
name: wheels-aarch64-apple-darwin-py${{ matrix.python-version }}
Expand All @@ -169,10 +165,7 @@ jobs:
platform:
- target: x86_64-pc-windows-msvc
arch: x64
# NOTE: i686 disabled due to poor support in PyArrow and friends.
#- target: i686-pc-windows-msvc
# arch: x86
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
python-version: ["3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@v6
with:
Expand All @@ -182,101 +175,63 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.platform.arch }}
- name: "Build wheels"
- name: Build wheel
uses: PyO3/maturin-action@v1.50.1
with:
target: ${{ matrix.platform.target }}
args: --release --locked --out dist -i python${{ matrix.python-version }}
- name: "Test wheel"
- name: Test wheel
shell: bash
run: |
python -m pip install dist/*.whl --force-reinstall
${{ env.EXECUTABLE_NAME }} --help
python -m ${{ env.MODULE_NAME }} --help
- name: "Upload wheels"
- name: Upload wheel
uses: actions/upload-artifact@v6
with:
name: wheels-${{ matrix.platform.target }}-py${{ matrix.python-version }}
path: dist

windows-aarch64:
if: ${{ !contains(github.event.pull_request.labels.*.name, 'no-build') }}
runs-on: windows-11-arm
strategy:
matrix:
# Python ARM64 Windows builds started with 3.11
python-version: ["3.11", "3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
- uses: actions-rust-lang/setup-rust-toolchain@v1.11.0
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: "Build wheels"
uses: PyO3/maturin-action@v1.50.1
with:
target: aarch64-pc-windows-msvc
args: --release --locked --out dist -i python${{ matrix.python-version }}
- name: "Test wheel"
shell: bash
run: |
python -m pip install dist/*.whl --force-reinstall
${{ env.EXECUTABLE_NAME }} --help
python -m ${{ env.MODULE_NAME }} --help
- name: "Upload wheels"
uses: actions/upload-artifact@v6
with:
name: wheels-aarch64-pc-windows-msvc-py${{ matrix.python-version }}
path: dist

linux:
if: ${{ !contains(github.event.pull_request.labels.*.name, 'no-build') }}
runs-on: ubuntu-latest
strategy:
matrix:
target:
- x86_64-unknown-linux-gnu
- i686-unknown-linux-gnu
python-version: ["3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
- uses: actions-rust-lang/setup-rust-toolchain@v1.11.0
- uses: actions/setup-python@v6
with:
python-version: ${{ env.PYTHON_VERSION }}
python-version: ${{ matrix.python-version }}
architecture: x64
- name: "Build wheels"
- name: Build wheel
uses: PyO3/maturin-action@v1.50.1
with:
target: ${{ matrix.target }}
manylinux: auto
args: --release --locked --out dist -i python3.10 python3.11 python3.12 python3.13 python3.14
args: --release --locked --out dist -i python${{ matrix.python-version }}
before-script-linux: |
# If we're running on rhel centos, install needed packages.
if command -v yum &> /dev/null; then
yum update -y && yum install -y perl-core openssl openssl-devel pkgconfig libatomic

# If we're running on i686 we need to symlink libatomic
# in order to build openssl with -latomic flag.
if [[ ! -d "/usr/lib64" ]]; then
ln -s /usr/lib/libatomic.so.1 /usr/lib/libatomic.so
fi
else
# If we're running on debian-based system.
sudo apt update -y
sudo apt-get install -y libssl-dev openssl pkg-config
fi
- name: "Test wheel"
- name: Test wheel
if: ${{ startsWith(matrix.target, 'x86_64') }}
run: |
PYTAG="cp$(python -c "import sys; print(f'{sys.version_info.major}{sys.version_info.minor}')")"
pip install dist/*-${PYTAG}-*.whl --force-reinstall
${{ env.EXECUTABLE_NAME }} --help
python -m ${{ env.MODULE_NAME }} --help
- name: "Upload wheels"
- name: Upload wheel
uses: actions/upload-artifact@v6
with:
name: wheels-${{ matrix.target }}
Expand All @@ -293,49 +248,53 @@ jobs:
# see https://github.com/astral-sh/ruff/issues/3791
# and https://github.com/gnzlbg/jemallocator/issues/170#issuecomment-1503228963
maturin_docker_options: -e JEMALLOC_SYS_WITH_LG_PAGE=16 -e PYO3_USE_ABI3_FORWARD_COMPATIBILITY=1

python-version: ["3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
persist-credentials: false
- uses: actions/setup-python@v6
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: "Build wheels"
python-version: ${{ matrix.python-version }}
- name: Build wheel
uses: PyO3/maturin-action@v1.50.1
with:
target: ${{ matrix.platform.target }}
manylinux: 2_28
docker-options: ${{ matrix.platform.maturin_docker_options }}
args: --release --locked --out dist -i python3.10 python3.11 python3.12 python3.13 python3.14
args: --release --locked --out dist -i ${{ format('python{0}', matrix.python-version) }}
env:
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
- uses: uraimo/run-on-arch-action@v2
- uses: uraimo/run-on-arch-action@v3
if: ${{ matrix.platform.arch != 'ppc64' && matrix.platform.arch != 'ppc64le'}}
name: Test wheel
with:
arch: ${{ matrix.platform.arch }}
distro: ubuntu22.04
distro: ubuntu24.04
githubToken: ${{ github.token }}
install: |
apt-get update
apt-get install -y --no-install-recommends python3 python3-pip python3-venv python3-dev cargo libffi-dev
apt-get install -y software-properties-common
add-apt-repository ppa:deadsnakes/ppa
apt-get update
apt-get install -y --no-install-recommends ${{ format('python{0}-full', matrix.python-version) }} ${{ format('python{0}-venv', matrix.python-version) }} cargo libffi-dev
# Create and use a virtual environment to avoid the externally-managed-environment error
run: |
ln -s -f /usr/bin/${{ format('python{0}', matrix.python-version) }} /usr/bin/python3
ln -s -f /usr/bin/${{ format('pip{0}', matrix.python-version) }} /usr/bin/pip3
# Workaround for QEMU bug when emulating 32-bit on 64-bit hosts
# See: https://github.com/docker/buildx/issues/395
# Use /tmp for CARGO_HOME (often tmpfs, which avoids the QEMU filesystem bug)
export CARGO_HOME=/tmp/cargo-home
python3 -m venv /tmp/venv
. /tmp/venv/bin/activate
PYTAG="cp$(python3 -c "import sys; print(f'{sys.version_info.major}{sys.version_info.minor}')")"
pip3 install dist/*-${PYTAG}-*.whl --force-reinstall
pip3 install dist/*.whl --force-reinstall
${{ env.EXECUTABLE_NAME }} --help
- name: "Upload wheels"
- name: Upload wheel
uses: actions/upload-artifact@v6
with:
name: wheels-${{ matrix.platform.target }}
name: wheels-${{ matrix.platform.target }}-py${{ matrix.python-version }}
path: dist

musllinux:
Expand All @@ -345,35 +304,34 @@ jobs:
matrix:
target:
- x86_64-unknown-linux-musl
- i686-unknown-linux-musl
python-version: ["3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
- uses: actions/setup-python@v6
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: "Install OpenSSL"
python-version: ${{ matrix.python-version }}
- name: Install OpenSSL
run: sudo apt-get update && sudo apt-get install libssl-dev openssl
- name: "Build wheels"
- name: Build wheel
uses: PyO3/maturin-action@v1.50.1
with:
target: ${{ matrix.target }}
manylinux: musllinux_1_2
args: --release --locked --out dist -i python3.10 python3.11 python3.12 python3.13 python3.14
- name: "Test wheel"
args: --release --locked --out dist -i python${{ matrix.python-version }}
- name: Test wheel
if: matrix.target == 'x86_64-unknown-linux-musl'
uses: addnab/docker-run-action@v3
with:
image: alpine:latest
image: python:${{ matrix.python-version}}-alpine
options: -v ${{ github.workspace }}:/io -w /io
run: |
apk add python3 python3-dev py3-pip rust
apk add rust
python -m venv .venv
PYTAG="cp$(python -c "import sys; print(f'{sys.version_info.major}{sys.version_info.minor}')")"
.venv/bin/pip3 install dist/*-${PYTAG}-*.whl --force-reinstall
.venv/bin/pip3 install dist/*.whl --force-reinstall
.venv/bin/${{ env.EXECUTABLE_NAME }} --help
- name: "Upload wheels"
- name: Upload wheel
uses: actions/upload-artifact@v6
with:
name: wheels-${{ matrix.target }}
Expand All @@ -387,33 +345,35 @@ jobs:
platform:
- target: aarch64-unknown-linux-musl
arch: aarch64
python-version: ["3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
- uses: actions/setup-python@v6
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: "Build wheels"
python-version: ${{ matrix.python-version }}
- name: Build wheel
uses: PyO3/maturin-action@v1.50.1
with:
target: ${{ matrix.platform.target }}
manylinux: musllinux_1_2
args: --release --locked --out dist -i python3.10 python3.11 python3.12 python3.13 python3.14
args: --release --locked --out dist -i python${{ matrix.python-version }}
- uses: uraimo/run-on-arch-action@v2
name: Test wheel
with:
arch: ${{ matrix.platform.arch }}
distro: alpine_latest
githubToken: ${{ github.token }}
install: |
apk add python3 python3-dev py3-pip rust
apk add uv rust
run: |
python -m venv .venv
PYTAG="cp$(python3 -c "import sys; print(f'{sys.version_info.major}{sys.version_info.minor}')")"
.venv/bin/pip3 install dist/*-${PYTAG}-*.whl --force-reinstall
uv python install ${{ matrix.python-version }} --default
export PATH="/root/.local/bin:$PATH"
python3 -m venv .venv
.venv/bin/pip3 install dist/*.whl --force-reinstall
.venv/bin/${{ env.EXECUTABLE_NAME }} --help
- name: "Upload wheels"
- name: Upload wheel
uses: actions/upload-artifact@v6
with:
name: wheels-${{ matrix.platform.target }}
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ version = "0.3.67"
description = "Tower CLI and runtime environment for Tower."
authors = [{ name = "Tower Computing Inc.", email = "brad@tower.dev" }]
readme = "README.md"
requires-python = ">=3.10"
requires-python = ">=3.12"
license = { file = "LICENSE" }
keywords = [
"automation",
Expand Down
Loading
Loading