|
10 | 10 | # │ │ │ │ │ |
11 | 11 | - cron: "42 1 * * 0,3" |
12 | 12 | push: |
13 | | - paths: |
14 | | - - ".ci/requirements-cibw.txt" |
15 | | - - ".github/workflows/wheel*" |
16 | | - - "pyproject.toml" |
17 | | - - "setup.py" |
18 | | - - "wheels/*" |
19 | | - - "winbuild/build_prepare.py" |
20 | | - - "winbuild/fribidi.cmake" |
21 | | - tags: |
22 | | - - "*" |
23 | 13 | pull_request: |
24 | | - paths: |
25 | | - - ".ci/requirements-cibw.txt" |
26 | | - - ".github/workflows/wheel*" |
27 | | - - "pyproject.toml" |
28 | | - - "setup.py" |
29 | | - - "wheels/*" |
30 | | - - "winbuild/build_prepare.py" |
31 | | - - "winbuild/fribidi.cmake" |
32 | 14 | workflow_dispatch: |
33 | 15 |
|
34 | 16 | permissions: |
35 | 17 | contents: read |
36 | 18 |
|
37 | | -concurrency: |
38 | | - group: ${{ github.workflow }}-${{ github.ref }} |
39 | | - cancel-in-progress: true |
40 | | - |
41 | 19 | env: |
42 | 20 | FORCE_COLOR: 1 |
43 | 21 |
|
|
50 | 28 | fail-fast: false |
51 | 29 | matrix: |
52 | 30 | include: |
53 | | - - name: "macOS 10.10 x86_64" |
54 | | - platform: macos |
55 | | - os: macos-15-intel |
56 | | - cibw_arch: x86_64 |
57 | | - build: "cp3{10,11}*" |
58 | | - macosx_deployment_target: "10.10" |
59 | | - - name: "macOS 10.13 x86_64" |
60 | | - platform: macos |
61 | | - os: macos-15-intel |
62 | | - cibw_arch: x86_64 |
63 | | - build: "cp3{12,13}*" |
64 | | - macosx_deployment_target: "10.13" |
65 | | - - name: "macOS 10.15 x86_64" |
66 | | - platform: macos |
67 | | - os: macos-15-intel |
68 | | - cibw_arch: x86_64 |
69 | | - build: "{cp314,pp3}*" |
70 | | - macosx_deployment_target: "10.15" |
71 | | - - name: "macOS arm64" |
72 | | - platform: macos |
73 | | - os: macos-latest |
74 | | - cibw_arch: arm64 |
75 | | - macosx_deployment_target: "11.0" |
76 | | - - name: "manylinux2014 and musllinux x86_64" |
77 | | - platform: linux |
78 | | - os: ubuntu-latest |
79 | | - cibw_arch: x86_64 |
80 | | - manylinux: "manylinux2014" |
81 | | - - name: "manylinux_2_28 x86_64" |
82 | | - platform: linux |
83 | | - os: ubuntu-latest |
84 | | - cibw_arch: x86_64 |
85 | | - build: "*manylinux*" |
86 | | - - name: "manylinux2014 and musllinux aarch64" |
87 | | - platform: linux |
88 | | - os: ubuntu-24.04-arm |
89 | | - cibw_arch: aarch64 |
90 | | - manylinux: "manylinux2014" |
91 | | - - name: "manylinux_2_28 aarch64" |
92 | | - platform: linux |
93 | | - os: ubuntu-24.04-arm |
94 | | - cibw_arch: aarch64 |
95 | | - build: "*manylinux*" |
96 | 31 | - name: "iOS arm64 device" |
97 | 32 | platform: ios |
98 | 33 | os: macos-latest |
@@ -137,153 +72,3 @@ jobs: |
137 | 72 | with: |
138 | 73 | name: dist-${{ matrix.name }} |
139 | 74 | path: ./wheelhouse/*.whl |
140 | | - |
141 | | - windows: |
142 | | - if: github.event_name != 'schedule' || github.repository_owner == 'python-pillow' |
143 | | - name: Windows ${{ matrix.cibw_arch }} |
144 | | - runs-on: ${{ matrix.os }} |
145 | | - strategy: |
146 | | - fail-fast: false |
147 | | - matrix: |
148 | | - include: |
149 | | - - cibw_arch: x86 |
150 | | - os: windows-latest |
151 | | - - cibw_arch: AMD64 |
152 | | - os: windows-latest |
153 | | - - cibw_arch: ARM64 |
154 | | - os: windows-11-arm |
155 | | - steps: |
156 | | - - uses: actions/checkout@v5 |
157 | | - with: |
158 | | - persist-credentials: false |
159 | | - |
160 | | - - name: Checkout extra test images |
161 | | - uses: actions/checkout@v5 |
162 | | - with: |
163 | | - persist-credentials: false |
164 | | - repository: python-pillow/test-images |
165 | | - path: Tests\test-images |
166 | | - |
167 | | - - uses: actions/setup-python@v6 |
168 | | - with: |
169 | | - python-version: "3.x" |
170 | | - |
171 | | - - name: Install cibuildwheel |
172 | | - run: | |
173 | | - python.exe -m pip install -r .ci/requirements-cibw.txt |
174 | | -
|
175 | | - - name: Prepare for build |
176 | | - run: | |
177 | | - choco install nasm --no-progress |
178 | | - echo "C:\Program Files\NASM" >> $env:GITHUB_PATH |
179 | | -
|
180 | | - # Install extra test images |
181 | | - xcopy /S /Y Tests\test-images\* Tests\images |
182 | | -
|
183 | | - & python.exe winbuild\build_prepare.py -v --no-imagequant --architecture=${{ matrix.cibw_arch }} |
184 | | - shell: pwsh |
185 | | - |
186 | | - - name: Build wheels |
187 | | - run: | |
188 | | - setlocal EnableDelayedExpansion |
189 | | - for %%f in (winbuild\build\license\*) do ( |
190 | | - set x=%%~nf |
191 | | - rem Skip FriBiDi license, it is not included in the wheel. |
192 | | - set fribidi=!x:~0,7! |
193 | | - if NOT !fribidi!==fribidi ( |
194 | | - rem Skip imagequant license, it is not included in the wheel. |
195 | | - set libimagequant=!x:~0,13! |
196 | | - if NOT !libimagequant!==libimagequant ( |
197 | | - echo. >> LICENSE |
198 | | - echo ===== %%~nf ===== >> LICENSE |
199 | | - echo. >> LICENSE |
200 | | - type %%f >> LICENSE |
201 | | - ) |
202 | | - ) |
203 | | - ) |
204 | | - call winbuild\\build\\build_env.cmd |
205 | | - %pythonLocation%\python.exe -m cibuildwheel . --output-dir wheelhouse |
206 | | - env: |
207 | | - CIBW_ARCHS: ${{ matrix.cibw_arch }} |
208 | | - CIBW_BEFORE_ALL: "{package}\\winbuild\\build\\build_dep_all.cmd" |
209 | | - CIBW_CACHE_PATH: "C:\\cibw" |
210 | | - CIBW_ENABLE: cpython-prerelease cpython-freethreading pypy |
211 | | - CIBW_TEST_SKIP: "*-win_arm64" |
212 | | - CIBW_TEST_COMMAND: 'docker run --rm |
213 | | - -v {project}:C:\pillow |
214 | | - -v C:\cibw:C:\cibw |
215 | | - -v %CD%\..\venv-test:%CD%\..\venv-test |
216 | | - -e CI -e GITHUB_ACTIONS |
217 | | - mcr.microsoft.com/windows/servercore:ltsc2022 |
218 | | - powershell C:\pillow\.github\workflows\wheels-test.ps1 %CD%\..\venv-test' |
219 | | - shell: cmd |
220 | | - |
221 | | - - name: Upload wheels |
222 | | - uses: actions/upload-artifact@v4 |
223 | | - with: |
224 | | - name: dist-windows-${{ matrix.cibw_arch }} |
225 | | - path: ./wheelhouse/*.whl |
226 | | - |
227 | | - - name: Upload fribidi.dll |
228 | | - uses: actions/upload-artifact@v4 |
229 | | - with: |
230 | | - name: fribidi-windows-${{ matrix.cibw_arch }} |
231 | | - path: winbuild\build\bin\fribidi* |
232 | | - |
233 | | - sdist: |
234 | | - if: github.event_name != 'schedule' |
235 | | - runs-on: ubuntu-latest |
236 | | - steps: |
237 | | - - uses: actions/checkout@v5 |
238 | | - with: |
239 | | - persist-credentials: false |
240 | | - |
241 | | - - name: Set up Python |
242 | | - uses: actions/setup-python@v6 |
243 | | - with: |
244 | | - python-version: "3.x" |
245 | | - |
246 | | - - run: make sdist |
247 | | - |
248 | | - - uses: actions/upload-artifact@v4 |
249 | | - with: |
250 | | - name: dist-sdist |
251 | | - path: dist/*.tar.gz |
252 | | - |
253 | | - scientific-python-nightly-wheels-publish: |
254 | | - if: github.repository_owner == 'python-pillow' && (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') |
255 | | - needs: [build-native-wheels, windows] |
256 | | - runs-on: ubuntu-latest |
257 | | - name: Upload wheels to scientific-python-nightly-wheels |
258 | | - steps: |
259 | | - - uses: actions/download-artifact@v5 |
260 | | - with: |
261 | | - pattern: dist-* |
262 | | - path: dist |
263 | | - merge-multiple: true |
264 | | - - name: Upload wheels to scientific-python-nightly-wheels |
265 | | - uses: scientific-python/upload-nightly-action@b36e8c0c10dbcfd2e05bf95f17ef8c14fd708dbf # 0.6.2 |
266 | | - with: |
267 | | - artifacts_path: dist |
268 | | - anaconda_nightly_upload_token: ${{ secrets.ANACONDA_ORG_UPLOAD_TOKEN }} |
269 | | - |
270 | | - pypi-publish: |
271 | | - if: github.repository_owner == 'python-pillow' && github.event_name == 'push' && startsWith(github.ref, 'refs/tags') |
272 | | - needs: [build-native-wheels, windows, sdist] |
273 | | - runs-on: ubuntu-latest |
274 | | - name: Upload release to PyPI |
275 | | - environment: |
276 | | - name: release-pypi |
277 | | - url: https://pypi.org/p/Pillow |
278 | | - permissions: |
279 | | - id-token: write |
280 | | - steps: |
281 | | - - uses: actions/download-artifact@v5 |
282 | | - with: |
283 | | - pattern: dist-* |
284 | | - path: dist |
285 | | - merge-multiple: true |
286 | | - - name: Publish to PyPI |
287 | | - uses: pypa/gh-action-pypi-publish@release/v1 |
288 | | - with: |
289 | | - attestations: true |
0 commit comments