Files
ncnn/.github/workflows/release-python.yml
T
dependabot[bot] 1634de33df Bump pypa/cibuildwheel from 2.4.0 to 2.5.0 (#3755)
Bumps [pypa/cibuildwheel](https://github.com/pypa/cibuildwheel) from 2.4.0 to 2.5.0.
- [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.4.0...2.5.0)

---
updated-dependencies:
- dependency-name: pypa/cibuildwheel
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-02 11:45:20 +08:00

129 lines
2.6 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@v3
- 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-10.15]
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: actions/setup-python@v3
- name: Build wheels
uses: pypa/cibuildwheel@2.5.0
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-*"
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: actions/setup-python@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
with:
platforms: all
- name: Build wheels
uses: pypa/cibuildwheel@2.5.0
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:
name: Upload
needs: [build_wheels, build_wheels_qemu, build_sdist]
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v3
- uses: actions/download-artifact@v3
with:
name: artifact
path: dist
- uses: pypa/gh-action-pypi-publish@v1.5.0
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}