Skip to content

Commit 2bee3e3

Browse files
committed
Fix github action for building
1 parent 1ca37eb commit 2bee3e3

File tree

1 file changed

+44
-24
lines changed

1 file changed

+44
-24
lines changed

.github/workflows/build.yml

Lines changed: 44 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,11 @@ jobs:
3030
pip install pytest numpy Pillow
3131
pytest
3232
33-
- uses: actions/upload-artifact@v3
33+
- uses: actions/upload-artifact@v4
3434
with:
35+
name: sdist
3536
path: dist/apngasm_python-*.tar.gz
37+
retention-days: 7
3638

3739
build_wheels:
3840
name: Build wheels for ${{ matrix.os }} ${{ matrix.cibw_archs }} ${{ matrix.cibw_build }}
@@ -45,50 +47,62 @@ jobs:
4547
cibw_archs: AMD64
4648
cibw_build: "cp* pp*"
4749
cibw_environment: APNGASM_COMPILE_TARGET=x86_64
50+
artifact: win-amd64-cp_pp
4851
- os: windows-2019
4952
cibw_archs: x86
5053
cibw_build: "cp*"
5154
cibw_environment: APNGASM_COMPILE_TARGET=x86
55+
artifact: win-x86-cp
5256
- os: windows-2019
5357
cibw_archs: ARM64
5458
cibw_build: "cp*"
5559
cibw_environment: APNGASM_COMPILE_TARGET=armv8
60+
artifact: win-amrm64-cp
5661
- os: macos-12
5762
cibw_archs: x86_64
5863
cibw_build: "cp* pp*"
5964
cibw_environment: APNGASM_COMPILE_TARGET=x86_64
65+
artifact: macos-x86_64-cp_pp
6066
- os: macos-14
6167
cibw_archs: arm64
6268
cibw_build: "cp* pp*"
6369
cibw_environment: APNGASM_COMPILE_TARGET=armv8
70+
artifact: macos-arm64-cp_pp
6471
- os: macos-14
6572
cibw_archs: universal2
6673
cibw_build: "cp* pp*"
6774
cibw_environment: APNGASM_COMPILE_TARGET=universal2
68-
- os: ubuntu-20.04
75+
artifact: macos-universal2-cp_pp
76+
- os: ubuntu-22.04
6977
cibw_archs: x86_64
7078
cibw_build: "cp* pp*"
7179
cibw_environment: APNGASM_COMPILE_TARGET=x86_64
72-
- os: ubuntu-20.04
80+
artifact: many_musllinux-x86_64-cp_pp
81+
- os: ubuntu-22.04
7382
cibw_archs: i686
7483
cibw_build: "cp* pp*"
7584
cibw_environment: APNGASM_COMPILE_TARGET=x86
76-
- os: ubuntu-20.04
85+
artifact: many_musllinux-x86-cp_pp
86+
- os: ubuntu-22.04-arm
7787
cibw_archs: aarch64
7888
cibw_build: "cp*-musllinux_* pp*-musllinux_*"
7989
cibw_environment: APNGASM_COMPILE_TARGET=armv8
80-
- os: ubuntu-20.04
90+
artifact: musllinux-armv8-cp_pp
91+
- os: ubuntu-22.04-arm
8192
cibw_archs: aarch64
8293
cibw_build: "cp*-manylinux_* pp*-manylinux_*"
8394
cibw_environment: APNGASM_COMPILE_TARGET=armv8
84-
- os: ubuntu-20.04
95+
artifact: manylinux-armv8-cp_pp
96+
- os: ubuntu-22.04
8597
cibw_archs: ppc64le
8698
cibw_build: "cp*-musllinux_*"
8799
cibw_environment: APNGASM_COMPILE_TARGET=ppc64le
88-
- os: ubuntu-20.04
100+
artifact: musllinux-ppc64le-cp
101+
- os: ubuntu-22.04
89102
cibw_archs: ppc64le
90103
cibw_build: "cp*-manylinux_*"
91104
cibw_environment: APNGASM_COMPILE_TARGET=ppc64le
105+
artifact: manylinux-ppc64le-cp
92106
# - os: ubuntu-20.04
93107
# cibw_archs: s390x
94108
# cibw_build: "*-musllinux_*"
@@ -132,25 +146,29 @@ jobs:
132146
pip install abi3audit
133147
abi3audit $(ls ./wheelhouse/*.whl) --debug --verbose
134148
135-
- uses: actions/upload-artifact@v3
149+
- uses: actions/upload-artifact@v4
136150
with:
151+
name: wheels-${{matrix.artifact}}
137152
path: ./wheelhouse/*.whl
153+
retention-days: 7
138154

139155
# upload_pypi_test:
140156
# needs: [build_wheels, build_sdist]
141157
# runs-on: ubuntu-latest
142158
# if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
143159
# steps:
144-
# - uses: actions/download-artifact@v3
145-
# with:
146-
# # unpacks default artifact into dist/
147-
# # if `name: artifact` is omitted, the action will create extra parent dir
148-
# name: artifact
149-
# path: dist
160+
# - name: "Download artifacts"
161+
# uses: actions/download-artifact@v4
162+
163+
# - name: "Move packages to the dist/ folder"
164+
# run: |
165+
# mkdir dist/
166+
# mv sdist/* dist/
167+
# mv wheels-*/*.whl dist/
150168

151-
# - uses: pypa/[email protected]
169+
# - name: "Publish packages on PyPI"
170+
# uses: pypa/[email protected]
152171
# with:
153-
# user: __token__
154172
# password: ${{ secrets.TEST_PYPI_API_TOKEN }}
155173
# repository_url: https://test.pypi.org/legacy/
156174

@@ -159,14 +177,16 @@ jobs:
159177
runs-on: ubuntu-latest
160178
if: github.event_name == 'release' && github.event.action == 'published'
161179
steps:
162-
- uses: actions/download-artifact@v3
163-
with:
164-
# unpacks default artifact into dist/
165-
# if `name: artifact` is omitted, the action will create extra parent dir
166-
name: artifact
167-
path: dist
180+
- name: "Download artifacts"
181+
uses: actions/download-artifact@v4
182+
183+
- name: "Move packages to the dist/ folder"
184+
run: |
185+
mkdir dist/
186+
mv sdist/* dist/
187+
mv wheels-*/*.whl dist/
168188
169-
- uses: pypa/[email protected]
189+
- name: "Publish packages on PyPI"
190+
uses: pypa/[email protected]
170191
with:
171-
user: __token__
172192
password: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)