Skip to content

Commit 9d7f983

Browse files
zklauspytorchmergebot
authored andcommitted
Add workflow regeneration to spin (pytorch#167551)
Pull Request resolved: pytorch#167551 Approved by: https://github.com/Skylion007, https://github.com/albanD, https://github.com/atalman ghstack dependencies: pytorch#167227
1 parent bd883bb commit 9d7f983

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

.spin/cmds.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,3 +328,10 @@ def quicklint(ctx, apply_patches, **kwargs):
328328
def quickfix(ctx, **kwargs):
329329
"""Autofix changed files."""
330330
ctx.invoke(quicklint, apply_patches=True)
331+
332+
333+
@click.command()
334+
def regenerate_github_workflows():
335+
"""Regenerate GitHub workflows from templates."""
336+
cmd = [sys.executable, "scripts/generate_ci_workflows.py"]
337+
spin.util.run(cmd, cwd="./.github")

CONTRIBUTING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,7 @@ With Spin, we offer a unified interface to these tasks.
317317
|`regenerate-version`|regenerate `torch/version.py`|
318318
|`regenerate-type-stubs`|regenerates type stubs for use by static type checkers|
319319
|`regenerate-clangtidy-files`|regenerates clang related files needed for linting|
320+
|`regenerate-github-workflows`|regenerates github workflows from jinja templates|
320321

321322
## Unit testing
322323

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,4 +391,5 @@ package = 'torch'
391391
".spin/cmds.py:regenerate_version",
392392
".spin/cmds.py:regenerate_type_stubs",
393393
".spin/cmds.py:regenerate_clangtidy_files",
394+
".spin/cmds.py:regenerate_github_workflows",
394395
]

0 commit comments

Comments
 (0)