@@ -3,6 +3,9 @@ name: release-deploy
33on :
44 release :
55 types : [ published ]
6+ # push:
7+ # branches: [ main ]
8+ # pull_request:
69
710jobs :
811 build-sdist :
1417 with :
1518 submodules : true
1619
17- - uses : actions-rs/toolchain@v1
18- with :
19- toolchain : stable
20+ - name : Install Rust (stable)
21+ run :
22+ curl https://sh.rustup.rs -sSf | sh -s -- -y
2023
2124 - uses : actions/setup-python@v5
2225 name : Install Python
@@ -26,14 +29,13 @@ jobs:
2629 - name : Build sdist
2730 run : |
2831 python -m pip install -U pip
29- python -m pip install -U setuptools-rust
30- python -m pip install .
31- python setup.py sdist
32+ python -m pip install -U maturin build
33+ python -m build --sdist -o dist
3234
3335 - name : Store artifacts
3436 uses : actions/upload-artifact@v4
3537 with :
36- name : wheels
38+ name : sdist
3739 path : ./dist
3840
3941 build-wheels :
4446 matrix :
4547 include :
4648 # Windows 32 bit
47- - os : windows-latest
48- python : 37
49- platform_id : win32
5049 - os : windows-latest
5150 python : 38
5251 platform_id : win32
6463 platform_id : win32
6564
6665 # Windows 64 bit
67- - os : windows-latest
68- python : 37
69- platform_id : win_amd64
7066 - os : windows-latest
7167 python : 38
7268 platform_id : win_amd64
8480 platform_id : win_amd64
8581
8682 # Linux 64 bit manylinux2014
87- - os : ubuntu-latest
88- python : 37
89- platform_id : manylinux_x86_64
90- manylinux_image : manylinux2014
9183 - os : ubuntu-latest
9284 python : 38
9385 platform_id : manylinux_x86_64
@@ -109,10 +101,24 @@ jobs:
109101 platform_id : manylinux_x86_64
110102 manylinux_image : manylinux2014
111103
104+ # Linux aarch64
105+ - os : ubuntu-latest
106+ python : 38
107+ platform_id : manylinux_aarch64
108+ - os : ubuntu-latest
109+ python : 39
110+ platform_id : manylinux_aarch64
111+ - os : ubuntu-latest
112+ python : 310
113+ platform_id : manylinux_aarch64
114+ - os : ubuntu-latest
115+ python : 311
116+ platform_id : manylinux_aarch64
117+ - os : ubuntu-latest
118+ python : 312
119+ platform_id : manylinux_aarch64
120+
112121 # MacOS x86_64
113- - os : macos-latest
114- python : 37
115- platform_id : macosx_x86_64
116122 - os : macos-latest
117123 python : 38
118124 platform_id : macosx_x86_64
@@ -151,9 +157,15 @@ jobs:
151157 with :
152158 submodules : true
153159
154- - uses : actions-rs/toolchain@v1
160+ - name : Set up QEMU
161+ if : ${{ matrix.platform_id == 'manylinux_aarch64' }}
162+ uses : docker/setup-qemu-action@v3
155163 with :
156- toolchain : stable
164+ platforms : arm64
165+
166+ - name : Install Rust (stable)
167+ run :
168+ curl https://sh.rustup.rs -sSf | sh -s -- -y
157169
158170 - uses : actions/setup-python@v5
159171 name : Install Python
@@ -183,7 +195,7 @@ jobs:
183195 - name : Store artifacts
184196 uses : actions/upload-artifact@v4
185197 with :
186- name : wheels
198+ name : wheel-${{ matrix.python }}-${{ matrix.platform_id }}
187199 path : ./dist
188200
189201 test-package :
@@ -194,12 +206,12 @@ jobs:
194206 strategy :
195207 fail-fast : false
196208 matrix :
197- python-version : ['3.7', '3. 8', '3.9', '3.10', '3.11', '3.12']
209+ python-version : ['3.8', '3.9', '3.10', '3.11', '3.12']
198210
199211 steps :
200- - uses : actions-rs/toolchain@v1
201- with :
202- toolchain : stable
212+ - name : Install Rust (stable)
213+ run :
214+ curl https://sh.rustup.rs -sSf | sh -s -- -y
203215
204216 - name : Set up Python ${{ matrix.python-version }}
205217 uses : actions/setup-python@v5
@@ -209,8 +221,8 @@ jobs:
209221 - name : Download the wheels
210222 uses : actions/download-artifact@v4
211223 with :
212- name : wheels
213224 path : dist/
225+ merge-multiple : true
214226
215227 - name : Install from package wheels and test
216228 run : |
@@ -220,8 +232,8 @@ jobs:
220232 python -m pip install -U pytest pydicom pylibjpeg
221233 python -m pip uninstall -y pylibjpeg-rle
222234 python -m pip install git+https://github.com/pydicom/pylibjpeg-data
223- python -m pip install -U --find-links dist/ pylibjpeg-rle
224- python -c "import pytest; pytest.main([' --pyargs', ' rle.tests'])"
235+ python -m pip install -U --pre -- find-links dist/ pylibjpeg-rle
236+ python -m pytest --pyargs rle.tests
225237 deactivate
226238
227239 - name : Install from package tarball and test
@@ -233,8 +245,8 @@ jobs:
233245 python -m pip uninstall -y pylibjpeg-rle
234246 python -m pip install git+https://github.com/pydicom/pylibjpeg-data
235247 export PATH="$PATH:$HOME/.cargo/bin"
236- python -m pip install -U dist/pylibjpeg- rle-*.tar.gz
237- python -c "import pytest; pytest.main([' --pyargs', ' rle.tests'])"
248+ python -m pip install -U dist/pylibjpeg* rle-*.tar.gz
249+ python -m pytest --pyargs rle.tests
238250 deactivate
239251
240252 # The pypi upload fails with non-linux containers, so grab the uploaded
@@ -249,8 +261,8 @@ jobs:
249261 - name : Download the wheels
250262 uses : actions/download-artifact@v4
251263 with :
252- name : wheels
253264 path : dist/
265+ merge-multiple : true
254266
255267 - name : Publish package to PyPi
256268 uses : pypa/gh-action-pypi-publish@master
0 commit comments