-
Notifications
You must be signed in to change notification settings - Fork 18
163 lines (138 loc) · 5.95 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
161
162
163
name: Wheels test
on:
workflow_dispatch:
workflow_run:
workflows: [Publish wheels]
types:
- completed
jobs:
docker-tests:
if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }}
name: 🐍 • ${{ matrix.i['os'] }} • ${{ matrix.i['ver'] }} • ${{ matrix.i['arch'] }}
runs-on: ubuntu-latest
strategy:
matrix:
i: [
{ "os": "amazonlinux", "ver": "latest", "arch": "amd64" },
{ "os": "amazonlinux", "ver": "latest", "arch": "arm64" },
{ "os": "oraclelinux", "ver": "8", "arch": "amd64" },
{ "os": "oraclelinux", "ver": "8", "arch": "arm64" },
{ "os": "fedora", "ver": "35", "arch": "amd64" },
{ "os": "centos", "ver": "7", "arch": "amd64" },
{ "os": "centos", "ver": "7", "arch": "arm64" },
{ "os": "debian", "ver": "10.11", "arch": "amd64" },
{ "os": "debian", "ver": "10.11", "arch": "arm64" },
{ "os": "debian", "ver": "11.2", "arch": "amd64" },
{ "os": "debian", "ver": "11.2", "arch": "arm64" },
{ "os": "alpine", "ver": "3.14", "arch": "amd64" },
{ "os": "alpine", "ver": "3.14", "arch": "arm64" },
{ "os": "alpine", "ver": "3.15", "arch": "amd64" },
{ "os": "alpine", "ver": "3.15", "arch": "arm64" },
{ "os": "alpine", "ver": "3.16", "arch": "amd64" },
{ "os": "alpine", "ver": "3.16", "arch": "arm64" },
]
steps:
- name: Delay, waiting Pypi to update.
if: ${{ github.event_name != 'workflow_dispatch' }}
run: sleep 480
- uses: actions/checkout@v3
- name: Set up QEMU
if: matrix.i['arch'] == 'arm64'
uses: docker/setup-qemu-action@v1
with:
platforms: arm64
- 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" >> $GITHUB_ENV
- name: Preparing musli
if: matrix.i['os'] == 'alpine'
run: echo INSTALL_CMD="apk add --no-cache python3 py3-pip py3-cffi 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 ${{ 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 }}" \
-f docker/test_wheels.Dockerfile .
windows-wheels:
if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }}
name: 🐍 • Windows • 2019 • ${{ matrix.python-version }}
runs-on: windows-2019
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10"]
steps:
- name: Delay, waiting Pypi to update.
if: ${{ github.event_name != 'workflow_dispatch' }}
run: Start-Sleep -s 480
shell: powershell
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Preparations
run: |
python3 -m pip install pytest piexif pillow cffi numpy pympler defusedxml opencv-python
python3 -m pip install --only-binary=:all: pillow_heif
- name: Test wheel
run: cd .. && python3 -m pytest -rs pillow_heif
macos-wheels:
if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }}
name: 🐍 • macOS • 11 • ${{ matrix.python-version }}
runs-on: macos-11
strategy:
matrix:
python-version: ["pypy-3.7", "pypy-3.8", "3.7", "3.8", "3.9", "3.10"]
steps:
- name: Delay, waiting Pypi to update.
if: ${{ github.event_name != 'workflow_dispatch' }}
run: sleep 480
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Preparations
run: |
brew install libjpeg little-cms2
python3 -m pip install pytest piexif cffi pillow numpy pympler defusedxml
python3 -m pip install --only-binary=:all: pillow_heif
- name: Install OpenCV for CPython
if: startsWith(matrix.python-version, '3.')
run: python3 -m pip install opencv-python
- name: Test wheel
run: cd .. && python3 -m pytest -rs pillow_heif
manylinux-wheels:
if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }}
name: 🐍 • Ubuntu-Focal • ${{ matrix.python-version }}
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: ["pypy-3.7", "pypy-3.8", "3.6", "3.7", "3.8", "3.9", "3.10"]
steps:
- name: Delay, waiting Pypi to update.
if: ${{ github.event_name != 'workflow_dispatch' }}
run: sleep 480
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Preparations
run: |
sudo apt update && sudo apt install libjpeg-dev liblcms2-dev
python3 -m pip install pytest piexif cffi pillow numpy pympler defusedxml
python3 -m pip install --only-binary=:all: pillow_heif
- name: Install OpenCV for CPython
if: startsWith(matrix.python-version, '3.')
run: python3 -m pip install opencv-python
- name: Test wheel
run: cd .. && python3 -m pytest -rs pillow_heif