Skip to content

Commit

Permalink
.circleci: Specify setup job to run on everything (pytorch#35013)
Browse files Browse the repository at this point in the history
Summary:
CircleCI by default, chooses to run 0 jobs on tags meaning that when we
tag a build that no job is run if a dependent job does not contain the
correct filters.

This adds an explicit configuration to run the setup job on every branch
and every tag that CircleCI can run on.

For more information on CircleCI filters and what they do (and more
importantly what they do not do) visit:

https://circleci.com/docs/2.0/configuration-reference/#filters-1

Signed-off-by: Eli Uriegas <eliuriegas@fb.com>
Pull Request resolved: pytorch#35013

Differential Revision: D20535560

Pulled By: seemethere

fbshipit-source-id: 7ee5dddbc0a9416fd76ed198e5447318c53e1873
  • Loading branch information
seemethere authored and facebook-github-bot committed Mar 19, 2020
1 parent 35d9874 commit 6d48871
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .circleci/cimodel/data/pytorch_build_definitions.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ def get_workflow_jobs():

config_list = instantiate_configs()

x = ["setup"]
x = []
for conf_options in config_list:

phases = conf_options.restrict_phases or dimensions.PHASES
Expand Down
9 changes: 8 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1732,6 +1732,14 @@ jobs:
workflows:
build:
jobs:
- setup:
# Run this job on everything since it is
# the dependency for everything.
filters:
tags:
only: /.*/
branches:
only: /.*/
# Warning: indentation here matters!

- pytorch_windows_build:
Expand Down Expand Up @@ -1866,7 +1874,6 @@ workflows:
requires:
- setup
- pytorch_windows_vs2019_py36_cuda10.1_build
- setup
- pytorch_linux_build:
name: pytorch_linux_xenial_py3_5_build
requires:
Expand Down
1 change: 1 addition & 0 deletions .circleci/generate_config_yml.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ def write(self, output_filehandle):
File("docker_jobs.yml"),
File("workflows.yml"),

File("workflows-setup-job.yml"),
File("windows-build-test.yml"),
Listgen(pytorch_build_definitions.get_workflow_jobs, 3),
File("workflows-pytorch-macos-builds.yml"),
Expand Down
8 changes: 8 additions & 0 deletions .circleci/verbatim-sources/workflows-setup-job.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
- setup:
# Run this job on everything since it is
# the dependency for everything.
filters:
tags:
only: /.*/
branches:
only: /.*/

0 comments on commit 6d48871

Please sign in to comment.