@@ -3,32 +3,35 @@ name: release-deploy
33on :
44 release :
55 types : [ published ]
6+ # push:
7+ # branches: [ main ]
8+ # pull_request:
69
710jobs :
811 build-sdist :
912 name : Build source distribution
1013 runs-on : ubuntu-latest
1114 timeout-minutes : 10
1215 steps :
13- - uses : actions/checkout@v3
16+ - uses : actions/checkout@v4
1417 with :
1518 submodules : true
1619
17- - uses : actions/setup-python@v4
20+ - uses : actions/setup-python@v5
1821 name : Install Python
1922 with :
2023 python-version : ' 3.10'
2124
2225 - name : Build sdist
2326 run : |
2427 python -m pip install -U pip
25- python -m pip install numpy cython
26- python setup.py sdist
28+ python -m pip install build
29+ python -m build -- sdist
2730
2831 - name : Store artifacts
29- uses : actions/upload-artifact@v3
32+ uses : actions/upload-artifact@v4
3033 with :
31- name : wheels
34+ name : sdist
3235 path : ./dist
3336
3437 build-wheels :
3942 matrix :
4043 include :
4144 # Windows 64 bit
42- - os : windows-latest
43- python : 37
44- platform_id : win_amd64
4545 - os : windows-latest
4646 python : 38
4747 platform_id : win_amd64
@@ -54,12 +54,11 @@ jobs:
5454 - os : windows-latest
5555 python : 311
5656 platform_id : win_amd64
57+ - os : windows-latest
58+ python : 312
59+ platform_id : win_amd64
5760
5861 # Linux 64 bit manylinux2014
59- - os : ubuntu-latest
60- python : 37
61- platform_id : manylinux_x86_64
62- manylinux_image : manylinux2014
6362 - os : ubuntu-latest
6463 python : 38
6564 platform_id : manylinux_x86_64
@@ -76,11 +75,12 @@ jobs:
7675 python : 311
7776 platform_id : manylinux_x86_64
7877 manylinux_image : manylinux2014
78+ - os : ubuntu-latest
79+ python : 312
80+ platform_id : manylinux_x86_64
81+ manylinux_image : manylinux2014
7982
8083 # Linux aarch64
81- - os : ubuntu-latest
82- python : 37
83- platform_id : manylinux_aarch64
8484 - os : ubuntu-latest
8585 python : 38
8686 platform_id : manylinux_aarch64
@@ -93,11 +93,11 @@ jobs:
9393 - os : ubuntu-latest
9494 python : 311
9595 platform_id : manylinux_aarch64
96+ - os : ubuntu-latest
97+ python : 312
98+ platform_id : manylinux_aarch64
9699
97100 # MacOS x86_64
98- - os : macos-latest
99- python : 37
100- platform_id : macosx_x86_64
101101 - os : macos-latest
102102 python : 38
103103 platform_id : macosx_x86_64
@@ -110,6 +110,9 @@ jobs:
110110 - os : macos-latest
111111 python : 311
112112 platform_id : macosx_x86_64
113+ - os : macos-latest
114+ python : 312
115+ platform_id : macosx_x86_64
113116
114117 # MacOS arm64
115118 - os : macos-latest
@@ -124,9 +127,14 @@ jobs:
124127 - os : macos-latest
125128 python : 311
126129 platform_id : macosx_arm64
130+ - os : macos-latest
131+ python : 312
132+ platform_id : macosx_arm64
127133
128134 steps :
129- - uses : actions/checkout@v3
135+ - uses : actions/checkout@v4
136+ with :
137+ submodules : true
130138
131139 - name : Set up QEMU
132140 if : ${{ matrix.platform_id == 'manylinux_aarch64' }}
@@ -142,7 +150,7 @@ jobs:
142150 - name : Install dependencies
143151 run : |
144152 python -m pip install -U pip
145- python -m pip install cibuildwheel==2.12.0
153+ python -m pip install cibuildwheel>=2.16
146154
147155 - name : Build wheels
148156 env :
@@ -157,12 +165,52 @@ jobs:
157165 python -m cibuildwheel --output-dir dist
158166
159167 - name : Store artifacts
160- uses : actions/upload-artifact@v3
168+ uses : actions/upload-artifact@v4
161169 with :
162- name : wheels
170+ name : wheel-${{ matrix.python }}-${{ matrix.platform_id }}
163171 path : ./dist
164172
165- # Todo: download and test the packages after we have working tests
173+ test-package :
174+ name : Test built package
175+ needs : [ build-wheels, build-sdist ]
176+ runs-on : ubuntu-latest
177+ timeout-minutes : 30
178+ strategy :
179+ fail-fast : false
180+ matrix :
181+ python-version : ['3.8', '3.9', '3.10', '3.11', '3.12']
182+
183+ steps :
184+ - name : Set up Python ${{ matrix.python-version }}
185+ uses : actions/setup-python@v5
186+ with :
187+ python-version : ${{ matrix.python-version }}
188+
189+ - name : Download the wheels
190+ uses : actions/download-artifact@v4
191+ with :
192+ path : dist/
193+ merge-multiple : true
194+
195+ - name : Install from package wheels and test
196+ run : |
197+ python -m venv testwhl
198+ source testwhl/bin/activate
199+ python -m pip install -U pip
200+ python -m pip install pytest numpy
201+ python -m pip install -U --pre --find-links dist/ pyjpegls
202+ python -m pytest --pyargs jpeg_ls.tests
203+ deactivate
204+
205+ - name : Install from package tarball and test
206+ run : |
207+ python -m venv testsrc
208+ source testsrc/bin/activate
209+ python -m pip install -U pip
210+ python -m pip install pytest numpy
211+ python -m pip install -U dist/pyjpegls*.tar.gz
212+ python -m pytest --pyargs jpeg_ls.tests
213+ deactivate
166214
167215 # See: https://github.com/pypa/gh-action-pypi-publish/discussions/15
168216 deploy :
@@ -178,10 +226,10 @@ jobs:
178226
179227 steps :
180228 - name : Download the wheels
181- uses : actions/download-artifact@v3
229+ uses : actions/download-artifact@v4
182230 with :
183- name : wheels
184231 path : dist/
232+ merge-multiple : true
185233
186234 - name : Publish package to PyPi
187235 uses : pypa/gh-action-pypi-publish@release/v1
0 commit comments