Skip to content

adding fallback to setup.py #297

adding fallback to setup.py

adding fallback to setup.py #297

Workflow file for this run

name: Build
on:
pull_request:
branches:
- main
push:
branches:
- main
tags:
- 'v*'
jobs:
build-wheels:
name: Build Wheels
uses: charliebudd/torch-extension-builder/.github/workflows/build-pytorch-extension-wheels.yml@main
with:
build-command: "git config --global --add safe.directory ${GITHUB_WORKSPACE} && python setup.py bdist_wheel"
test-wheels-locally:
name: Test Wheels Locally
needs: build-wheels
uses: ./.github/workflows/test.yml
with:
local-wheels: true
update-perfromance-stats:
if: ${{ github.base_ref == 'main' }}
name: Update Performance Stats
needs: test-wheels-locally
uses: ./.github/workflows/update-perf-stats.yml
publish-wheels-to-testpypi:
if: startsWith(github.ref, 'refs/tags/v')
name: Publish Wheels To TestPyPI
runs-on: ubuntu-latest
needs: test-wheels-locally
steps:
- name: Download Cached Wheels
uses: actions/download-artifact@v3
with:
name: final-wheels
path: dist
- name: Checkout repo
uses: actions/checkout@v3
- name: Make Source Distribution
run: python setup.py sdist
- name: Publish Package to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
test-testpypi-release:
if: startsWith(github.ref, 'refs/tags/v')
name: Test TestPyPi Release
needs: publish-wheels-to-testpypi
uses: ./.github/workflows/test.yml
with:
local-wheels: false
wheel-location: https://test.pypi.org/simple/
publish-wheels-to-pypi:
if: startsWith(github.ref, 'refs/tags/v')
name: Publish Wheels To PyPI
runs-on: ubuntu-latest
needs: test-testpypi-release
steps:
- name: Download Cached Wheels
uses: actions/download-artifact@v3
with:
name: final-wheels
path: dist
- name: Checkout repo
uses: actions/checkout@v3
- name: Make Source Distribution
run: python setup.py sdist
- name: Publish Package to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
test-pypi-release:
if: startsWith(github.ref, 'refs/tags/v')
name: Test PyPi Release
needs: publish-wheels-to-pypi
uses: ./.github/workflows/test.yml
with:
local-wheels: false
wheel-location: https://pypi.org/simple/