2023-04-10 01:29:32 -04:00
|
|
|
name: Build Release
|
2023-04-07 03:14:38 -04:00
|
|
|
|
2023-04-08 03:11:25 -04:00
|
|
|
on: workflow_dispatch
|
2023-04-07 03:14:38 -04:00
|
|
|
|
2023-04-10 02:35:00 -04:00
|
|
|
permissions:
|
|
|
|
contents: write
|
|
|
|
|
2023-04-07 03:14:38 -04:00
|
|
|
jobs:
|
|
|
|
build_wheels:
|
|
|
|
name: Build wheels on ${{ matrix.os }}
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2024-04-03 15:32:13 -04:00
|
|
|
os: [ubuntu-20.04, windows-2019, macos-11]
|
2023-04-07 03:14:38 -04:00
|
|
|
|
|
|
|
steps:
|
2024-04-30 04:52:23 +02:00
|
|
|
- uses: actions/checkout@v4
|
2023-04-07 03:19:07 -04:00
|
|
|
with:
|
2024-02-13 23:53:56 -05:00
|
|
|
submodules: "recursive"
|
2023-04-07 03:14:38 -04:00
|
|
|
|
|
|
|
# Used to host cibuildwheel
|
2024-04-30 04:52:23 +02:00
|
|
|
- uses: actions/setup-python@v5
|
2023-11-06 08:56:41 -05:00
|
|
|
with:
|
|
|
|
python-version: "3.8"
|
2023-04-07 03:14:38 -04:00
|
|
|
|
2023-04-07 03:18:56 -04:00
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
2023-07-18 18:52:29 -04:00
|
|
|
python -m pip install --upgrade pip
|
2023-11-10 05:54:23 -05:00
|
|
|
python -m pip install -e .[all]
|
2023-04-07 03:18:56 -04:00
|
|
|
|
2023-04-07 03:14:38 -04:00
|
|
|
- name: Build wheels
|
2024-05-14 09:35:52 -04:00
|
|
|
uses: pypa/cibuildwheel@v2.18.0
|
2023-11-10 06:05:42 -05:00
|
|
|
env:
|
|
|
|
# disable repair
|
|
|
|
CIBW_REPAIR_WHEEL_COMMAND: ""
|
2024-04-03 15:32:13 -04:00
|
|
|
with:
|
|
|
|
package-dir: .
|
|
|
|
output-dir: wheelhouse
|
2023-04-07 03:14:38 -04:00
|
|
|
|
2024-04-29 22:53:42 -04:00
|
|
|
- uses: actions/upload-artifact@v4
|
2023-04-07 03:14:38 -04:00
|
|
|
with:
|
2024-04-30 15:16:14 +02:00
|
|
|
name: wheels-${{ matrix.os }}
|
2023-04-07 03:14:38 -04:00
|
|
|
path: ./wheelhouse/*.whl
|
2023-04-10 01:29:32 -04:00
|
|
|
|
2024-04-30 02:58:55 -04:00
|
|
|
build_wheels_arm64:
|
2024-04-23 02:48:09 -04:00
|
|
|
name: Build arm64 wheels
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
with:
|
|
|
|
submodules: "recursive"
|
|
|
|
|
|
|
|
- name: Set up QEMU
|
|
|
|
uses: docker/setup-qemu-action@v3
|
|
|
|
with:
|
|
|
|
platforms: linux/arm64
|
|
|
|
|
|
|
|
- name: Build wheels
|
2024-05-14 09:35:52 -04:00
|
|
|
uses: pypa/cibuildwheel@v2.18.0
|
2024-04-23 02:48:09 -04:00
|
|
|
env:
|
|
|
|
CIBW_SKIP: "*musllinux* pp*"
|
|
|
|
CIBW_REPAIR_WHEEL_COMMAND: ""
|
|
|
|
CIBW_ARCHS: "aarch64"
|
|
|
|
CIBW_BUILD: "cp38-* cp39-* cp310-* cp311-* cp312-*"
|
|
|
|
with:
|
2024-04-30 04:52:23 +02:00
|
|
|
output-dir: wheelhouse
|
2024-04-23 02:48:09 -04:00
|
|
|
|
|
|
|
- name: Upload wheels as artifacts
|
2024-04-29 22:53:42 -04:00
|
|
|
uses: actions/upload-artifact@v4
|
2024-04-23 02:48:09 -04:00
|
|
|
with:
|
2024-04-30 02:58:55 -04:00
|
|
|
name: wheels_arm64
|
2024-04-30 04:52:23 +02:00
|
|
|
path: ./wheelhouse/*.whl
|
2024-04-23 02:48:09 -04:00
|
|
|
|
2023-04-10 01:29:32 -04:00
|
|
|
build_sdist:
|
|
|
|
name: Build source distribution
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
2024-04-30 04:52:23 +02:00
|
|
|
- uses: actions/checkout@v4
|
2023-04-10 01:29:32 -04:00
|
|
|
with:
|
2024-02-13 23:53:56 -05:00
|
|
|
submodules: "recursive"
|
2024-04-30 04:52:23 +02:00
|
|
|
- uses: actions/setup-python@v5
|
2023-11-06 08:56:41 -05:00
|
|
|
with:
|
|
|
|
python-version: "3.8"
|
2023-04-10 01:29:32 -04:00
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
2023-07-18 18:52:29 -04:00
|
|
|
python -m pip install --upgrade pip build
|
|
|
|
python -m pip install -e .[all]
|
2023-04-10 01:29:32 -04:00
|
|
|
- name: Build source distribution
|
|
|
|
run: |
|
2023-07-18 18:52:29 -04:00
|
|
|
python -m build --sdist
|
2024-04-29 22:53:42 -04:00
|
|
|
- uses: actions/upload-artifact@v4
|
2023-04-10 01:29:32 -04:00
|
|
|
with:
|
2024-04-30 02:58:55 -04:00
|
|
|
name: sdist
|
2023-04-10 01:54:52 -04:00
|
|
|
path: ./dist/*.tar.gz
|
|
|
|
|
|
|
|
release:
|
|
|
|
name: Release
|
2024-04-30 02:58:55 -04:00
|
|
|
needs: [build_wheels, build_wheels_arm64, build_sdist]
|
2023-04-10 01:54:52 -04:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
2024-04-30 15:16:14 +02:00
|
|
|
- uses: actions/download-artifact@v4
|
2024-04-30 02:58:55 -04:00
|
|
|
with:
|
2024-04-30 15:16:14 +02:00
|
|
|
merge-multiple: true
|
2023-04-10 01:54:52 -04:00
|
|
|
path: dist
|
2024-04-30 02:58:55 -04:00
|
|
|
|
2024-04-30 04:52:23 +02:00
|
|
|
- uses: softprops/action-gh-release@v2
|
2023-04-10 01:54:52 -04:00
|
|
|
with:
|
|
|
|
files: dist/*
|
|
|
|
env:
|
2024-04-30 04:52:23 +02:00
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|