Skip to content

Commit

Permalink
fix ci release artifact name conflicts (#5251)
Browse files Browse the repository at this point in the history
* build android vulkan 32bit with api-14

* fix artifact name conflicts

* add watchos tvos
  • Loading branch information
nihui authored Jan 2, 2024
1 parent 92d49e1 commit 1e88fb8
Show file tree
Hide file tree
Showing 3 changed files with 156 additions and 75 deletions.
105 changes: 72 additions & 33 deletions .github/workflows/release-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,28 +37,29 @@ jobs:

- uses: actions/upload-artifact@v4
with:
name: sdist
path: dist/*.tar.gz

build_wheels:
name: ${{ matrix.arch }} ${{ matrix.build }} on ${{ matrix.os }}
name: ${{ matrix.arch }} ${{ matrix.build_id }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- { os: ubuntu-20.04, arch: x86_64, build: 'cp*-manylinux*' }
- { os: ubuntu-20.04, arch: x86_64, build: 'cp*-musllinux*' }
- { os: ubuntu-20.04, arch: x86_64, build: 'pp*' }
- { os: ubuntu-20.04, arch: i686, build: 'cp*-manylinux*' }
- { os: ubuntu-20.04, arch: i686, build: 'cp*-musllinux*' }
- { os: ubuntu-20.04, arch: i686, build: 'pp*' }
- { os: windows-2019, arch: x86, build: 'cp*' }
- { os: windows-2019, arch: AMD64, build: 'cp*' }
- { os: windows-2019, arch: AMD64, build: 'pp*' }
- { os: windows-2019, arch: ARM64, build: 'cp*' }
- { os: macos-latest, arch: x86_64, build: 'cp*' }
- { os: macos-latest, arch: x86_64, build: 'pp*' }
- { os: macos-latest, arch: arm64, build: 'cp*' }
- { os: ubuntu-20.04, arch: x86_64, build: 'cp*-manylinux*', build_id: cp-manylinux }
- { os: ubuntu-20.04, arch: x86_64, build: 'cp*-musllinux*', build_id: cp-musllinux }
- { os: ubuntu-20.04, arch: x86_64, build: 'pp*', build_id: pp }
- { os: ubuntu-20.04, arch: i686, build: 'cp*-manylinux*', build_id: cp-manylinux }
- { os: ubuntu-20.04, arch: i686, build: 'cp*-musllinux*', build_id: cp-musllinux }
- { os: ubuntu-20.04, arch: i686, build: 'pp*', build_id: pp }
- { os: windows-2019, arch: x86, build: 'cp*', build_id: cp }
- { os: windows-2019, arch: AMD64, build: 'cp*', build_id: cp }
- { os: windows-2019, arch: AMD64, build: 'pp*', build_id: pp }
- { os: windows-2019, arch: ARM64, build: 'cp*', build_id: cp }
- { os: macos-latest, arch: x86_64, build: 'cp*', build_id: cp }
- { os: macos-latest, arch: x86_64, build: 'pp*', build_id: pp }
- { os: macos-latest, arch: arm64, build: 'cp*', build_id: cp }

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -221,30 +222,19 @@ jobs:
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.build_id }}
path: wheelhouse/*.whl

build_wheels_qemu:
name: ${{ matrix.arch }} ${{ matrix.build }}
build_wheels_qemu_cp:
name: ${{ matrix.arch }} ${{ matrix.build_cp }} ${{ matrix.build_sub }}
runs-on: ubuntu-20.04

strategy:
fail-fast: false
matrix:
arch: [aarch64, ppc64le, s390x]
build: [ 'cp36-manylinux*', 'cp37-manylinux*', 'cp38-manylinux*',
'cp39-manylinux*', 'cp310-manylinux*', 'cp311-manylinux*',
'cp312-manylinux*', 'cp36-musllinux*', 'cp37-musllinux*',
'cp38-musllinux*', 'cp39-musllinux*', 'cp310-musllinux*',
'cp311-musllinux*', 'cp312-musllinux*' ]
include:
- arch: aarch64
build: 'pp37-*'
- arch: aarch64
build: 'pp38-*'
- arch: aarch64
build: 'pp39-*'
- arch: aarch64
build: 'pp310-*'
build_cp: [cp36, cp37, cp38, cp39, cp310, cp311, cp312]
build_sub: [manylinux, musllinux]

steps:
- uses: actions/checkout@v4
Expand All @@ -264,7 +254,55 @@ jobs:
uses: pypa/[email protected]
env:
CIBW_ARCHS_LINUX: ${{ matrix.arch }}
CIBW_BUILD: ${{ matrix.build }}
CIBW_BUILD: ${{ matrix.build_cp }}-${{ matrix.build_sub }}*
CIBW_BUILD_VERBOSITY: 1
CIBW_ENVIRONMENT: CMAKE_BUILD_PARALLEL_LEVEL=2
with:
output-dir: wheelhouse

- name: Show files
run: ls -lh wheelhouse
shell: bash

- name: Verify clean directory
run: git diff --exit-code
shell: bash

- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels_qemu_cp-${{ matrix.arch }}-${{ matrix.build_cp }}-${{ matrix.build_sub }}
path: wheelhouse/*.whl

build_wheels_qemu_pp:
name: ${{ matrix.arch }} ${{ matrix.build_pp }}
runs-on: ubuntu-20.04

strategy:
fail-fast: false
matrix:
arch: [aarch64]
build_pp: [pp37, pp38, pp39, pp310]

steps:
- uses: actions/checkout@v4
with:
submodules: true

- uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: all

- name: Build wheels for manylinux with qemu
uses: pypa/[email protected]
env:
CIBW_ARCHS_LINUX: ${{ matrix.arch }}
CIBW_BUILD: ${{ matrix.build_pp }}-*
CIBW_BUILD_VERBOSITY: 1
CIBW_ENVIRONMENT: CMAKE_BUILD_PARALLEL_LEVEL=2
with:
Expand All @@ -281,13 +319,14 @@ jobs:
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels_qemu_pp-${{ matrix.arch }}-${{ matrix.build_pp }}
path: wheelhouse/*.whl

upload_all:
permissions:
contents: none
name: Upload
needs: [build_wheels, build_wheels_qemu, build_sdist]
needs: [build_wheels, build_wheels_qemu_cp, build_wheels_qemu_pp, build_sdist]
runs-on: ubuntu-latest

steps:
Expand All @@ -297,8 +336,8 @@ jobs:

- uses: actions/download-artifact@v4
with:
name: artifact
path: dist
merge-multiple: true

- uses: pypa/gh-action-pypi-publish@release/v1
with:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2299,7 +2299,7 @@ jobs:
run: |
mkdir build-armv7 && cd build-armv7
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 }}" \
-DANDROID_ABI="armeabi-v7a" -DANDROID_ARM_NEON=ON -DANDROID_PLATFORM=android-21 \
-DANDROID_ABI="armeabi-v7a" -DANDROID_ARM_NEON=ON -DANDROID_PLATFORM=android-14 \
-DNCNN_VULKAN=ON -DNCNN_BUILD_BENCHMARK=OFF ..
cmake --build . -j 2
cmake --build . --target install/strip
Expand All @@ -2315,7 +2315,7 @@ jobs:
run: |
mkdir build-x86 && cd build-x86
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 }}" \
-DANDROID_ABI="x86" -DANDROID_PLATFORM=android-21 \
-DANDROID_ABI="x86" -DANDROID_PLATFORM=android-14 \
-DNCNN_VULKAN=ON -DNCNN_BUILD_BENCHMARK=OFF ..
cmake --build . -j 2
cmake --build . --target install/strip
Expand Down Expand Up @@ -2358,7 +2358,7 @@ jobs:
run: |
mkdir build-armv7 && cd build-armv7
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 }}" \
-DANDROID_ABI="armeabi-v7a" -DANDROID_ARM_NEON=ON -DANDROID_PLATFORM=android-21 \
-DANDROID_ABI="armeabi-v7a" -DANDROID_ARM_NEON=ON -DANDROID_PLATFORM=android-14 \
-DNCNN_VULKAN=ON -DNCNN_BUILD_BENCHMARK=OFF -DNCNN_SHARED_LIB=ON ..
cmake --build . -j 2
cmake --build . --target install/strip
Expand All @@ -2374,7 +2374,7 @@ jobs:
run: |
mkdir build-x86 && cd build-x86
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 }}" \
-DANDROID_ABI="x86" -DANDROID_PLATFORM=android-21 \
-DANDROID_ABI="x86" -DANDROID_PLATFORM=android-14 \
-DNCNN_VULKAN=ON -DNCNN_BUILD_BENCHMARK=OFF -DNCNN_SHARED_LIB=ON ..
cmake --build . -j 2
cmake --build . --target install/strip
Expand Down
Loading

0 comments on commit 1e88fb8

Please sign in to comment.