-
Notifications
You must be signed in to change notification settings - Fork 17
160 lines (136 loc) · 5.45 KB
/
test-wheels.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
name: Wheels test
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: Test type is Full
run: echo TEST_TYPE="export PH_FULL_ACTION=1" >> $GITHUB_ENV
- 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: |
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="${{ env.TEST_TYPE }}" \
-f docker/test_wheels.Dockerfile .
windows-wheels:
name: Windows • 2019 • ${{ matrix.python-version }}
runs-on: windows-2019
strategy:
matrix:
python-version: ["pypy-3.9", "pypy-3.10", "3.9", "3.10", "3.11", "3.12", "3.13"]
env:
PH_FULL_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: pillow_heif
- name: Test wheel
run: cd .. && python3 -m pytest pillow_heif
macos-wheels:
name: macOS • 12 • ${{ matrix.python-version }}
runs-on: macos-12
strategy:
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: pillow_heif
- name: Test wheel
run: |
export TEST_DECODE_THREADS=0
export PH_FULL_ACTION=1
cd .. && python3 -m pytest pillow_heif
manylinux-wheels:
name: Ubuntu-Focal • ${{ matrix.python-version }}
runs-on: ubuntu-20.04
strategy:
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: pillow_heif
- name: Test wheel
run: |
export PH_FULL_ACTION=1
cd .. && python3 -m pytest pillow_heif