-
Notifications
You must be signed in to change notification settings - Fork 17
236 lines (203 loc) · 7.92 KB
/
test-wheels-pi_heif.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
name: Wheels test • Pi-Heif
on:
release:
types: [ published ]
workflow_dispatch:
jobs:
docker-tests:
name: ${{ matrix.i['os'] }} • ${{ matrix.i['ver'] }} • ${{ matrix.i['arch'] }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
i: [
{ "os": "amazonlinux", "ver": "latest", "arch": "amd64" },
{ "os": "amazonlinux", "ver": "latest", "arch": "arm64" },
{ "os": "oraclelinux", "ver": "9", "arch": "amd64" },
{ "os": "oraclelinux", "ver": "9", "arch": "arm64" },
{ "os": "fedora", "ver": "37", "arch": "amd64" },
{ "os": "debian", "ver": "11", "arch": "amd64" },
{ "os": "debian", "ver": "11", "arch": "arm64" },
{ "os": "debian", "ver": "12", "arch": "amd64" },
{ "os": "debian", "ver": "12", "arch": "arm64" },
{ "os": "alpine", "ver": "3.19", "arch": "amd64" },
{ "os": "alpine", "ver": "3.19", "arch": "arm64" },
{ "os": "alpine", "ver": "3.20", "arch": "amd64" },
{ "os": "alpine", "ver": "3.20", "arch": "arm64" },
]
steps:
- name: Delay, waiting Pypi to update.
if: ${{ github.event_name != 'workflow_dispatch' }}
run: sleep 480
- uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Preparing debian
if: matrix.i['os'] == 'debian' || matrix.i['os'] == 'ubuntu'
run: |
echo PREPARE_CMD="apt update" >> $GITHUB_ENV
echo INSTALL_CMD="apt install -y \
python3-minimal python3-distutils python3-pip python3-dev python3-venv \
zlib1g-dev libjpeg62-turbo-dev liblcms2-dev libwebp-dev libfribidi-dev libharfbuzz-dev" >> $GITHUB_ENV
- name: Preparing musli
if: matrix.i['os'] == 'alpine'
run: echo INSTALL_CMD="apk add --no-cache python3 py3-pip py3-pillow py3-numpy" >> $GITHUB_ENV
- name: Preparing centos
if: matrix.i['os'] != 'debian' && matrix.i['os'] != 'ubuntu' && matrix.i['os'] != 'alpine'
run: |
echo PREPARE_CMD="yum makecache" >> $GITHUB_ENV
echo INSTALL_CMD="yum install -y python3 python3-pip" >> $GITHUB_ENV
- name: Build image & Run tests
run: |
python3 .github/transform_to-pi_heif.py
docker buildx build \
--platform linux/${{ matrix.i.arch }} \
--build-arg BASE_IMAGE="${{ matrix.i['os'] }}:${{ matrix.i['ver'] }}" \
--build-arg PREPARE_CMD="${{ env.PREPARE_CMD }}" \
--build-arg INSTALL_CMD="${{ env.INSTALL_CMD }}" \
--build-arg TEST_TYPE="export PH_LIGHT_ACTION=1" \
-f docker/test_wheels.Dockerfile .
windows-wheels:
name: Windows • 2019 • ${{ matrix.python-version }}
runs-on: windows-2019
strategy:
fail-fast: false
matrix:
python-version: ["pypy-3.9", "pypy-3.10", "3.9", "3.10", "3.11", "3.12", "3.13"]
env:
PH_LIGHT_ACTION: 1
steps:
- name: Delay, waiting Pypi to update.
if: ${{ github.event_name != 'workflow_dispatch' }}
run: Start-Sleep -s 480
shell: powershell
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Preparations
run: |
python3 -m pip install --prefer-binary pillow
python3 -m pip install pytest packaging defusedxml
python3 -m pip install --only-binary=:all: pi-heif
- name: Test wheel
run: |
python3 .github/transform_to-pi_heif.py
cd .. && python3 -m pytest pillow_heif
macos-wheels:
name: macOS • 12 • ${{ matrix.python-version }}
runs-on: macos-12
strategy:
fail-fast: false
matrix:
python-version: ["pypy-3.9", "pypy-3.10", "3.9", "3.10", "3.11", "3.12", "3.13"]
steps:
- name: Delay, waiting Pypi to update.
if: ${{ github.event_name != 'workflow_dispatch' }}
run: sleep 480
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Preparations
run: |
brew install libjpeg little-cms2
python3 -m pip install --prefer-binary pillow
python3 -m pip install pytest packaging defusedxml
python3 -m pip install --only-binary=:all: pi-heif
- name: Test wheel
run: |
export TEST_DECODE_THREADS=0
python3 .github/transform_to-pi_heif.py
export PH_LIGHT_ACTION=1
cd .. && python3 -m pytest pillow_heif
manylinux-wheels:
name: Ubuntu-Focal • ${{ matrix.python-version }}
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
python-version: ["pypy-3.9", "pypy-3.10", "3.9", "3.10", "3.11", "3.12", "3.13"]
steps:
- name: Delay, waiting Pypi to update.
if: ${{ github.event_name != 'workflow_dispatch' }}
run: sleep 480
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Preparations
run: |
sudo apt update && sudo apt install libjpeg-dev liblcms2-dev
python3 -m pip install --prefer-binary pillow
python3 -m pip install pytest packaging defusedxml
python3 -m pip install --only-binary=:all: pi-heif
- name: Test wheel
run: |
python3 .github/transform_to-pi_heif.py
export PH_LIGHT_ACTION=1
cd .. && python3 -m pytest pillow_heif
macos-projects-together:
name: macOS • Together • ${{ matrix.python-version }}
runs-on: macos-12
strategy:
matrix:
python-version: ["pypy-3.9", "3.9"]
steps:
- name: Delay, waiting Pypi to update.
if: ${{ github.event_name != 'workflow_dispatch' }}
run: sleep 480
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Preparations
run: |
brew install libjpeg little-cms2
python3 -m pip install --prefer-binary pillow
python3 -m pip install pytest packaging defusedxml
python3 -m pip install --only-binary=:all: pillow-heif
python3 -m pip install --only-binary=:all: pi-heif
- name: Test wheels
run: |
export TEST_DECODE_THREADS=0
export PH_FULL_ACTION=1
cd .. && python3 -m pytest pillow_heif
export PH_FULL_ACTION=0 && cd pillow_heif
python3 .github/transform_to-pi_heif.py
export PH_LIGHT_ACTION=1
cd .. && python3 -m pytest pillow_heif
linux-projects-together:
name: Linux • Together • ${{ matrix.python-version }}
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: ["pypy-3.10", "3.10"]
steps:
- name: Delay, waiting Pypi to update.
if: ${{ github.event_name != 'workflow_dispatch' }}
run: sleep 480
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Preparations
run: |
sudo apt update && sudo apt install libjpeg-dev liblcms2-dev
python3 -m pip install --prefer-binary pillow
python3 -m pip install pytest packaging defusedxml
python3 -m pip install --only-binary=:all: pillow-heif
python3 -m pip install --only-binary=:all: pi-heif
- name: Test wheels
run: |
export PH_FULL_ACTION=1
cd .. && python3 -m pytest pillow_heif
export PH_FULL_ACTION=0 && cd pillow_heif
python3 .github/transform_to-pi_heif.py
export PH_LIGHT_ACTION=1
cd .. && python3 -m pytest pillow_heif