Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions .github/workflows/nightly-pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Nightly PyPI Publish
on:
schedule:
- cron: "8 7 * * *" # 07:08 UTC daily
workflow_dispatch: {} # allow manual runs (no publish)

permissions:
contents: read

jobs:
build-and-publish:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # setuptools-scm requires full history/tags

- uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Install build tools
run: |
python -m pip install --upgrade pip
pip install build setuptools-scm

- name: Compute nightly version from latest tag (per-second)
id: ver
run: |
TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo 0.1.0)
BASE=${TAG#v}
DATE=$(date -u +%Y%m%d%H%M%S)
echo "NVER=${BASE}.dev${DATE}" >> $GITHUB_OUTPUT

- name: Build sdist/wheel with forced version
run: |
export SETUPTOOLS_SCM_PRETEND_VERSION=${{ steps.ver.outputs.NVER }}
python -m build

- name: Check metadata
run: |
pip install twine
twine check dist/*

- name: Publish to PyPI (API token)
if: github.event_name == 'schedule'
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
skip-existing: true
16 changes: 13 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,21 +1,27 @@
[build-system]
requires = ["setuptools>=40.8.0", "wheel"]
requires = ["setuptools>=64", "wheel", "setuptools-scm>=8.0.0"]
build-backend = "setuptools.build_meta"

[project]
name = "tritonparse"
version = "0.1.1"
dynamic = ["version"]
dependencies = [
"triton>3.3.1",
]
requires-python = ">=3.10"
description = "TritonParse: A Compiler Tracer, Visualizer, and mini-Reproducer Generator for Triton Kernels"
readme = "README.md"
authors = [
{ name="Yueming Hao", email="yhao@meta.com" },
]
license = { text = "BSD-3-Clause" }


[project.optional-dependencies]
test = [
"coverage>=7.0.0",
]


[tool.setuptools.packages.find]
include = ["tritonparse*"]

Expand All @@ -30,5 +36,9 @@ sorter = "usort"
[tool.usort]
first_party_detection = false

[tool.setuptools_scm]
version_scheme = "guess-next-dev"
local_scheme = "no-local-version"

[project.urls]
"Homepage" = "https://github.com/meta-pytorch/tritonparse"