Restore versions #45
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Wheels Deploy | |
on: push | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
build-wheels: | |
name: Build ${{matrix.python}} Wheels On ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
continue-on-error: false | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- { os: macos-latest, python: 310, platform_id: macosx_universal2, cibw_archs: universal2 } | |
- { os: macos-latest, python: 311, platform_id: macosx_universal2, cibw_archs: universal2 } | |
- { os: macos-latest, python: 312, platform_id: macosx_universal2, cibw_archs: universal2 } | |
- { os: windows-latest, python: 310, platform_id: win_amd64, cibw_archs: AMD64 } | |
- { os: windows-latest, python: 311, platform_id: win_amd64, cibw_archs: AMD64 } | |
- { os: windows-latest, python: 312, platform_id: win_amd64, cibw_archs: AMD64 } | |
- { os: windows-latest, python: 310, platform_id: win_arm64, cibw_archs: ARM64 } | |
- { os: windows-latest, python: 311, platform_id: win_arm64, cibw_archs: ARM64 } | |
- { os: windows-latest, python: 312, platform_id: win_arm64, cibw_archs: ARM64 } | |
- { os: ubuntu-latest, python: 310, platform_id: manylinux_x86_64, cibw_archs: x86_64 } | |
- { os: ubuntu-latest, python: 311, platform_id: manylinux_x86_64, cibw_archs: x86_64 } | |
- { os: ubuntu-latest, python: 312, platform_id: manylinux_x86_64, cibw_archs: x86_64 } | |
- { os: ubuntu-latest, python: 310, platform_id: manylinux_aarch64, cibw_archs: aarch64 } | |
- { os: ubuntu-latest, python: 311, platform_id: manylinux_aarch64, cibw_archs: aarch64 } | |
- { os: ubuntu-latest, python: 312, platform_id: manylinux_aarch64, cibw_archs: aarch64 } | |
steps: | |
- name: Checkout the repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Set up QEMU | |
if: matrix.cibw_archs == 'aarch64' | |
uses: docker/setup-qemu-action@v2 | |
with: | |
platforms: arm64 | |
- name: Setup and install python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
- name: Build wheels | |
uses: pypa/[email protected] | |
env: | |
CIBW_ARCHS: ${{matrix.cibw_archs}} | |
CIBW_BUILD: cp${{ matrix.python }}-${{ matrix.platform_id }} | |
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014 | |
CIBW_MANYLINUX_I686_IMAGE: manylinux2014 | |
CIBW_BEFORE_BUILD_LINUX: | | |
yum install -y zlib-devel openssl-devel freetype-devel freeglut-devel alsa-lib-devel mesa-libGL-devel xorg-x11-proto-devel \ | |
xorg-x11-proto-devel libcurl-devel libpng-devel libX11-devel libXcursor-devel libXrandr-devel libXinerama-devel \ | |
libXrender-devel libXcomposite-devel libXinerama-devel libXcursor-devel | |
#CIBW_REPAIR_WHEEL_COMMAND_LINUX: | | |
# pip install auditwheel-symbols && (auditwheel repair -w {dest_dir} {wheel} || auditwheel-symbols --manylinux 2014 {wheel}) | |
CIBW_TEST_SKIP: "*-manylinux_aarch64 *-macosx_universal2:arm64 *-win_arm64" | |
CIBW_BUILD_VERBOSITY: 3 | |
- name: Upload all the dists | |
uses: actions/upload-artifact@v3 | |
with: | |
name: python-package-distributions | |
path: ./wheelhouse/*.whl | |
upload-test-pypi: | |
name: Publish Wheels To Test PyPI | |
needs: [build-wheels] | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
#if: startsWith(github.ref, 'refs/tags') | |
steps: | |
- name: Download all the dists | |
uses: actions/download-artifact@v3 | |
with: | |
name: python-package-distributions | |
path: dist/ | |
merge-multiple: true | |
- name: Publish distribution to Test PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
repository-url: https://test.pypi.org/legacy/ | |
upload-pypi: | |
name: Publish Wheels To PyPI | |
needs: [upload-test-pypi] | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
if: startsWith(github.ref, 'refs/tags') | |
steps: | |
- name: Download all the dists | |
uses: actions/download-artifact@v3 | |
with: | |
name: python-package-distributions | |
path: dist/ | |
merge-multiple: true | |
- name: Publish distribution to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
github-release: | |
name: Sign And Upload Github Release | |
needs: [upload-pypi] | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
id-token: write | |
if: startsWith(github.ref, 'refs/tags') | |
steps: | |
- name: Download all the dists | |
uses: actions/download-artifact@v3 | |
with: | |
name: python-package-distributions | |
path: dist/ | |
merge-multiple: true | |
- name: Sign the dists with Sigstore | |
uses: sigstore/[email protected] | |
with: | |
inputs: ./dist/*.whl | |
- name: Create GitHub Release | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
run: gh release create '${{ github.ref_name }}' --repo '${{ github.repository }}' --notes "" | |
- name: Upload artifact signatures to GitHub Release | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
run: gh release upload '${{ github.ref_name }}' dist/** --repo '${{ github.repository }}' |