mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 12:20:52 +01: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:
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,
|
enabled=True,
|
||||||
trigger_action_only=True,
|
trigger_action_only=True,
|
||||||
labels=set(['ciflow/slow']),
|
labels=set(['ciflow/slow']),
|
||||||
)
|
),
|
||||||
),
|
),
|
||||||
CIWorkflow(
|
CIWorkflow(
|
||||||
arch="linux",
|
arch="linux",
|
||||||
|
|
@ -401,6 +401,12 @@ BAZEL_WORKFLOWS = [
|
||||||
build_environment="linux-xenial-py3.6-gcc7-bazel-test",
|
build_environment="linux-xenial-py3.6-gcc7-bazel-test",
|
||||||
docker_image_base=f"{DOCKER_REGISTRY}/pytorch/pytorch-linux-xenial-py3.6-gcc7",
|
docker_image_base=f"{DOCKER_REGISTRY}/pytorch/pytorch-linux-xenial-py3.6-gcc7",
|
||||||
test_runner_type=LINUX_CPU_TEST_RUNNER,
|
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
|
# Generation script: .github/scripts/generate_ci_workflows.py
|
||||||
name: !{{ build_environment }}
|
name: !{{ build_environment }}
|
||||||
{%- endblock %}
|
{%- 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 +%}
|
{% block build +%}
|
||||||
# building and testing in a single job since bazel runs only small subset of tests
|
# building and testing in a single job since bazel runs only small subset of tests
|
||||||
build-and-test:
|
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 %}
|
{%- endblock %}
|
||||||
|
|
||||||
on:
|
on:
|
||||||
# TODO: Enable pull_request builds when we can verify capacity can be met by auto-scalers
|
|
||||||
{%- if on_pull_request %}
|
{%- if on_pull_request %}
|
||||||
pull_request:
|
pull_request:
|
||||||
{%- if ciflow_config.enabled %}
|
{%- if ciflow_config.enabled %}
|
||||||
|
|
@ -20,6 +19,8 @@ on:
|
||||||
types: [opened, synchronize, reopened, !{{ ciflow_config.trigger_action }}]
|
types: [opened, synchronize, reopened, !{{ ciflow_config.trigger_action }}]
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
{%- else %}
|
||||||
|
# TODO: Enable pull_request builds when we can verify capacity can be met by auto-scalers
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|
||||||
{%- if is_scheduled %}
|
{%- 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
|
name: linux-bionic-py3.8-gcc9-coverage
|
||||||
|
|
||||||
on:
|
on:
|
||||||
# TODO: Enable pull_request builds when we can verify capacity can be met by auto-scalers
|
|
||||||
pull_request:
|
pull_request:
|
||||||
types: [opened, synchronize, reopened, unassigned]
|
types: [opened, synchronize, reopened, unassigned]
|
||||||
push:
|
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
|
name: linux-xenial-cuda10.2-cudnn7-py3.6-gcc7
|
||||||
|
|
||||||
on:
|
on:
|
||||||
# TODO: Enable pull_request builds when we can verify capacity can be met by auto-scalers
|
|
||||||
pull_request:
|
pull_request:
|
||||||
types: [unassigned]
|
types: [unassigned]
|
||||||
push:
|
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
|
name: linux-xenial-py3.6-gcc5.4
|
||||||
|
|
||||||
on:
|
on:
|
||||||
# TODO: Enable pull_request builds when we can verify capacity can be met by auto-scalers
|
|
||||||
pull_request:
|
pull_request:
|
||||||
push:
|
push:
|
||||||
branches:
|
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
|
name: linux-xenial-py3.6-gcc7-bazel-test
|
||||||
|
|
||||||
on:
|
on:
|
||||||
# TODO: Enable pull_request builds when we can verify capacity can be met by auto-scalers
|
pull_request:
|
||||||
|
types: [unassigned]
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
|
|
@ -28,9 +29,16 @@ concurrency:
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
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:
|
calculate-docker-image:
|
||||||
if: ${{ github.repository_owner == 'pytorch' }}
|
if: ${{ github.repository_owner == 'pytorch' }}
|
||||||
runs-on: linux.2xlarge
|
runs-on: linux.2xlarge
|
||||||
|
needs: [ciflow_should_run]
|
||||||
env:
|
env:
|
||||||
DOCKER_BUILDKIT: 1
|
DOCKER_BUILDKIT: 1
|
||||||
timeout-minutes: 90
|
timeout-minutes: 90
|
||||||
|
|
@ -104,7 +112,7 @@ jobs:
|
||||||
# building and testing in a single job since bazel runs only small subset of tests
|
# building and testing in a single job since bazel runs only small subset of tests
|
||||||
build-and-test:
|
build-and-test:
|
||||||
runs-on: linux.2xlarge
|
runs-on: linux.2xlarge
|
||||||
needs: [calculate-docker-image, ]
|
needs: [calculate-docker-image, ciflow_should_run]
|
||||||
env:
|
env:
|
||||||
DOCKER_IMAGE: ${{ needs.calculate-docker-image.outputs.docker_image }}
|
DOCKER_IMAGE: ${{ needs.calculate-docker-image.outputs.docker_image }}
|
||||||
JOB_BASE_NAME: linux-xenial-py3.6-gcc7-bazel-test-build-and-test
|
JOB_BASE_NAME: linux-xenial-py3.6-gcc7-bazel-test-build-and-test
|
||||||
|
|
@ -249,7 +257,7 @@ jobs:
|
||||||
# doesn't create the best experience
|
# doesn't create the best experience
|
||||||
render_test_results:
|
render_test_results:
|
||||||
if: always()
|
if: always()
|
||||||
needs: [build-and-test, ]
|
needs: [build-and-test, ciflow_should_run]
|
||||||
runs-on: linux.2xlarge
|
runs-on: linux.2xlarge
|
||||||
steps:
|
steps:
|
||||||
- name: Log in to ECR
|
- name: Log in to ECR
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@
|
||||||
name: periodic-libtorch-linux-xenial-cuda11.3-cudnn8-py3.6-gcc7
|
name: periodic-libtorch-linux-xenial-cuda11.3-cudnn8-py3.6-gcc7
|
||||||
|
|
||||||
on:
|
on:
|
||||||
# TODO: Enable pull_request builds when we can verify capacity can be met by auto-scalers
|
|
||||||
pull_request:
|
pull_request:
|
||||||
types: [unassigned]
|
types: [unassigned]
|
||||||
schedule:
|
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
|
name: periodic-linux-xenial-cuda11.3-cudnn8-py3.6-gcc7
|
||||||
|
|
||||||
on:
|
on:
|
||||||
# TODO: Enable pull_request builds when we can verify capacity can be met by auto-scalers
|
|
||||||
pull_request:
|
pull_request:
|
||||||
types: [unassigned]
|
types: [unassigned]
|
||||||
schedule:
|
schedule:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user