@dataclass
class CIFlowConfig:
enabled: bool = False
+ # For use to enable workflows to run on pytorch/pytorch-canary
+ run_on_canary: bool = False
labels: Set[str] = field(default_factory=set)
trigger_action: str = 'unassigned'
trigger_actor: str = 'pytorchbot'
# REMOVE github.event.action !='{self.trigger_action}'
label_conditions = [
f"contains(github.event.pull_request.labels.*.name, '{label}')" for label in sorted(self.labels)]
- self.root_job_condition = f"(github.event_name != 'pull_request') || " \
+ if self.run_on_canary:
+ self.root_job_condition = "(github.repository_owner == 'pytorch') && "
+ else:
+ self.root_job_condition = "(github.repository == 'pytorch/pytorch') && "
+ self.root_job_condition += f"((github.event_name != 'pull_request') || " \
f"(github.event.action !='{self.trigger_action}') || " \
- f"({' || '.join(label_conditions)})"
+ f"({' || '.join(label_conditions)}))"
def reset_root_job(self) -> None:
self.root_job_name = ''
num_test_shards=2,
ciflow_config=CIFlowConfig(
enabled=True,
+ run_on_canary=True,
labels={LABEL_CIFLOW_DEFAULT, LABEL_CIFLOW_CPU, LABEL_CIFLOW_WIN}
),
),
only_run_smoke_tests_on_pull_request=True,
ciflow_config=CIFlowConfig(
enabled=True,
+ run_on_canary=True,
labels={LABEL_CIFLOW_DEFAULT, LABEL_CIFLOW_CUDA, LABEL_CIFLOW_WIN}
),
),
num_test_shards=2,
ciflow_config=CIFlowConfig(
enabled=True,
+ run_on_canary=True,
labels={LABEL_CIFLOW_DEFAULT, LABEL_CIFLOW_LINUX, LABEL_CIFLOW_CPU}
),
),
on_pull_request=True,
ciflow_config=CIFlowConfig(
enabled=True,
+ run_on_canary=True,
trigger_action_only=True,
labels={LABEL_CIFLOW_SLOW, LABEL_CIFLOW_LINUX, LABEL_CIFLOW_CUDA}
),
DOCKER_IMAGE: ${{ needs.calculate-docker-image.outputs.docker_image }}
JOB_BASE_NAME: !{{ build_environment }}-build-and-test
NUM_TEST_SHARDS: !{{ num_test_shards }}
- CONTINUE_THROUGH_ERROR: ${{ github.repository_owner == 'pytorch' && (github.event_name == 'push' || github.event_name == 'schedule') }}
+ CONTINUE_THROUGH_ERROR: ${{ github.repository == 'pytorch/pytorch' && (github.event_name == 'push' || github.event_name == 'schedule') }}
steps:
!{{ common.setup_ec2_linux() }}
!{{ common.checkout_pytorch("recursive") }}
run: echo "${LABELS}"
{%- endif %}
calculate-docker-image:
- if: ${{ github.repository_owner == 'pytorch' }}
runs-on: linux.2xlarge
{%- if ciflow_config.enabled %}
needs: [!{{ ciflow_config.root_job_name }}]
{%- if not exclude_test %}
{% block test +%}
generate-test-matrix:
- if: ${{ github.repository_owner == 'pytorch' }}
runs-on: ubuntu-18.04
{%- if ciflow_config.enabled %}
needs: [!{{ ciflow_config.root_job_name }}]
SHARD_NUMBER: ${{ matrix.shard }}
NUM_TEST_SHARDS: ${{ matrix.num_shards }}
PYTORCH_IGNORE_DISABLED_ISSUES: ${{ needs.generate-test-matrix.outputs.ignore-disabled-issues }}
- CONTINUE_THROUGH_ERROR: ${{ github.repository_owner == 'pytorch' && (github.event_name == 'push' || github.event_name == 'schedule') }}
+ CONTINUE_THROUGH_ERROR: ${{ github.repository == 'pytorch/pytorch' && (github.event_name == 'push' || github.event_name == 'schedule') }}
steps:
!{{ common.setup_ec2_linux() }}
!{{ common.checkout_pytorch("recursive") }}
run: echo running !{{ ciflow_config.root_job_name }}
{%- endif %}
build:
- if: ${{ github.repository_owner == 'pytorch' }}
runs-on: "windows.4xlarge"
defaults:
run:
rm -rf ./*
generate-test-matrix:
-{%- if only_build_on_pull_request %}
- if: ${{ github.repository_owner == 'pytorch' && github.event_name == 'push' }}
-{%- else %}
- if: ${{ github.repository_owner == 'pytorch' }}
-{%- endif %}
{%- if ciflow_config.enabled %}
needs: [!{{ ciflow_config.root_job_name }}]
{%- endif %}
https_proxy: "!{{ common.squid_proxy }}"
RUN_SMOKE_TESTS_ONLY_ON_PR: !{{ only_run_smoke_tests_on_pull_request }}
PYTORCH_IGNORE_DISABLED_ISSUES: ${{ needs.generate-test-matrix.outputs.ignore-disabled-issues }}
- CONTINUE_THROUGH_ERROR: ${{ github.repository_owner == 'pytorch' && (github.event_name == 'push' || github.event_name == 'schedule') }}
+ CONTINUE_THROUGH_ERROR: ${{ github.repository == 'pytorch/pytorch' && (github.event_name == 'push' || github.event_name == 'schedule') }}
needs: [build, generate-test-matrix, !{{ ciflow_config.root_job_name }}]
strategy:
matrix: ${{ fromJson(needs.generate-test-matrix.outputs.matrix) }}
jobs:
auto-label-rocm:
- if: ${{ github.repository_owner == 'pytorch' }}
+ if: ${{ github.repository == 'pytorch/pytorch' }}
runs-on: ubuntu-18.04
steps:
- name: Retrieve information
jobs:
release:
+ if: ${{ github.repository == 'pytorch/pytorch' }}
name: Create Release
runs-on: ubuntu-latest
steps:
jobs:
ciflow_should_run:
runs-on: ubuntu-18.04
- if: ${{ (github.event_name != 'pull_request') || (github.event.action !='unassigned') || (contains(github.event.pull_request.labels.*.name, 'ciflow/all') || contains(github.event.pull_request.labels.*.name, 'ciflow/cuda') || contains(github.event.pull_request.labels.*.name, 'ciflow/libtorch') || contains(github.event.pull_request.labels.*.name, 'ciflow/linux')) }}
+ if: ${{ (github.repository == 'pytorch/pytorch') && ((github.event_name != 'pull_request') || (github.event.action !='unassigned') || (contains(github.event.pull_request.labels.*.name, 'ciflow/all') || contains(github.event.pull_request.labels.*.name, 'ciflow/cuda') || contains(github.event.pull_request.labels.*.name, 'ciflow/libtorch') || contains(github.event.pull_request.labels.*.name, 'ciflow/linux'))) }}
env:
LABELS: ${{ toJson(github.event.pull_request.labels.*.name) }}
steps:
- name: print labels
run: echo "${LABELS}"
calculate-docker-image:
- if: ${{ github.repository_owner == 'pytorch' }}
runs-on: linux.2xlarge
needs: [ciflow_should_run]
env:
jobs:
ciflow_should_run:
runs-on: ubuntu-18.04
- if: ${{ (github.event_name != 'pull_request') || (github.event.action !='unassigned') || (contains(github.event.pull_request.labels.*.name, 'ciflow/all') || contains(github.event.pull_request.labels.*.name, 'ciflow/cuda') || contains(github.event.pull_request.labels.*.name, 'ciflow/libtorch') || contains(github.event.pull_request.labels.*.name, 'ciflow/linux')) }}
+ if: ${{ (github.repository == 'pytorch/pytorch') && ((github.event_name != 'pull_request') || (github.event.action !='unassigned') || (contains(github.event.pull_request.labels.*.name, 'ciflow/all') || contains(github.event.pull_request.labels.*.name, 'ciflow/cuda') || contains(github.event.pull_request.labels.*.name, 'ciflow/libtorch') || contains(github.event.pull_request.labels.*.name, 'ciflow/linux'))) }}
env:
LABELS: ${{ toJson(github.event.pull_request.labels.*.name) }}
steps:
- name: print labels
run: echo "${LABELS}"
calculate-docker-image:
- if: ${{ github.repository_owner == 'pytorch' }}
runs-on: linux.2xlarge
needs: [ciflow_should_run]
env:
jobs:
ciflow_should_run:
runs-on: ubuntu-18.04
- if: ${{ (github.event_name != 'pull_request') || (github.event.action !='unassigned') || (contains(github.event.pull_request.labels.*.name, 'ciflow/all') || contains(github.event.pull_request.labels.*.name, 'ciflow/cuda') || contains(github.event.pull_request.labels.*.name, 'ciflow/linux') || contains(github.event.pull_request.labels.*.name, 'ciflow/slow')) }}
+ if: ${{ (github.repository_owner == 'pytorch') && ((github.event_name != 'pull_request') || (github.event.action !='unassigned') || (contains(github.event.pull_request.labels.*.name, 'ciflow/all') || contains(github.event.pull_request.labels.*.name, 'ciflow/cuda') || contains(github.event.pull_request.labels.*.name, 'ciflow/linux') || contains(github.event.pull_request.labels.*.name, 'ciflow/slow'))) }}
env:
LABELS: ${{ toJson(github.event.pull_request.labels.*.name) }}
steps:
- name: print labels
run: echo "${LABELS}"
calculate-docker-image:
- if: ${{ github.repository_owner == 'pytorch' }}
runs-on: linux.2xlarge
needs: [ciflow_should_run]
env:
docker system prune -af
generate-test-matrix:
- if: ${{ github.repository_owner == 'pytorch' }}
runs-on: ubuntu-18.04
needs: [ciflow_should_run]
env:
SHARD_NUMBER: ${{ matrix.shard }}
NUM_TEST_SHARDS: ${{ matrix.num_shards }}
PYTORCH_IGNORE_DISABLED_ISSUES: ${{ needs.generate-test-matrix.outputs.ignore-disabled-issues }}
- CONTINUE_THROUGH_ERROR: ${{ github.repository_owner == 'pytorch' && (github.event_name == 'push' || github.event_name == 'schedule') }}
+ CONTINUE_THROUGH_ERROR: ${{ github.repository == 'pytorch/pytorch' && (github.event_name == 'push' || github.event_name == 'schedule') }}
steps:
- name: Display EC2 information
shell: bash
jobs:
ciflow_should_run:
runs-on: ubuntu-18.04
- if: ${{ (github.event_name != 'pull_request') || (github.event.action !='unassigned') || (contains(github.event.pull_request.labels.*.name, 'ciflow/all') || contains(github.event.pull_request.labels.*.name, 'ciflow/cpu') || contains(github.event.pull_request.labels.*.name, 'ciflow/default') || contains(github.event.pull_request.labels.*.name, 'ciflow/linux') || contains(github.event.pull_request.labels.*.name, 'ciflow/noarch') || contains(github.event.pull_request.labels.*.name, 'ciflow/xla')) }}
+ if: ${{ (github.repository == 'pytorch/pytorch') && ((github.event_name != 'pull_request') || (github.event.action !='unassigned') || (contains(github.event.pull_request.labels.*.name, 'ciflow/all') || contains(github.event.pull_request.labels.*.name, 'ciflow/cpu') || contains(github.event.pull_request.labels.*.name, 'ciflow/default') || contains(github.event.pull_request.labels.*.name, 'ciflow/linux') || contains(github.event.pull_request.labels.*.name, 'ciflow/noarch') || contains(github.event.pull_request.labels.*.name, 'ciflow/xla'))) }}
env:
LABELS: ${{ toJson(github.event.pull_request.labels.*.name) }}
steps:
- name: print labels
run: echo "${LABELS}"
calculate-docker-image:
- if: ${{ github.repository_owner == 'pytorch' }}
runs-on: linux.2xlarge
needs: [ciflow_should_run]
env:
docker system prune -af
generate-test-matrix:
- if: ${{ github.repository_owner == 'pytorch' }}
runs-on: ubuntu-18.04
needs: [ciflow_should_run]
env:
SHARD_NUMBER: ${{ matrix.shard }}
NUM_TEST_SHARDS: ${{ matrix.num_shards }}
PYTORCH_IGNORE_DISABLED_ISSUES: ${{ needs.generate-test-matrix.outputs.ignore-disabled-issues }}
- CONTINUE_THROUGH_ERROR: ${{ github.repository_owner == 'pytorch' && (github.event_name == 'push' || github.event_name == 'schedule') }}
+ CONTINUE_THROUGH_ERROR: ${{ github.repository == 'pytorch/pytorch' && (github.event_name == 'push' || github.event_name == 'schedule') }}
steps:
- name: Display EC2 information
shell: bash
jobs:
ciflow_should_run:
runs-on: ubuntu-18.04
- if: ${{ (github.event_name != 'pull_request') || (github.event.action !='unassigned') || (contains(github.event.pull_request.labels.*.name, 'ciflow/all') || contains(github.event.pull_request.labels.*.name, 'ciflow/coverage') || contains(github.event.pull_request.labels.*.name, 'ciflow/cpu') || contains(github.event.pull_request.labels.*.name, 'ciflow/default') || contains(github.event.pull_request.labels.*.name, 'ciflow/linux')) }}
+ if: ${{ (github.repository == 'pytorch/pytorch') && ((github.event_name != 'pull_request') || (github.event.action !='unassigned') || (contains(github.event.pull_request.labels.*.name, 'ciflow/all') || contains(github.event.pull_request.labels.*.name, 'ciflow/coverage') || contains(github.event.pull_request.labels.*.name, 'ciflow/cpu') || contains(github.event.pull_request.labels.*.name, 'ciflow/default') || contains(github.event.pull_request.labels.*.name, 'ciflow/linux'))) }}
env:
LABELS: ${{ toJson(github.event.pull_request.labels.*.name) }}
steps:
- name: print labels
run: echo "${LABELS}"
calculate-docker-image:
- if: ${{ github.repository_owner == 'pytorch' }}
runs-on: linux.2xlarge
needs: [ciflow_should_run]
env:
docker system prune -af
generate-test-matrix:
- if: ${{ github.repository_owner == 'pytorch' }}
runs-on: ubuntu-18.04
needs: [ciflow_should_run]
env:
SHARD_NUMBER: ${{ matrix.shard }}
NUM_TEST_SHARDS: ${{ matrix.num_shards }}
PYTORCH_IGNORE_DISABLED_ISSUES: ${{ needs.generate-test-matrix.outputs.ignore-disabled-issues }}
- CONTINUE_THROUGH_ERROR: ${{ github.repository_owner == 'pytorch' && (github.event_name == 'push' || github.event_name == 'schedule') }}
+ CONTINUE_THROUGH_ERROR: ${{ github.repository == 'pytorch/pytorch' && (github.event_name == 'push' || github.event_name == 'schedule') }}
steps:
- name: Display EC2 information
shell: bash
jobs:
ciflow_should_run:
runs-on: ubuntu-18.04
- if: ${{ (github.event_name != 'pull_request') || (github.event.action !='unassigned') || (contains(github.event.pull_request.labels.*.name, 'ciflow/all') || contains(github.event.pull_request.labels.*.name, 'ciflow/cuda') || contains(github.event.pull_request.labels.*.name, 'ciflow/linux') || contains(github.event.pull_request.labels.*.name, 'ciflow/slow')) }}
+ if: ${{ (github.repository == 'pytorch/pytorch') && ((github.event_name != 'pull_request') || (github.event.action !='unassigned') || (contains(github.event.pull_request.labels.*.name, 'ciflow/all') || contains(github.event.pull_request.labels.*.name, 'ciflow/cuda') || contains(github.event.pull_request.labels.*.name, 'ciflow/linux') || contains(github.event.pull_request.labels.*.name, 'ciflow/slow'))) }}
env:
LABELS: ${{ toJson(github.event.pull_request.labels.*.name) }}
steps:
- name: print labels
run: echo "${LABELS}"
calculate-docker-image:
- if: ${{ github.repository_owner == 'pytorch' }}
runs-on: linux.2xlarge
needs: [ciflow_should_run]
env:
docker system prune -af
generate-test-matrix:
- if: ${{ github.repository_owner == 'pytorch' }}
runs-on: ubuntu-18.04
needs: [ciflow_should_run]
env:
SHARD_NUMBER: ${{ matrix.shard }}
NUM_TEST_SHARDS: ${{ matrix.num_shards }}
PYTORCH_IGNORE_DISABLED_ISSUES: ${{ needs.generate-test-matrix.outputs.ignore-disabled-issues }}
- CONTINUE_THROUGH_ERROR: ${{ github.repository_owner == 'pytorch' && (github.event_name == 'push' || github.event_name == 'schedule') }}
+ CONTINUE_THROUGH_ERROR: ${{ github.repository == 'pytorch/pytorch' && (github.event_name == 'push' || github.event_name == 'schedule') }}
steps:
- name: Display EC2 information
shell: bash
jobs:
ciflow_should_run:
runs-on: ubuntu-18.04
- if: ${{ (github.event_name != 'pull_request') || (github.event.action !='unassigned') || (contains(github.event.pull_request.labels.*.name, 'ciflow/all') || contains(github.event.pull_request.labels.*.name, 'ciflow/cuda') || contains(github.event.pull_request.labels.*.name, 'ciflow/default') || contains(github.event.pull_request.labels.*.name, 'ciflow/linux')) }}
+ if: ${{ (github.repository == 'pytorch/pytorch') && ((github.event_name != 'pull_request') || (github.event.action !='unassigned') || (contains(github.event.pull_request.labels.*.name, 'ciflow/all') || contains(github.event.pull_request.labels.*.name, 'ciflow/cuda') || contains(github.event.pull_request.labels.*.name, 'ciflow/default') || contains(github.event.pull_request.labels.*.name, 'ciflow/linux'))) }}
env:
LABELS: ${{ toJson(github.event.pull_request.labels.*.name) }}
steps:
- name: print labels
run: echo "${LABELS}"
calculate-docker-image:
- if: ${{ github.repository_owner == 'pytorch' }}
runs-on: linux.2xlarge
needs: [ciflow_should_run]
env:
docker system prune -af
generate-test-matrix:
- if: ${{ github.repository_owner == 'pytorch' }}
runs-on: ubuntu-18.04
needs: [ciflow_should_run]
env:
SHARD_NUMBER: ${{ matrix.shard }}
NUM_TEST_SHARDS: ${{ matrix.num_shards }}
PYTORCH_IGNORE_DISABLED_ISSUES: ${{ needs.generate-test-matrix.outputs.ignore-disabled-issues }}
- CONTINUE_THROUGH_ERROR: ${{ github.repository_owner == 'pytorch' && (github.event_name == 'push' || github.event_name == 'schedule') }}
+ CONTINUE_THROUGH_ERROR: ${{ github.repository == 'pytorch/pytorch' && (github.event_name == 'push' || github.event_name == 'schedule') }}
steps:
- name: Display EC2 information
shell: bash
jobs:
ciflow_should_run:
runs-on: ubuntu-18.04
- if: ${{ (github.event_name != 'pull_request') || (github.event.action !='unassigned') || (contains(github.event.pull_request.labels.*.name, 'ciflow/all') || contains(github.event.pull_request.labels.*.name, 'ciflow/cpu') || contains(github.event.pull_request.labels.*.name, 'ciflow/default') || contains(github.event.pull_request.labels.*.name, 'ciflow/linux')) }}
+ if: ${{ (github.repository_owner == 'pytorch') && ((github.event_name != 'pull_request') || (github.event.action !='unassigned') || (contains(github.event.pull_request.labels.*.name, 'ciflow/all') || contains(github.event.pull_request.labels.*.name, 'ciflow/cpu') || contains(github.event.pull_request.labels.*.name, 'ciflow/default') || contains(github.event.pull_request.labels.*.name, 'ciflow/linux'))) }}
env:
LABELS: ${{ toJson(github.event.pull_request.labels.*.name) }}
steps:
- name: print labels
run: echo "${LABELS}"
calculate-docker-image:
- if: ${{ github.repository_owner == 'pytorch' }}
runs-on: linux.2xlarge
needs: [ciflow_should_run]
env:
docker system prune -af
generate-test-matrix:
- if: ${{ github.repository_owner == 'pytorch' }}
runs-on: ubuntu-18.04
needs: [ciflow_should_run]
env:
SHARD_NUMBER: ${{ matrix.shard }}
NUM_TEST_SHARDS: ${{ matrix.num_shards }}
PYTORCH_IGNORE_DISABLED_ISSUES: ${{ needs.generate-test-matrix.outputs.ignore-disabled-issues }}
- CONTINUE_THROUGH_ERROR: ${{ github.repository_owner == 'pytorch' && (github.event_name == 'push' || github.event_name == 'schedule') }}
+ CONTINUE_THROUGH_ERROR: ${{ github.repository == 'pytorch/pytorch' && (github.event_name == 'push' || github.event_name == 'schedule') }}
steps:
- name: Display EC2 information
shell: bash
jobs:
ciflow_should_run:
runs-on: ubuntu-18.04
- if: ${{ (github.event_name != 'pull_request') || (github.event.action !='unassigned') || (contains(github.event.pull_request.labels.*.name, 'ciflow/all') || contains(github.event.pull_request.labels.*.name, 'ciflow/bazel') || contains(github.event.pull_request.labels.*.name, 'ciflow/cpu') || contains(github.event.pull_request.labels.*.name, 'ciflow/default') || contains(github.event.pull_request.labels.*.name, 'ciflow/linux')) }}
+ if: ${{ (github.repository == 'pytorch/pytorch') && ((github.event_name != 'pull_request') || (github.event.action !='unassigned') || (contains(github.event.pull_request.labels.*.name, 'ciflow/all') || contains(github.event.pull_request.labels.*.name, 'ciflow/bazel') || contains(github.event.pull_request.labels.*.name, 'ciflow/cpu') || contains(github.event.pull_request.labels.*.name, 'ciflow/default') || contains(github.event.pull_request.labels.*.name, 'ciflow/linux'))) }}
env:
LABELS: ${{ toJson(github.event.pull_request.labels.*.name) }}
steps:
- name: print labels
run: echo "${LABELS}"
calculate-docker-image:
- if: ${{ github.repository_owner == 'pytorch' }}
runs-on: linux.2xlarge
needs: [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
NUM_TEST_SHARDS: 1
- CONTINUE_THROUGH_ERROR: ${{ github.repository_owner == 'pytorch' && (github.event_name == 'push' || github.event_name == 'schedule') }}
+ CONTINUE_THROUGH_ERROR: ${{ github.repository == 'pytorch/pytorch' && (github.event_name == 'push' || github.event_name == 'schedule') }}
steps:
- name: Display EC2 information
shell: bash
jobs:
ciflow_should_run:
runs-on: ubuntu-18.04
- if: ${{ (github.event_name != 'pull_request') || (github.event.action !='unassigned') || (contains(github.event.pull_request.labels.*.name, 'ciflow/all') || contains(github.event.pull_request.labels.*.name, 'ciflow/cpu') || contains(github.event.pull_request.labels.*.name, 'ciflow/linux')) }}
+ if: ${{ (github.repository == 'pytorch/pytorch') && ((github.event_name != 'pull_request') || (github.event.action !='unassigned') || (contains(github.event.pull_request.labels.*.name, 'ciflow/all') || contains(github.event.pull_request.labels.*.name, 'ciflow/cpu') || contains(github.event.pull_request.labels.*.name, 'ciflow/linux'))) }}
env:
LABELS: ${{ toJson(github.event.pull_request.labels.*.name) }}
steps:
- name: print labels
run: echo "${LABELS}"
calculate-docker-image:
- if: ${{ github.repository_owner == 'pytorch' }}
runs-on: linux.2xlarge
needs: [ciflow_should_run]
env:
docker system prune -af
generate-test-matrix:
- if: ${{ github.repository_owner == 'pytorch' }}
runs-on: ubuntu-18.04
needs: [ciflow_should_run]
env:
SHARD_NUMBER: ${{ matrix.shard }}
NUM_TEST_SHARDS: ${{ matrix.num_shards }}
PYTORCH_IGNORE_DISABLED_ISSUES: ${{ needs.generate-test-matrix.outputs.ignore-disabled-issues }}
- CONTINUE_THROUGH_ERROR: ${{ github.repository_owner == 'pytorch' && (github.event_name == 'push' || github.event_name == 'schedule') }}
+ CONTINUE_THROUGH_ERROR: ${{ github.repository == 'pytorch/pytorch' && (github.event_name == 'push' || github.event_name == 'schedule') }}
steps:
- name: Display EC2 information
shell: bash
jobs:
ciflow_should_run:
runs-on: ubuntu-18.04
- if: ${{ (github.event_name != 'pull_request') || (github.event.action !='unassigned') || (contains(github.event.pull_request.labels.*.name, 'ciflow/all') || contains(github.event.pull_request.labels.*.name, 'ciflow/cpu') || contains(github.event.pull_request.labels.*.name, 'ciflow/linux')) }}
+ if: ${{ (github.repository == 'pytorch/pytorch') && ((github.event_name != 'pull_request') || (github.event.action !='unassigned') || (contains(github.event.pull_request.labels.*.name, 'ciflow/all') || contains(github.event.pull_request.labels.*.name, 'ciflow/cpu') || contains(github.event.pull_request.labels.*.name, 'ciflow/linux'))) }}
env:
LABELS: ${{ toJson(github.event.pull_request.labels.*.name) }}
steps:
- name: print labels
run: echo "${LABELS}"
calculate-docker-image:
- if: ${{ github.repository_owner == 'pytorch' }}
runs-on: linux.2xlarge
needs: [ciflow_should_run]
env:
docker system prune -af
generate-test-matrix:
- if: ${{ github.repository_owner == 'pytorch' }}
runs-on: ubuntu-18.04
needs: [ciflow_should_run]
env:
SHARD_NUMBER: ${{ matrix.shard }}
NUM_TEST_SHARDS: ${{ matrix.num_shards }}
PYTORCH_IGNORE_DISABLED_ISSUES: ${{ needs.generate-test-matrix.outputs.ignore-disabled-issues }}
- CONTINUE_THROUGH_ERROR: ${{ github.repository_owner == 'pytorch' && (github.event_name == 'push' || github.event_name == 'schedule') }}
+ CONTINUE_THROUGH_ERROR: ${{ github.repository == 'pytorch/pytorch' && (github.event_name == 'push' || github.event_name == 'schedule') }}
steps:
- name: Display EC2 information
shell: bash
jobs:
ciflow_should_run:
runs-on: ubuntu-18.04
- if: ${{ (github.event_name != 'pull_request') || (github.event.action !='unassigned') || (contains(github.event.pull_request.labels.*.name, 'ciflow/all') || contains(github.event.pull_request.labels.*.name, 'ciflow/cuda') || contains(github.event.pull_request.labels.*.name, 'ciflow/libtorch') || contains(github.event.pull_request.labels.*.name, 'ciflow/linux') || contains(github.event.pull_request.labels.*.name, 'ciflow/scheduled')) }}
+ if: ${{ (github.repository == 'pytorch/pytorch') && ((github.event_name != 'pull_request') || (github.event.action !='unassigned') || (contains(github.event.pull_request.labels.*.name, 'ciflow/all') || contains(github.event.pull_request.labels.*.name, 'ciflow/cuda') || contains(github.event.pull_request.labels.*.name, 'ciflow/libtorch') || contains(github.event.pull_request.labels.*.name, 'ciflow/linux') || contains(github.event.pull_request.labels.*.name, 'ciflow/scheduled'))) }}
env:
LABELS: ${{ toJson(github.event.pull_request.labels.*.name) }}
steps:
- name: print labels
run: echo "${LABELS}"
calculate-docker-image:
- if: ${{ github.repository_owner == 'pytorch' }}
runs-on: linux.2xlarge
needs: [ciflow_should_run]
env:
jobs:
ciflow_should_run:
runs-on: ubuntu-18.04
- if: ${{ (github.event_name != 'pull_request') || (github.event.action !='unassigned') || (contains(github.event.pull_request.labels.*.name, 'ciflow/all') || contains(github.event.pull_request.labels.*.name, 'ciflow/cuda') || contains(github.event.pull_request.labels.*.name, 'ciflow/linux') || contains(github.event.pull_request.labels.*.name, 'ciflow/scheduled')) }}
+ if: ${{ (github.repository == 'pytorch/pytorch') && ((github.event_name != 'pull_request') || (github.event.action !='unassigned') || (contains(github.event.pull_request.labels.*.name, 'ciflow/all') || contains(github.event.pull_request.labels.*.name, 'ciflow/cuda') || contains(github.event.pull_request.labels.*.name, 'ciflow/linux') || contains(github.event.pull_request.labels.*.name, 'ciflow/scheduled'))) }}
env:
LABELS: ${{ toJson(github.event.pull_request.labels.*.name) }}
steps:
- name: print labels
run: echo "${LABELS}"
calculate-docker-image:
- if: ${{ github.repository_owner == 'pytorch' }}
runs-on: linux.2xlarge
needs: [ciflow_should_run]
env:
docker system prune -af
generate-test-matrix:
- if: ${{ github.repository_owner == 'pytorch' }}
runs-on: ubuntu-18.04
needs: [ciflow_should_run]
env:
SHARD_NUMBER: ${{ matrix.shard }}
NUM_TEST_SHARDS: ${{ matrix.num_shards }}
PYTORCH_IGNORE_DISABLED_ISSUES: ${{ needs.generate-test-matrix.outputs.ignore-disabled-issues }}
- CONTINUE_THROUGH_ERROR: ${{ github.repository_owner == 'pytorch' && (github.event_name == 'push' || github.event_name == 'schedule') }}
+ CONTINUE_THROUGH_ERROR: ${{ github.repository == 'pytorch/pytorch' && (github.event_name == 'push' || github.event_name == 'schedule') }}
steps:
- name: Display EC2 information
shell: bash
jobs:
ciflow_should_run:
runs-on: ubuntu-18.04
- if: ${{ (github.event_name != 'pull_request') || (github.event.action !='unassigned') || (contains(github.event.pull_request.labels.*.name, 'ciflow/all') || contains(github.event.pull_request.labels.*.name, 'ciflow/cuda') || contains(github.event.pull_request.labels.*.name, 'ciflow/scheduled') || contains(github.event.pull_request.labels.*.name, 'ciflow/win')) }}
+ if: ${{ (github.repository == 'pytorch/pytorch') && ((github.event_name != 'pull_request') || (github.event.action !='unassigned') || (contains(github.event.pull_request.labels.*.name, 'ciflow/all') || contains(github.event.pull_request.labels.*.name, 'ciflow/cuda') || contains(github.event.pull_request.labels.*.name, 'ciflow/scheduled') || contains(github.event.pull_request.labels.*.name, 'ciflow/win'))) }}
steps:
- name: noop
run: echo running ciflow_should_run
build:
- if: ${{ github.repository_owner == 'pytorch' }}
runs-on: "windows.4xlarge"
defaults:
run:
rm -rf ./*
generate-test-matrix:
- if: ${{ github.repository_owner == 'pytorch' }}
needs: [ciflow_should_run]
runs-on: ubuntu-18.04
env:
https_proxy: "http://internal-tf-lb-20210727220640487900000002-835786077.us-east-1.elb.amazonaws.com:3128"
RUN_SMOKE_TESTS_ONLY_ON_PR: False
PYTORCH_IGNORE_DISABLED_ISSUES: ${{ needs.generate-test-matrix.outputs.ignore-disabled-issues }}
- CONTINUE_THROUGH_ERROR: ${{ github.repository_owner == 'pytorch' && (github.event_name == 'push' || github.event_name == 'schedule') }}
+ CONTINUE_THROUGH_ERROR: ${{ github.repository == 'pytorch/pytorch' && (github.event_name == 'push' || github.event_name == 'schedule') }}
needs: [build, generate-test-matrix, ciflow_should_run]
strategy:
matrix: ${{ fromJson(needs.generate-test-matrix.outputs.matrix) }}
jobs:
ciflow_should_run:
runs-on: ubuntu-18.04
- if: ${{ (github.event_name != 'pull_request') || (github.event.action !='unassigned') || (contains(github.event.pull_request.labels.*.name, 'ciflow/all') || contains(github.event.pull_request.labels.*.name, 'ciflow/cpu') || contains(github.event.pull_request.labels.*.name, 'ciflow/linux')) }}
+ if: ${{ (github.repository == 'pytorch/pytorch') && ((github.event_name != 'pull_request') || (github.event.action !='unassigned') || (contains(github.event.pull_request.labels.*.name, 'ciflow/all') || contains(github.event.pull_request.labels.*.name, 'ciflow/cpu') || contains(github.event.pull_request.labels.*.name, 'ciflow/linux'))) }}
env:
LABELS: ${{ toJson(github.event.pull_request.labels.*.name) }}
steps:
- name: print labels
run: echo "${LABELS}"
calculate-docker-image:
- if: ${{ github.repository_owner == 'pytorch' }}
runs-on: linux.2xlarge
needs: [ciflow_should_run]
env:
jobs:
ciflow_should_run:
runs-on: ubuntu-18.04
- if: ${{ (github.event_name != 'pull_request') || (github.event.action !='unassigned') || (contains(github.event.pull_request.labels.*.name, 'ciflow/all') || contains(github.event.pull_request.labels.*.name, 'ciflow/cpu') || contains(github.event.pull_request.labels.*.name, 'ciflow/default') || contains(github.event.pull_request.labels.*.name, 'ciflow/win')) }}
+ if: ${{ (github.repository_owner == 'pytorch') && ((github.event_name != 'pull_request') || (github.event.action !='unassigned') || (contains(github.event.pull_request.labels.*.name, 'ciflow/all') || contains(github.event.pull_request.labels.*.name, 'ciflow/cpu') || contains(github.event.pull_request.labels.*.name, 'ciflow/default') || contains(github.event.pull_request.labels.*.name, 'ciflow/win'))) }}
steps:
- name: noop
run: echo running ciflow_should_run
build:
- if: ${{ github.repository_owner == 'pytorch' }}
runs-on: "windows.4xlarge"
defaults:
run:
rm -rf ./*
generate-test-matrix:
- if: ${{ github.repository_owner == 'pytorch' }}
needs: [ciflow_should_run]
runs-on: ubuntu-18.04
env:
https_proxy: "http://internal-tf-lb-20210727220640487900000002-835786077.us-east-1.elb.amazonaws.com:3128"
RUN_SMOKE_TESTS_ONLY_ON_PR: False
PYTORCH_IGNORE_DISABLED_ISSUES: ${{ needs.generate-test-matrix.outputs.ignore-disabled-issues }}
- CONTINUE_THROUGH_ERROR: ${{ github.repository_owner == 'pytorch' && (github.event_name == 'push' || github.event_name == 'schedule') }}
+ CONTINUE_THROUGH_ERROR: ${{ github.repository == 'pytorch/pytorch' && (github.event_name == 'push' || github.event_name == 'schedule') }}
needs: [build, generate-test-matrix, ciflow_should_run]
strategy:
matrix: ${{ fromJson(needs.generate-test-matrix.outputs.matrix) }}
jobs:
ciflow_should_run:
runs-on: ubuntu-18.04
- if: ${{ (github.event_name != 'pull_request') || (github.event.action !='unassigned') || (contains(github.event.pull_request.labels.*.name, 'ciflow/all') || contains(github.event.pull_request.labels.*.name, 'ciflow/cuda') || contains(github.event.pull_request.labels.*.name, 'ciflow/win')) }}
+ if: ${{ (github.repository == 'pytorch/pytorch') && ((github.event_name != 'pull_request') || (github.event.action !='unassigned') || (contains(github.event.pull_request.labels.*.name, 'ciflow/all') || contains(github.event.pull_request.labels.*.name, 'ciflow/cuda') || contains(github.event.pull_request.labels.*.name, 'ciflow/win'))) }}
steps:
- name: noop
run: echo running ciflow_should_run
build:
- if: ${{ github.repository_owner == 'pytorch' }}
runs-on: "windows.4xlarge"
defaults:
run:
rm -rf ./*
generate-test-matrix:
- if: ${{ github.repository_owner == 'pytorch' }}
needs: [ciflow_should_run]
runs-on: ubuntu-18.04
env:
https_proxy: "http://internal-tf-lb-20210727220640487900000002-835786077.us-east-1.elb.amazonaws.com:3128"
RUN_SMOKE_TESTS_ONLY_ON_PR: False
PYTORCH_IGNORE_DISABLED_ISSUES: ${{ needs.generate-test-matrix.outputs.ignore-disabled-issues }}
- CONTINUE_THROUGH_ERROR: ${{ github.repository_owner == 'pytorch' && (github.event_name == 'push' || github.event_name == 'schedule') }}
+ CONTINUE_THROUGH_ERROR: ${{ github.repository == 'pytorch/pytorch' && (github.event_name == 'push' || github.event_name == 'schedule') }}
needs: [build, generate-test-matrix, ciflow_should_run]
strategy:
matrix: ${{ fromJson(needs.generate-test-matrix.outputs.matrix) }}
jobs:
ciflow_should_run:
runs-on: ubuntu-18.04
- if: ${{ (github.event_name != 'pull_request') || (github.event.action !='unassigned') || (contains(github.event.pull_request.labels.*.name, 'ciflow/all') || contains(github.event.pull_request.labels.*.name, 'ciflow/cuda') || contains(github.event.pull_request.labels.*.name, 'ciflow/default') || contains(github.event.pull_request.labels.*.name, 'ciflow/win')) }}
+ if: ${{ (github.repository_owner == 'pytorch') && ((github.event_name != 'pull_request') || (github.event.action !='unassigned') || (contains(github.event.pull_request.labels.*.name, 'ciflow/all') || contains(github.event.pull_request.labels.*.name, 'ciflow/cuda') || contains(github.event.pull_request.labels.*.name, 'ciflow/default') || contains(github.event.pull_request.labels.*.name, 'ciflow/win'))) }}
steps:
- name: noop
run: echo running ciflow_should_run
build:
- if: ${{ github.repository_owner == 'pytorch' }}
runs-on: "windows.4xlarge"
defaults:
run:
rm -rf ./*
generate-test-matrix:
- if: ${{ github.repository_owner == 'pytorch' }}
needs: [ciflow_should_run]
runs-on: ubuntu-18.04
env:
https_proxy: "http://internal-tf-lb-20210727220640487900000002-835786077.us-east-1.elb.amazonaws.com:3128"
RUN_SMOKE_TESTS_ONLY_ON_PR: True
PYTORCH_IGNORE_DISABLED_ISSUES: ${{ needs.generate-test-matrix.outputs.ignore-disabled-issues }}
- CONTINUE_THROUGH_ERROR: ${{ github.repository_owner == 'pytorch' && (github.event_name == 'push' || github.event_name == 'schedule') }}
+ CONTINUE_THROUGH_ERROR: ${{ github.repository == 'pytorch/pytorch' && (github.event_name == 'push' || github.event_name == 'schedule') }}
needs: [build, generate-test-matrix, ciflow_should_run]
strategy:
matrix: ${{ fromJson(needs.generate-test-matrix.outputs.matrix) }}
jobs:
build-publish-docker:
- if: ${{ github.repository_owner == 'pytorch' }}
+ if: ${{ github.repository == 'pytorch/pytorch' }}
runs-on: linux.2xlarge
env:
GHCR_PAT: ${{ secrets.GHCR_PAT }}
jobs:
stale:
- if: ${{ github.repository_owner == 'pytorch' }}
+ if: ${{ github.repository == 'pytorch/pytorch' }}
runs-on: ubuntu-18.04
steps:
- uses: actions/stale@v3
days-before-stale: 60
days-before-close: 90
stale-open-source:
- if: ${{ github.repository_owner == 'pytorch' }}
+ if: ${{ github.repository == 'pytorch/pytorch' }}
runs-on: ubuntu-18.04
steps:
- uses: actions/stale@v3
jobs:
test:
+ if: ${{ github.repository == 'pytorch/pytorch' }}
runs-on: ubuntu-18.04
steps:
- name: Setup Python
jobs:
welcome:
+ if: ${{ github.repository == 'pytorch/pytorch' }}
runs-on: ubuntu-18.04
strategy:
fail-fast: false
jobs:
update-html:
runs-on: ubuntu-18.04
- if: ${{ github.repository_owner == 'pytorch' }}
+ if: ${{ github.repository == 'pytorch/pytorch' }}
strategy:
matrix:
prefix: ["whl", "whl/test", "whl/nightly"]