mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-07 12:21:27 +01:00
.github: Set rocm workflows to only run on PRs (#71567)
Summary:
Also adds a mechanism for all workflows to do this
Signed-off-by: Eli Uriegas <eliuriegasfb.com>
cc jeffdaily sunway513 jithunnair-amd ROCmSupport KyleCZH
Pull Request resolved: https://github.com/pytorch/pytorch/pull/71567
Reviewed By: malfet
Differential Revision: D33687713
Pulled By: seemethere
fbshipit-source-id: a3c7ef41ed04f9caa82c180961d2f4b7c24582dd
(cherry picked from commit eef2eafffd)
This commit is contained in:
parent
53b3904115
commit
add774ddbd
2
.github/scripts/generate_ci_workflows.py
vendored
2
.github/scripts/generate_ci_workflows.py
vendored
|
|
@ -198,6 +198,7 @@ class CIWorkflow:
|
|||
fx2trt_test: bool = False
|
||||
timeout_after: int = 240
|
||||
xcode_version: str = ''
|
||||
only_on_pr: bool = False
|
||||
|
||||
# The following variables will be set as environment variables,
|
||||
# so it's easier for both shell and Python scripts to consume it if false is represented as the empty string.
|
||||
|
|
@ -606,6 +607,7 @@ LINUX_WORKFLOWS = [
|
|||
docker_image_base=f"{DOCKER_REGISTRY}/pytorch/pytorch-linux-bionic-rocm4.5-py3.7",
|
||||
test_runner_type=LINUX_ROCM_TEST_RUNNER,
|
||||
num_test_shards=2,
|
||||
only_on_pr=True,
|
||||
ciflow_config=CIFlowConfig(
|
||||
labels=set([LABEL_CIFLOW_LINUX, LABEL_CIFLOW_ROCM]),
|
||||
),
|
||||
|
|
|
|||
2
.github/templates/linux_ci_workflow.yml.j2
vendored
2
.github/templates/linux_ci_workflow.yml.j2
vendored
|
|
@ -13,7 +13,7 @@ on:
|
|||
{%- if is_scheduled %}
|
||||
schedule:
|
||||
- cron: !{{ is_scheduled }}
|
||||
{%- else %}
|
||||
{%- elif not only_on_pr %}
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
|
|
|||
4
.github/workflows/generated-linux-bionic-rocm4.5-py3.7.yml
generated
vendored
4
.github/workflows/generated-linux-bionic-rocm4.5-py3.7.yml
generated
vendored
|
|
@ -6,10 +6,6 @@ name: linux-bionic-rocm4.5-py3.7
|
|||
on:
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened, unassigned]
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- release/*
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user