mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 12:54:11 +08:00
Enable bazel builds on ciflow/default
(#62649)
Summary: Add `regenerate.sh` convenience script Remove "TODO: Reenable on PR" label from workflows which are enabled on PRs Pull Request resolved: https://github.com/pytorch/pytorch/pull/62649 Reviewed By: seemethere Differential Revision: D30071905 Pulled By: malfet fbshipit-source-id: c82134cb676b273d23e225be21166588996a31d3
This commit is contained in:
committed by
Facebook GitHub Bot
parent
4d5607bb25
commit
d6048ecd6b
6
.github/regenerate.sh
vendored
Executable file
6
.github/regenerate.sh
vendored
Executable file
@ -0,0 +1,6 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
# Allows this script to be invoked from any directory:
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
python3 scripts/generate_ci_workflows.py
|
8
.github/scripts/generate_ci_workflows.py
vendored
8
.github/scripts/generate_ci_workflows.py
vendored
@ -269,7 +269,7 @@ LINUX_WORKFLOWS = [
|
||||
enabled=True,
|
||||
trigger_action_only=True,
|
||||
labels=set(['ciflow/slow']),
|
||||
)
|
||||
),
|
||||
),
|
||||
CIWorkflow(
|
||||
arch="linux",
|
||||
@ -401,6 +401,12 @@ BAZEL_WORKFLOWS = [
|
||||
build_environment="linux-xenial-py3.6-gcc7-bazel-test",
|
||||
docker_image_base=f"{DOCKER_REGISTRY}/pytorch/pytorch-linux-xenial-py3.6-gcc7",
|
||||
test_runner_type=LINUX_CPU_TEST_RUNNER,
|
||||
on_pull_request=True,
|
||||
ciflow_config=CIFlowConfig(
|
||||
enabled=True,
|
||||
trigger_action_only=True,
|
||||
labels=set(['ciflow/default']),
|
||||
),
|
||||
),
|
||||
]
|
||||
|
||||
|
15
.github/templates/bazel_ci_workflow.yml.j2
vendored
15
.github/templates/bazel_ci_workflow.yml.j2
vendored
@ -5,6 +5,21 @@
|
||||
# Generation script: .github/scripts/generate_ci_workflows.py
|
||||
name: !{{ build_environment }}
|
||||
{%- endblock %}
|
||||
|
||||
on:
|
||||
{%- if on_pull_request %}
|
||||
pull_request:
|
||||
{%- if ciflow_config.enabled %}
|
||||
{%- if ciflow_config.trigger_action_only %}
|
||||
types: [!{{ ciflow_config.trigger_action }}]
|
||||
{%- else %}
|
||||
types: [opened, synchronize, reopened, !{{ ciflow_config.trigger_action }}]
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
{%- else %}
|
||||
# TODO: Enable pull_request builds when we can verify capacity can be met by auto-scalers
|
||||
{%- endif %}
|
||||
|
||||
{% block build +%}
|
||||
# building and testing in a single job since bazel runs only small subset of tests
|
||||
build-and-test:
|
||||
|
3
.github/templates/linux_ci_workflow.yml.j2
vendored
3
.github/templates/linux_ci_workflow.yml.j2
vendored
@ -10,7 +10,6 @@ name: !{{ build_environment }}
|
||||
{%- endblock %}
|
||||
|
||||
on:
|
||||
# TODO: Enable pull_request builds when we can verify capacity can be met by auto-scalers
|
||||
{%- if on_pull_request %}
|
||||
pull_request:
|
||||
{%- if ciflow_config.enabled %}
|
||||
@ -20,6 +19,8 @@ on:
|
||||
types: [opened, synchronize, reopened, !{{ ciflow_config.trigger_action }}]
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
{%- else %}
|
||||
# TODO: Enable pull_request builds when we can verify capacity can be met by auto-scalers
|
||||
{%- endif %}
|
||||
|
||||
{%- if is_scheduled %}
|
||||
|
1
.github/workflows/generated-linux-bionic-py3.8-gcc9-coverage.yml
generated
vendored
1
.github/workflows/generated-linux-bionic-py3.8-gcc9-coverage.yml
generated
vendored
@ -4,7 +4,6 @@
|
||||
name: linux-bionic-py3.8-gcc9-coverage
|
||||
|
||||
on:
|
||||
# TODO: Enable pull_request builds when we can verify capacity can be met by auto-scalers
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened, unassigned]
|
||||
push:
|
||||
|
1
.github/workflows/generated-linux-xenial-cuda10.2-cudnn7-py3.6-gcc7.yml
generated
vendored
1
.github/workflows/generated-linux-xenial-cuda10.2-cudnn7-py3.6-gcc7.yml
generated
vendored
@ -4,7 +4,6 @@
|
||||
name: linux-xenial-cuda10.2-cudnn7-py3.6-gcc7
|
||||
|
||||
on:
|
||||
# TODO: Enable pull_request builds when we can verify capacity can be met by auto-scalers
|
||||
pull_request:
|
||||
types: [unassigned]
|
||||
push:
|
||||
|
1
.github/workflows/generated-linux-xenial-py3.6-gcc5.4.yml
generated
vendored
1
.github/workflows/generated-linux-xenial-py3.6-gcc5.4.yml
generated
vendored
@ -4,7 +4,6 @@
|
||||
name: linux-xenial-py3.6-gcc5.4
|
||||
|
||||
on:
|
||||
# TODO: Enable pull_request builds when we can verify capacity can be met by auto-scalers
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
|
14
.github/workflows/generated-linux-xenial-py3.6-gcc7-bazel-test.yml
generated
vendored
14
.github/workflows/generated-linux-xenial-py3.6-gcc7-bazel-test.yml
generated
vendored
@ -4,7 +4,8 @@
|
||||
name: linux-xenial-py3.6-gcc7-bazel-test
|
||||
|
||||
on:
|
||||
# TODO: Enable pull_request builds when we can verify capacity can be met by auto-scalers
|
||||
pull_request:
|
||||
types: [unassigned]
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
@ -28,9 +29,16 @@ concurrency:
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
ciflow_should_run:
|
||||
runs-on: ubuntu-18.04
|
||||
if: ${{ (github.event_name != 'pull_request') || (github.event.action !='unassigned') || (github.event.action == 'unassigned' && contains(github.event.pull_request.labels.*.name, 'ciflow/default')) }}
|
||||
steps:
|
||||
- name: noop
|
||||
run: echo running ciflow_should_run
|
||||
calculate-docker-image:
|
||||
if: ${{ github.repository_owner == 'pytorch' }}
|
||||
runs-on: linux.2xlarge
|
||||
needs: [ciflow_should_run]
|
||||
env:
|
||||
DOCKER_BUILDKIT: 1
|
||||
timeout-minutes: 90
|
||||
@ -104,7 +112,7 @@ jobs:
|
||||
# building and testing in a single job since bazel runs only small subset of tests
|
||||
build-and-test:
|
||||
runs-on: linux.2xlarge
|
||||
needs: [calculate-docker-image, ]
|
||||
needs: [calculate-docker-image, ciflow_should_run]
|
||||
env:
|
||||
DOCKER_IMAGE: ${{ needs.calculate-docker-image.outputs.docker_image }}
|
||||
JOB_BASE_NAME: linux-xenial-py3.6-gcc7-bazel-test-build-and-test
|
||||
@ -249,7 +257,7 @@ jobs:
|
||||
# doesn't create the best experience
|
||||
render_test_results:
|
||||
if: always()
|
||||
needs: [build-and-test, ]
|
||||
needs: [build-and-test, ciflow_should_run]
|
||||
runs-on: linux.2xlarge
|
||||
steps:
|
||||
- name: Log in to ECR
|
||||
|
@ -4,7 +4,6 @@
|
||||
name: periodic-libtorch-linux-xenial-cuda11.3-cudnn8-py3.6-gcc7
|
||||
|
||||
on:
|
||||
# TODO: Enable pull_request builds when we can verify capacity can be met by auto-scalers
|
||||
pull_request:
|
||||
types: [unassigned]
|
||||
schedule:
|
||||
|
1
.github/workflows/generated-periodic-linux-xenial-cuda11.3-cudnn8-py3.6-gcc7.yml
generated
vendored
1
.github/workflows/generated-periodic-linux-xenial-cuda11.3-cudnn8-py3.6-gcc7.yml
generated
vendored
@ -4,7 +4,6 @@
|
||||
name: periodic-linux-xenial-cuda11.3-cudnn8-py3.6-gcc7
|
||||
|
||||
on:
|
||||
# TODO: Enable pull_request builds when we can verify capacity can be met by auto-scalers
|
||||
pull_request:
|
||||
types: [unassigned]
|
||||
schedule:
|
||||
|
Reference in New Issue
Block a user