Skip to content

Commit 1e88fb8

Browse files
authored
fix ci release artifact name conflicts (#5251)
* build android vulkan 32bit with api-14 * fix artifact name conflicts * add watchos tvos
1 parent 92d49e1 commit 1e88fb8

File tree

3 files changed

+156
-75
lines changed

3 files changed

+156
-75
lines changed

.github/workflows/release-python.yml

+72-33
Original file line numberDiff line numberDiff line change
@@ -37,28 +37,29 @@ jobs:
3737

3838
- uses: actions/upload-artifact@v4
3939
with:
40+
name: sdist
4041
path: dist/*.tar.gz
4142

4243
build_wheels:
43-
name: ${{ matrix.arch }} ${{ matrix.build }} on ${{ matrix.os }}
44+
name: ${{ matrix.arch }} ${{ matrix.build_id }} on ${{ matrix.os }}
4445
runs-on: ${{ matrix.os }}
4546
strategy:
4647
fail-fast: false
4748
matrix:
4849
include:
49-
- { os: ubuntu-20.04, arch: x86_64, build: 'cp*-manylinux*' }
50-
- { os: ubuntu-20.04, arch: x86_64, build: 'cp*-musllinux*' }
51-
- { os: ubuntu-20.04, arch: x86_64, build: 'pp*' }
52-
- { os: ubuntu-20.04, arch: i686, build: 'cp*-manylinux*' }
53-
- { os: ubuntu-20.04, arch: i686, build: 'cp*-musllinux*' }
54-
- { os: ubuntu-20.04, arch: i686, build: 'pp*' }
55-
- { os: windows-2019, arch: x86, build: 'cp*' }
56-
- { os: windows-2019, arch: AMD64, build: 'cp*' }
57-
- { os: windows-2019, arch: AMD64, build: 'pp*' }
58-
- { os: windows-2019, arch: ARM64, build: 'cp*' }
59-
- { os: macos-latest, arch: x86_64, build: 'cp*' }
60-
- { os: macos-latest, arch: x86_64, build: 'pp*' }
61-
- { os: macos-latest, arch: arm64, build: 'cp*' }
50+
- { os: ubuntu-20.04, arch: x86_64, build: 'cp*-manylinux*', build_id: cp-manylinux }
51+
- { os: ubuntu-20.04, arch: x86_64, build: 'cp*-musllinux*', build_id: cp-musllinux }
52+
- { os: ubuntu-20.04, arch: x86_64, build: 'pp*', build_id: pp }
53+
- { os: ubuntu-20.04, arch: i686, build: 'cp*-manylinux*', build_id: cp-manylinux }
54+
- { os: ubuntu-20.04, arch: i686, build: 'cp*-musllinux*', build_id: cp-musllinux }
55+
- { os: ubuntu-20.04, arch: i686, build: 'pp*', build_id: pp }
56+
- { os: windows-2019, arch: x86, build: 'cp*', build_id: cp }
57+
- { os: windows-2019, arch: AMD64, build: 'cp*', build_id: cp }
58+
- { os: windows-2019, arch: AMD64, build: 'pp*', build_id: pp }
59+
- { os: windows-2019, arch: ARM64, build: 'cp*', build_id: cp }
60+
- { os: macos-latest, arch: x86_64, build: 'cp*', build_id: cp }
61+
- { os: macos-latest, arch: x86_64, build: 'pp*', build_id: pp }
62+
- { os: macos-latest, arch: arm64, build: 'cp*', build_id: cp }
6263

6364
steps:
6465
- uses: actions/checkout@v4
@@ -221,30 +222,19 @@ jobs:
221222
- name: Upload wheels
222223
uses: actions/upload-artifact@v4
223224
with:
225+
name: wheels-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.build_id }}
224226
path: wheelhouse/*.whl
225227

226-
build_wheels_qemu:
227-
name: ${{ matrix.arch }} ${{ matrix.build }}
228+
build_wheels_qemu_cp:
229+
name: ${{ matrix.arch }} ${{ matrix.build_cp }} ${{ matrix.build_sub }}
228230
runs-on: ubuntu-20.04
229231

230232
strategy:
231233
fail-fast: false
232234
matrix:
233235
arch: [aarch64, ppc64le, s390x]
234-
build: [ 'cp36-manylinux*', 'cp37-manylinux*', 'cp38-manylinux*',
235-
'cp39-manylinux*', 'cp310-manylinux*', 'cp311-manylinux*',
236-
'cp312-manylinux*', 'cp36-musllinux*', 'cp37-musllinux*',
237-
'cp38-musllinux*', 'cp39-musllinux*', 'cp310-musllinux*',
238-
'cp311-musllinux*', 'cp312-musllinux*' ]
239-
include:
240-
- arch: aarch64
241-
build: 'pp37-*'
242-
- arch: aarch64
243-
build: 'pp38-*'
244-
- arch: aarch64
245-
build: 'pp39-*'
246-
- arch: aarch64
247-
build: 'pp310-*'
236+
build_cp: [cp36, cp37, cp38, cp39, cp310, cp311, cp312]
237+
build_sub: [manylinux, musllinux]
248238

249239
steps:
250240
- uses: actions/checkout@v4
@@ -264,7 +254,55 @@ jobs:
264254
uses: pypa/[email protected]
265255
env:
266256
CIBW_ARCHS_LINUX: ${{ matrix.arch }}
267-
CIBW_BUILD: ${{ matrix.build }}
257+
CIBW_BUILD: ${{ matrix.build_cp }}-${{ matrix.build_sub }}*
258+
CIBW_BUILD_VERBOSITY: 1
259+
CIBW_ENVIRONMENT: CMAKE_BUILD_PARALLEL_LEVEL=2
260+
with:
261+
output-dir: wheelhouse
262+
263+
- name: Show files
264+
run: ls -lh wheelhouse
265+
shell: bash
266+
267+
- name: Verify clean directory
268+
run: git diff --exit-code
269+
shell: bash
270+
271+
- name: Upload wheels
272+
uses: actions/upload-artifact@v4
273+
with:
274+
name: wheels_qemu_cp-${{ matrix.arch }}-${{ matrix.build_cp }}-${{ matrix.build_sub }}
275+
path: wheelhouse/*.whl
276+
277+
build_wheels_qemu_pp:
278+
name: ${{ matrix.arch }} ${{ matrix.build_pp }}
279+
runs-on: ubuntu-20.04
280+
281+
strategy:
282+
fail-fast: false
283+
matrix:
284+
arch: [aarch64]
285+
build_pp: [pp37, pp38, pp39, pp310]
286+
287+
steps:
288+
- uses: actions/checkout@v4
289+
with:
290+
submodules: true
291+
292+
- uses: actions/setup-python@v5
293+
with:
294+
python-version: '3.x'
295+
296+
- name: Set up QEMU
297+
uses: docker/setup-qemu-action@v3
298+
with:
299+
platforms: all
300+
301+
- name: Build wheels for manylinux with qemu
302+
uses: pypa/[email protected]
303+
env:
304+
CIBW_ARCHS_LINUX: ${{ matrix.arch }}
305+
CIBW_BUILD: ${{ matrix.build_pp }}-*
268306
CIBW_BUILD_VERBOSITY: 1
269307
CIBW_ENVIRONMENT: CMAKE_BUILD_PARALLEL_LEVEL=2
270308
with:
@@ -281,13 +319,14 @@ jobs:
281319
- name: Upload wheels
282320
uses: actions/upload-artifact@v4
283321
with:
322+
name: wheels_qemu_pp-${{ matrix.arch }}-${{ matrix.build_pp }}
284323
path: wheelhouse/*.whl
285324

286325
upload_all:
287326
permissions:
288327
contents: none
289328
name: Upload
290-
needs: [build_wheels, build_wheels_qemu, build_sdist]
329+
needs: [build_wheels, build_wheels_qemu_cp, build_wheels_qemu_pp, build_sdist]
291330
runs-on: ubuntu-latest
292331

293332
steps:
@@ -297,8 +336,8 @@ jobs:
297336

298337
- uses: actions/download-artifact@v4
299338
with:
300-
name: artifact
301339
path: dist
340+
merge-multiple: true
302341

303342
- uses: pypa/gh-action-pypi-publish@release/v1
304343
with:

.github/workflows/release.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -2299,7 +2299,7 @@ jobs:
22992299
run: |
23002300
mkdir build-armv7 && cd build-armv7
23012301
cmake -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_LATEST_HOME/build/cmake/android.toolchain.cmake -DANDROID_USE_LEGACY_TOOLCHAIN_FILE=False -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=install -DNCNN_VERSION_STRING="${{ needs.setup.outputs.VERSION }}" \
2302-
-DANDROID_ABI="armeabi-v7a" -DANDROID_ARM_NEON=ON -DANDROID_PLATFORM=android-21 \
2302+
-DANDROID_ABI="armeabi-v7a" -DANDROID_ARM_NEON=ON -DANDROID_PLATFORM=android-14 \
23032303
-DNCNN_VULKAN=ON -DNCNN_BUILD_BENCHMARK=OFF ..
23042304
cmake --build . -j 2
23052305
cmake --build . --target install/strip
@@ -2315,7 +2315,7 @@ jobs:
23152315
run: |
23162316
mkdir build-x86 && cd build-x86
23172317
cmake -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_LATEST_HOME/build/cmake/android.toolchain.cmake -DANDROID_USE_LEGACY_TOOLCHAIN_FILE=False -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=install -DNCNN_VERSION_STRING="${{ needs.setup.outputs.VERSION }}" \
2318-
-DANDROID_ABI="x86" -DANDROID_PLATFORM=android-21 \
2318+
-DANDROID_ABI="x86" -DANDROID_PLATFORM=android-14 \
23192319
-DNCNN_VULKAN=ON -DNCNN_BUILD_BENCHMARK=OFF ..
23202320
cmake --build . -j 2
23212321
cmake --build . --target install/strip
@@ -2358,7 +2358,7 @@ jobs:
23582358
run: |
23592359
mkdir build-armv7 && cd build-armv7
23602360
cmake -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_LATEST_HOME/build/cmake/android.toolchain.cmake -DANDROID_USE_LEGACY_TOOLCHAIN_FILE=False -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=install -DNCNN_VERSION_STRING="${{ needs.setup.outputs.VERSION }}" \
2361-
-DANDROID_ABI="armeabi-v7a" -DANDROID_ARM_NEON=ON -DANDROID_PLATFORM=android-21 \
2361+
-DANDROID_ABI="armeabi-v7a" -DANDROID_ARM_NEON=ON -DANDROID_PLATFORM=android-14 \
23622362
-DNCNN_VULKAN=ON -DNCNN_BUILD_BENCHMARK=OFF -DNCNN_SHARED_LIB=ON ..
23632363
cmake --build . -j 2
23642364
cmake --build . --target install/strip
@@ -2374,7 +2374,7 @@ jobs:
23742374
run: |
23752375
mkdir build-x86 && cd build-x86
23762376
cmake -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_LATEST_HOME/build/cmake/android.toolchain.cmake -DANDROID_USE_LEGACY_TOOLCHAIN_FILE=False -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=install -DNCNN_VERSION_STRING="${{ needs.setup.outputs.VERSION }}" \
2377-
-DANDROID_ABI="x86" -DANDROID_PLATFORM=android-21 \
2377+
-DANDROID_ABI="x86" -DANDROID_PLATFORM=android-14 \
23782378
-DNCNN_VULKAN=ON -DNCNN_BUILD_BENCHMARK=OFF -DNCNN_SHARED_LIB=ON ..
23792379
cmake --build . -j 2
23802380
cmake --build . --target install/strip

0 commit comments

Comments
 (0)