Skip to content

Commit

Permalink
ci(travis): move to Ubuntu 22.04 / cp312
Browse files Browse the repository at this point in the history
  • Loading branch information
mayeut committed Feb 6, 2025
1 parent add032e commit 19f0845
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 35 deletions.
36 changes: 13 additions & 23 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
os: linux
dist: focal
dist: jammy
language: python

branches:
Expand All @@ -8,29 +8,19 @@ branches:

jobs:
include:
- name: Linux | x86_64 + i686 | Python 3.11
python: 3.11
- name: Linux | x86_64 + i686 | Python 3.12
python: 3.12
services: docker
env: PYTHON=python

- name: Linux | arm64 | Python 3.11
python: 3.11
- name: Linux | arm64 | Python 3.12
python: 3.12
services: docker
arch: arm64-graviton2
group: edge
virt: vm
arch: arm64
env: PYTHON=python
# docker is outdated in the arm64-graviton2 vm focal image (19.x)
# we need to upgrade to get >= 24.0
addons:
apt:
sources:
- sourceline: 'deb https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable'
packages:
- docker-ce docker-ce-cli containerd.io

- name: Linux | ppc64le | Python 3.11
python: 3.11
- name: Linux | ppc64le | Python 3.12
python: 3.12
services: docker
arch: ppc64le
allow_failure: True
Expand All @@ -40,16 +30,16 @@ jobs:
# c.f. https://travis-ci.community/t/running-out-of-disk-space-quota-when-using-docker-on-ppc64le/11634
- PYTEST_ADDOPTS='-k "not test_manylinuxXXXX_only"'

- name: Windows | x86_64 | Python 3.11
- name: Windows | x86_64 | Python 3.12
os: windows
language: shell
before_install:
- choco upgrade python3 -y --version 3.11.9 --limit-output --params "/InstallDir:C:\\Python311"
- choco upgrade python3 -y --version 3.12.8 --limit-output --params "/InstallDir:C:\\Python312"
env:
- PYTHON=C:\\Python311\\python
- PYTHON=C:\\Python312\\python

- name: Linux | s390x | Python 3.11
python: 3.11
- name: Linux | s390x | Python 3.12
python: 3.12
services: docker
arch: s390x
allow_failure: True
Expand Down
12 changes: 6 additions & 6 deletions CI.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
This is a summary of the host Python versions and platforms covered by the different CI platforms:

| | 3.11 | 3.12 | 3.13 |
|---------|----------------------------------------------|---------------------------------------------|----------------|
| Linux | Azure Pipelines / GitHub Actions / Travis CI | AppVeyor¹ / CircleCI¹ / Cirrus CI / GitLab¹ | GitHub Actions |
| macOS | Azure Pipelines / GitLab¹ | AppVeyor¹ / CircleCI¹ / Cirrus CI / GitLab¹ | GitHub Actions |
| Windows | Azure Pipelines / Travis CI | AppVeyor¹ / Cirrus CI / GitLab¹ | GitHub Actions |
| | 3.11 | 3.12 | 3.13 |
|---------|----------------------------------|---------------------------------------------------------|----------------|
| Linux | Azure Pipelines / GitHub Actions | AppVeyor¹ / CircleCI¹ / Cirrus CI / GitLab¹ / Travis CI | GitHub Actions |
| macOS | Azure Pipelines | AppVeyor¹ / CircleCI¹ / Cirrus CI / GitLab¹ | GitHub Actions |
| Windows | Azure Pipelines | AppVeyor¹ / Cirrus CI / GitLab¹ / Travis CI | GitHub Actions |

> ¹ Runs a reduced set of tests to reduce CI load
Non-x86 architectures are covered on Travis CI using Python 3.11.
Non-x86 architectures are covered on Travis CI using Python 3.12.
2 changes: 1 addition & 1 deletion examples/travis-ci-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# commit, but will only push to PyPI on tagged commits.

os: linux
dist: focal
dist: jammy
language: python
python: "3.12"

Expand Down
2 changes: 1 addition & 1 deletion examples/travis-ci-minimal.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
os: linux
dist: focal
dist: jammy
language: python
python: "3.12"

Expand Down
2 changes: 1 addition & 1 deletion examples/travis-ci-test-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# distribution is also created.

os: linux
dist: focal
dist: jammy
language: python
python: "3.12"

Expand Down
8 changes: 7 additions & 1 deletion test/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,19 @@
import pytest

from cibuildwheel.architecture import Architecture
from cibuildwheel.ci import CIProvider, detect_ci_provider
from cibuildwheel.util.file import CIBW_CACHE_PATH

EMULATED_ARCHS: Final[list[str]] = sorted(
arch.value for arch in (Architecture.all_archs("linux") - Architecture.auto_archs("linux"))
)
SINGLE_PYTHON_VERSION: Final[tuple[int, int]] = (3, 12)

_AARCH64_CAN_RUN_ARMV7: Final[bool] = Architecture.aarch64.value not in EMULATED_ARCHS and {
None: Architecture.armv7l.value not in EMULATED_ARCHS,
CIProvider.travis_ci: False,
}.get(detect_ci_provider(), True)

platform = os.environ.get("CIBW_PLATFORM", "")
if platform:
pass
Expand Down Expand Up @@ -257,8 +263,8 @@ def expected_wheels(
machine_arch == "aarch64"
and sys.platform.startswith("linux")
and not python_abi_tag.startswith("pp")
and _AARCH64_CAN_RUN_ARMV7
):
# we assume all CI providers are able to run aarch32 EL0 on aarch64
architectures.append("armv7l")

if len(manylinux_versions) > 0:
Expand Down
4 changes: 2 additions & 2 deletions unit_test/oci_container_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ def test_local_image(
) -> None:
if (
detect_ci_provider() in {CIProvider.travis_ci}
and pm in {"s390x", "ppc64le"}
and pm != "x86_64"
and platform != DEFAULT_OCI_PLATFORM
):
pytest.skip("Skipping test because docker on this platform does not support QEMU")
Expand Down Expand Up @@ -585,7 +585,7 @@ def test_local_image(
def test_multiarch_image(container_engine, platform):
if (
detect_ci_provider() in {CIProvider.travis_ci}
and pm in {"s390x", "ppc64le"}
and pm != "x86_64"
and platform != DEFAULT_OCI_PLATFORM
):
pytest.skip("Skipping test because docker on this platform does not support QEMU")
Expand Down

0 comments on commit 19f0845

Please sign in to comment.