mirror of
https://github.com/Tencent/ncnn.git
synced 2026-10-24 01:29:31 +08:00
b17c9eb84f
Bumps [pypa/cibuildwheel](https://github.com/pypa/cibuildwheel) from 2.11.1 to 2.11.2. - [Release notes](https://github.com/pypa/cibuildwheel/releases) - [Changelog](https://github.com/pypa/cibuildwheel/blob/main/docs/changelog.md) - [Commits](https://github.com/pypa/cibuildwheel/compare/v2.11.1...v2.11.2) --- updated-dependencies: - dependency-name: pypa/cibuildwheel dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
145 lines
3.0 KiB
YAML
145 lines
3.0 KiB
YAML
name: release-python
|
|
on:
|
|
push:
|
|
tags:
|
|
- '*'
|
|
|
|
jobs:
|
|
build_sdist:
|
|
name: Build SDist
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
submodules: true
|
|
|
|
- uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '3.x'
|
|
|
|
- name: Install deps
|
|
run: python -m pip install twine build
|
|
|
|
- name: Build SDist
|
|
run: python -m build -s
|
|
|
|
- name: Check metadata
|
|
run: twine check dist/*
|
|
|
|
- uses: actions/upload-artifact@v3
|
|
with:
|
|
path: dist/*.tar.gz
|
|
|
|
build_wheels:
|
|
name: Build wheels on ${{ matrix.os }}
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ubuntu-20.04, windows-2019, macos-11]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
submodules: true
|
|
|
|
- uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '3.x'
|
|
|
|
- name: brew uninstall libomp
|
|
if: matrix.os == 'macos-11'
|
|
run: |
|
|
brew uninstall --ignore-dependencies libomp
|
|
|
|
- name: Build wheels
|
|
uses: pypa/cibuildwheel@v2.11.2
|
|
env:
|
|
CIBW_ARCHS_MACOS: x86_64 universal2 arm64
|
|
CIBW_ARCHS_LINUX: x86_64 i686
|
|
|
|
- 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@v3
|
|
with:
|
|
path: wheelhouse/*.whl
|
|
|
|
build_wheels_qemu:
|
|
name: Build wheels ${{ matrix.arch }} ${{ matrix.build }}
|
|
runs-on: ubuntu-20.04
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
arch: [aarch64, ppc64le, s390x]
|
|
build: ["cp36-*", "cp37-*", "cp38-*", "cp39-*", "cp310-*"]
|
|
include:
|
|
- arch: aarch64
|
|
build: "pp37-*"
|
|
- arch: aarch64
|
|
build: "pp38-*"
|
|
- arch: aarch64
|
|
build: "pp39-*"
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
submodules: true
|
|
|
|
- uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '3.x'
|
|
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v2
|
|
with:
|
|
platforms: all
|
|
|
|
- name: Build wheels
|
|
uses: pypa/cibuildwheel@v2.11.2
|
|
env:
|
|
CIBW_ARCHS_LINUX: ${{ matrix.arch }}
|
|
CIBW_BUILD: ${{ matrix.build }}
|
|
|
|
- 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@v3
|
|
with:
|
|
path: wheelhouse/*.whl
|
|
|
|
upload_all:
|
|
permissions:
|
|
contents: none
|
|
name: Upload
|
|
needs: [build_wheels, build_wheels_qemu, build_sdist]
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '3.x'
|
|
|
|
- uses: actions/download-artifact@v3
|
|
with:
|
|
name: artifact
|
|
path: dist
|
|
|
|
- uses: pypa/gh-action-pypi-publish@v1.5.1
|
|
with:
|
|
user: __token__
|
|
password: ${{ secrets.PYPI_API_TOKEN }}
|