Skip to content

Commit 4233dd7

Browse files
authored
Merge pull request #7690 from hugovk/qemu
Build QEMU-emulated Linux aarch64 wheels on GitHub Actions instead of Travis CI
2 parents aa21a2e + e32f49a commit 4233dd7

File tree

11 files changed

+69
-83
lines changed

11 files changed

+69
-83
lines changed

.github/workflows/test-cygwin.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,13 @@ on:
88
- ".github/workflows/docs.yml"
99
- ".github/workflows/wheels*"
1010
- ".gitmodules"
11-
- ".travis.yml"
1211
- "docs/**"
1312
- "wheels/**"
1413
pull_request:
1514
paths-ignore:
1615
- ".github/workflows/docs.yml"
1716
- ".github/workflows/wheels*"
1817
- ".gitmodules"
19-
- ".travis.yml"
2018
- "docs/**"
2119
- "wheels/**"
2220
workflow_dispatch:

.github/workflows/test-docker.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,13 @@ on:
88
- ".github/workflows/docs.yml"
99
- ".github/workflows/wheels*"
1010
- ".gitmodules"
11-
- ".travis.yml"
1211
- "docs/**"
1312
- "wheels/**"
1413
pull_request:
1514
paths-ignore:
1615
- ".github/workflows/docs.yml"
1716
- ".github/workflows/wheels*"
1817
- ".gitmodules"
19-
- ".travis.yml"
2018
- "docs/**"
2119
- "wheels/**"
2220
workflow_dispatch:

.github/workflows/test-mingw.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,13 @@ on:
88
- ".github/workflows/docs.yml"
99
- ".github/workflows/wheels*"
1010
- ".gitmodules"
11-
- ".travis.yml"
1211
- "docs/**"
1312
- "wheels/**"
1413
pull_request:
1514
paths-ignore:
1615
- ".github/workflows/docs.yml"
1716
- ".github/workflows/wheels*"
1817
- ".gitmodules"
19-
- ".travis.yml"
2018
- "docs/**"
2119
- "wheels/**"
2220
workflow_dispatch:

.github/workflows/test-windows.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,13 @@ on:
88
- ".github/workflows/docs.yml"
99
- ".github/workflows/wheels*"
1010
- ".gitmodules"
11-
- ".travis.yml"
1211
- "docs/**"
1312
- "wheels/**"
1413
pull_request:
1514
paths-ignore:
1615
- ".github/workflows/docs.yml"
1716
- ".github/workflows/wheels*"
1817
- ".gitmodules"
19-
- ".travis.yml"
2018
- "docs/**"
2119
- "wheels/**"
2220
workflow_dispatch:

.github/workflows/test.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,13 @@ on:
88
- ".github/workflows/docs.yml"
99
- ".github/workflows/wheels*"
1010
- ".gitmodules"
11-
- ".travis.yml"
1211
- "docs/**"
1312
- "wheels/**"
1413
pull_request:
1514
paths-ignore:
1615
- ".github/workflows/docs.yml"
1716
- ".github/workflows/wheels*"
1817
- ".gitmodules"
19-
- ".travis.yml"
2018
- "docs/**"
2119
- "wheels/**"
2220
workflow_dispatch:

.github/workflows/wheels.yml

Lines changed: 67 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,64 @@ env:
3030
FORCE_COLOR: 1
3131

3232
jobs:
33-
build:
33+
build-1-QEMU-emulated-wheels:
34+
name: aarch64 ${{ matrix.python-version }} ${{ matrix.spec }}
35+
runs-on: ubuntu-latest
36+
strategy:
37+
fail-fast: false
38+
matrix:
39+
python-version:
40+
- pp39
41+
- pp310
42+
- cp38
43+
- cp39
44+
- cp310
45+
- cp311
46+
- cp312
47+
spec:
48+
- manylinux2014
49+
- manylinux_2_28
50+
- musllinux
51+
exclude:
52+
- { python-version: pp39, spec: musllinux }
53+
- { python-version: pp310, spec: musllinux }
54+
55+
steps:
56+
- uses: actions/checkout@v4
57+
with:
58+
submodules: true
59+
60+
- uses: actions/setup-python@v5
61+
with:
62+
python-version: "3.x"
63+
64+
# https://github.com/docker/setup-qemu-action
65+
- name: Set up QEMU
66+
uses: docker/setup-qemu-action@v3
67+
68+
- name: Install cibuildwheel
69+
run: |
70+
python3 -m pip install -r .ci/requirements-cibw.txt
71+
72+
- name: Build wheels
73+
run: |
74+
python3 -m cibuildwheel --output-dir wheelhouse
75+
env:
76+
# Build only the currently selected Linux architecture (so we can
77+
# parallelise for speed).
78+
CIBW_ARCHS: "aarch64"
79+
# Likewise, select only one Python version per job to speed this up.
80+
CIBW_BUILD: "${{ matrix.python-version }}-${{ matrix.spec == 'musllinux' && 'musllinux' || 'manylinux' }}*"
81+
# Extra options for manylinux.
82+
CIBW_MANYLINUX_AARCH64_IMAGE: ${{ matrix.spec }}
83+
CIBW_MANYLINUX_PYPY_AARCH64_IMAGE: ${{ matrix.spec }}
84+
85+
- uses: actions/upload-artifact@v4
86+
with:
87+
name: dist-qemu-${{ matrix.python-version }}-${{ matrix.spec }}
88+
path: ./wheelhouse/*.whl
89+
90+
build-2-native-wheels:
3491
name: ${{ matrix.name }}
3592
runs-on: ${{ matrix.os }}
3693
strategy:
@@ -62,9 +119,12 @@ jobs:
62119
with:
63120
python-version: "3.x"
64121

65-
- name: Build wheels
122+
- name: Install cibuildwheel
66123
run: |
67124
python3 -m pip install -r .ci/requirements-cibw.txt
125+
126+
- name: Build wheels
127+
run: |
68128
python3 -m cibuildwheel --output-dir wheelhouse
69129
env:
70130
CIBW_ARCHS: ${{ matrix.cibw_arch }}
@@ -106,6 +166,10 @@ jobs:
106166
with:
107167
python-version: "3.x"
108168

169+
- name: Install cibuildwheel
170+
run: |
171+
python.exe -m pip install -r .ci/requirements-cibw.txt
172+
109173
- name: Prepare for build
110174
run: |
111175
choco install nasm --no-progress
@@ -114,8 +178,6 @@ jobs:
114178
# Install extra test images
115179
xcopy /S /Y Tests\test-images\* Tests\images
116180
117-
& python.exe -m pip install -r .ci/requirements-cibw.txt
118-
119181
& python.exe winbuild\build_prepare.py -v --no-imagequant --architecture=${{ matrix.arch }}
120182
shell: pwsh
121183

@@ -187,7 +249,7 @@ jobs:
187249

188250
pypi-publish:
189251
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
190-
needs: [build, windows, sdist]
252+
needs: [build-1-QEMU-emulated-wheels, build-2-native-wheels, windows, sdist]
191253
runs-on: ubuntu-latest
192254
name: Upload release to PyPI
193255
environment:

.travis.yml

Lines changed: 0 additions & 52 deletions
This file was deleted.

README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,6 @@ As of 2019, Pillow development is
4848
<a href="https://github.com/python-pillow/Pillow/actions/workflows/wheels.yml"><img
4949
alt="GitHub Actions build status (Wheels)"
5050
src="https://github.com/python-pillow/Pillow/workflows/Wheels/badge.svg"></a>
51-
<a href="https://app.travis-ci.com/github/python-pillow/Pillow"><img
52-
alt="Travis CI wheels build status (aarch64)"
53-
src="https://img.shields.io/travis/com/python-pillow/Pillow/main.svg?label=aarch64%20wheels"></a>
5451
<a href="https://app.codecov.io/gh/python-pillow/Pillow"><img
5552
alt="Code coverage"
5653
src="https://codecov.io/gh/python-pillow/Pillow/branch/main/graph/badge.svg"></a>

RELEASING.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Released quarterly on January 2nd, April 1st, July 1st and October 15th.
1010
* [ ] Open a release ticket e.g. https://github.com/python-pillow/Pillow/issues/3154
1111
* [ ] Develop and prepare release in `main` branch.
1212
* [ ] Check [GitHub Actions](https://github.com/python-pillow/Pillow/actions) and [AppVeyor](https://ci.appveyor.com/project/python-pillow/Pillow) to confirm passing tests in `main` branch.
13-
* [ ] Check that all of the wheel builds pass the tests in the [GitHub Actions "Wheels" workflow](https://github.com/python-pillow/Pillow/actions/workflows/wheels.yml) and [Travis CI](https://app.travis-ci.com/github/python-pillow/pillow) jobs by manually triggering them.
13+
* [ ] Check that all the wheel builds pass the tests in the [GitHub Actions "Wheels" workflow](https://github.com/python-pillow/Pillow/actions/workflows/wheels.yml) jobs by manually triggering them.
1414
* [ ] In compliance with [PEP 440](https://peps.python.org/pep-0440/), update version identifier in `src/PIL/_version.py`
1515
* [ ] Update `CHANGES.rst`.
1616
* [ ] Run pre-release check via `make release-test` in a freshly cloned repo.
@@ -83,12 +83,6 @@ Released as needed privately to individual vendors for critical security-related
8383
* [ ] Check the [GitHub Actions "Wheels" workflow](https://github.com/python-pillow/Pillow/actions/workflows/wheels.yml)
8484
has passed, including the "Upload release to PyPI" job. This will have been triggered
8585
by the new tag.
86-
* [ ] Download the Linux aarch64 wheels created by Travis CI from [GitHub releases](https://github.com/python-pillow/Pillow/releases)
87-
and copy into `dist`. Check and upload them e.g.:
88-
```bash
89-
python3 -m twine check --strict dist/*
90-
python3 -m twine upload dist/pillow-5.2.0*
91-
```
9286

9387
## Publicize Release
9488

docs/about.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,12 @@ Goals
66

77
The fork author's goal is to foster and support active development of PIL through:
88

9-
- Continuous integration testing via `GitHub Actions`_, `AppVeyor`_ and `Travis CI`_
9+
- Continuous integration testing via `GitHub Actions`_ and `AppVeyor`_
1010
- Publicized development activity on `GitHub`_
1111
- Regular releases to the `Python Package Index`_
1212

1313
.. _GitHub Actions: https://github.com/python-pillow/Pillow/actions
1414
.. _AppVeyor: https://ci.appveyor.com/project/Python-pillow/pillow
15-
.. _Travis CI: https://app.travis-ci.com/github/python-pillow/Pillow
1615
.. _GitHub: https://github.com/python-pillow/Pillow
1716
.. _Python Package Index: https://pypi.org/project/Pillow/
1817

0 commit comments

Comments
 (0)