Skip to content

Update wheels.yml

Update wheels.yml #251

Workflow file for this run

name: wheels
on:
pull_request:
branches:
- main
# paths:
# - ".github/workflows/wheel*"
# - "setup.py"
# - "requirements*.txt"
push:
branches:
- main
tags:
- "v[0-9]+*"
workflow_dispatch:
jobs:
build:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-20.04
- windows-2019
# - 8-core-ubuntu
# - windows-8-core
python:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
torch_version:
- "2.2.0"
cuda_short_version:
- "118"
- "121"
uses: ./.github/workflows/wheels_build.yml
if: github.repository == 'chengzeyi/stable-fast' || github.event_name == 'pull_request'
with:
os: ${{ matrix.os }}
python: ${{ matrix.python }}
torch_version: ${{ matrix.torch_version }}
cuda_short_version: ${{ matrix.cuda_short_version }}
# publish to GitHub Release
gh_release:
name: gh_release
needs: build
runs-on: ubuntu-20.04
timeout-minutes: 360
defaults:
run:
shell: bash
steps:
- uses: actions/download-artifact@v3
with:
path: dist
- run: ls -R dist/
# create night release if it's a push to main
- if: github.repository == 'chengzeyi/stable-fast' && github.event_name == 'push' && github.ref == 'refs/heads/main'
name: Nightly Release
uses: andelf/nightly-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: nightly
name: 'stable-fast Nightly Release $$'
prerelease: true
body: 'TODO: Add nightly release notes'
files: |
dist/*/*.whl
# create release if it's a tag like vx.y.z
- if: github.repository == 'chengzeyi/stable-fast' && github.ref_type == 'tag' && startsWith(github.ref, 'refs/tags/v')
name: Release
uses: softprops/action-gh-release@v1
with :
files: |
dist/*/*.whl
# upload_pip:
# needs: build
# uses: ./.github/workflows/wheels_upload_pip.yml
# with:
# twine_username: __token__
# filter: "*torch2.1.0+cu121*"
# execute: ${{ github.repository == 'chengzeyi/stable-fast' && github.event_name != 'pull_request' }}
# secrets:
# twine_password: ${{ secrets.PYPI_TOKEN }}
# upload_pt_cu118:
# needs: build
# uses: ./.github/workflows/wheels_upload_s3.yml
# with:
# aws_role: "arn:aws:iam::749337293305:role/pytorch_bot_uploader_role"
# s3_path: s3://pytorch/whl/cu118/
# aws_s3_cp_extra_args: --acl public-read
# filter: "*torch2.1.0+cu118*"
# execute: ${{ github.repository == 'chengzeyi/stable-fast' && github.ref_type == 'tag' }}
# upload_pt_cu121:
# needs: build
# uses: ./.github/workflows/wheels_upload_s3.yml
# with:
# aws_role: "arn:aws:iam::749337293305:role/pytorch_bot_uploader_role"
# s3_path: s3://pytorch/whl/cu121/
# aws_s3_cp_extra_args: --acl public-read
# filter: "*torch2.1.0+cu121*"
# execute: ${{ github.repository == 'chengzeyi/stable-fast' && github.ref_type == 'tag' }}