VERSION Do an alpha release before we commit to the 3.1.9 final release #16
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: Build PyOpenGL-accelerate wheels with manylinux | |
on: | |
push: | |
branches: | |
- "master" | |
jobs: | |
tarballs: | |
name: Build source tarballs and root wheels | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.x" | |
- name: Install build | |
run: >- | |
python3 -m | |
pip install | |
build | |
--user | |
- name: Build a binary wheel and a source tarball for root | |
run: >- | |
python3 -m | |
build | |
--sdist | |
--wheel | |
--outdir dist/ | |
. | |
- name: Build a source tarball for accelerate | |
run: >- | |
python3 -m | |
build | |
--sdist | |
--outdir accelerate/dist | |
accelerate | |
- name: Save Core Distributions | |
uses: actions/upload-artifact@v4 | |
with: | |
name: core | |
path: dist/* | |
- name: Save Accelerate Distributions | |
uses: actions/upload-artifact@v4 | |
with: | |
name: accel | |
path: accelerate/dist/* | |
wheels: | |
name: Build architecture-specific wheels on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: | |
- ubuntu-latest | |
- windows-latest | |
- macOS-latest | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
- name: Install Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.x | |
- name: Set up QEMU | |
if: runner.os == 'Linux' | |
uses: docker/setup-qemu-action@v2 | |
with: | |
platforms: all | |
- name: Build wheels (develop) | |
uses: pypa/[email protected] | |
if: ${{ github.ref == 'refs/heads/develop' }} | |
with: | |
package-dir: "./accelerate" | |
output-dir: "./accelerate/dist" | |
env: | |
BUILD_EXTENSION: yes | |
CIBW_SKIP: "pp*" | |
- name: Build wheels (master) | |
uses: pypa/[email protected] | |
if: ${{ github.ref == 'refs/heads/master' }} | |
with: | |
package-dir: "./accelerate" | |
output-dir: "./accelerate/dist" | |
env: | |
BUILD_EXTENSION: yes | |
CIBW_SKIP: "pp*" | |
- name: Save wheels | |
uses: actions/upload-artifact@v4 | |
with: | |
name: accel-binary | |
path: accelerate/dist/*.whl | |
pypi-publish-accel: | |
name: Upload Accelerate ${{matrix.repo}} | |
runs-on: ubuntu-latest | |
if: ${{ github.ref == 'refs/heads/master' }} | |
needs: | |
- wheels | |
- tarballs | |
# TODO: should be choosing the repo URL based on master/develop | |
permissions: | |
# IMPORTANT: this permission is mandatory for trusted publishing | |
id-token: write | |
steps: | |
- name: Download Accelerate | |
uses: actions/[email protected] | |
id: download-accelerate | |
with: | |
name: accel | |
path: dist | |
- name: Download Accelerate Binary | |
uses: actions/[email protected] | |
id: download-accelerate-bin | |
with: | |
name: accel-binary | |
path: dist | |
# retrieve your distributions here | |
- name: Publish package distributions to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
username: __token__ | |
password: ${{ secrets.PYPI_TOKEN }} | |
# Note: this is apparently different than the package-dir meaning in the cibuildwheel | |
packages-dir: "dist" | |
pypi-publish-core: | |
name: Upload Core to ${{matrix.repo}} | |
runs-on: ubuntu-latest | |
if: ${{ github.ref == 'refs/heads/master' }} | |
needs: | |
- wheels | |
- tarballs | |
# TODO: should be choosing the repo URL based on master/develop | |
permissions: | |
# IMPORTANT: this permission is mandatory for trusted publishing | |
id-token: write | |
steps: | |
- name: Download Core | |
uses: actions/[email protected] | |
id: download | |
with: | |
name: core | |
path: dist | |
- name: Publish package distributions to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
id: upload | |
with: | |
username: __token__ | |
password: ${{ secrets.PYPI_TOKEN }} | |
# Note: this is apparently different than the package-dir meaning in the cibuildwheel | |
packages-dir: "dist" |