Skip to content

Commit

Permalink
BUILD Source tarball operations for more-automated releases
Browse files Browse the repository at this point in the history
  • Loading branch information
mcfletch committed May 22, 2023
1 parent 1839b72 commit 782bfaf
Showing 1 changed file with 96 additions and 2 deletions.
98 changes: 96 additions & 2 deletions .github/workflows/accelerate-manylinux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,42 @@ name: Build PyOpenGL-accelerate wheels with manylinux

on:
push:
branches: [develop,master]
branch:
"develop"

jobs:
tarballs:
name: Build source tarballs and root wheels
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
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
--wheel
--outdir accelerate/dist
accelerate
wheels:
name: Build architecture-specific wheels on ${{ matrix.os }}
Expand All @@ -27,8 +60,21 @@ jobs:
uses: docker/setup-qemu-action@v2
with:
platforms: all
- name: Build wheels

- name: Build wheels (develop)
uses: pypa/cibuildwheel@v2.12.3
if: ${{ github.ref == 'refs/heads/develop' }}
with:
package-dir: './accelerate'
output-dir: './accelerate/dist'
env:
BUILD_EXTENSION: yes
CIBW_SKIP: 'pp*'
CIBW_BUILD: 'cp311-manylinux_x86_64'

- name: Build wheels (master)
uses: pypa/cibuildwheel@v2.12.3
if: ${{ github.ref == 'refs/heads/master' }}
with:
package-dir: './accelerate'
output-dir: './accelerate/dist'
Expand All @@ -39,4 +85,52 @@ jobs:
- name: Save wheels
uses: actions/upload-artifact@v3
with:
name: ${{ github.ref }}
path: accelerate/dist/*.whl

# pypi-publish-accel:
# name: Upload Accelerate ${{matrix.repo}}
# runs-on: ubuntu-latest
# # TODO: should be choosing the repo URL based on master/develop
# if: ${{ github.ref == 'refs/heads/develop' }}
# strategy:
# matrix:
# repo:
# - https://test.pypi.org/legacy/
# permissions:
# # IMPORTANT: this permission is mandatory for trusted publishing
# id-token: write
# steps:
# # 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: 'accelerate/dist'
# repository_url: ${{matrix.repo}}

# pypi-publish-core:
# name: Upload OpenGL to ${{matrix.repo}}
# runs-on: ubuntu-latest
# # TODO: should be choosing the repo URL based on master/develop
# if: ${{ github.ref == 'refs/heads/develop' }}
# strategy:
# matrix:
# repo:
# - https://test.pypi.org/legacy/
# permissions:
# # IMPORTANT: this permission is mandatory for trusted publishing
# id-token: write
# steps:
# # 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'
# repository_url: ${{matrix.repo}}

0 comments on commit 782bfaf

Please sign in to comment.