Skip to content

Commit 12086a6

Browse files
pieternfacebook-github-bot
authored andcommitted
Turn setup_linux_system_environment into command
Summary: Pull Request resolved: #26162 Test Plan: Imported from OSS Differential Revision: D17366537 Pulled By: pietern fbshipit-source-id: 98413daa344812f06578c3373d8516292d2f21f5
1 parent 0303ecf commit 12086a6

File tree

8 files changed

+48
-72
lines changed

8 files changed

+48
-72
lines changed

.circleci/config.yml

Lines changed: 24 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,6 @@ docker_config_defaults: &docker_config_defaults
2020
aws_access_key_id: ${CIRCLECI_AWS_ACCESS_KEY_FOR_ECR_READ_WRITE_V4}
2121
aws_secret_access_key: ${CIRCLECI_AWS_SECRET_KEY_FOR_ECR_READ_WRITE_V4}
2222

23-
# This system setup script is meant to run before the CI-related scripts, e.g.,
24-
# installing Git client, checking out code, setting up CI env, and
25-
# building/testing.
26-
setup_linux_system_environment: &setup_linux_system_environment
27-
name: Set Up System Environment
28-
no_output_timeout: "1h"
29-
command: ~/workspace/.circleci/scripts/setup_linux_system_environment.sh
30-
3123
setup_ci_environment: &setup_ci_environment
3224
name: Set Up CI Environment After attach_workspace
3325
no_output_timeout: "1h"
@@ -48,6 +40,16 @@ commands:
4840
no_output_timeout: "2m"
4941
command: ~/workspace/.circleci/scripts/should_run_job.sh
5042

43+
# This system setup script is meant to run before the CI-related scripts, e.g.,
44+
# installing Git client, checking out code, setting up CI env, and
45+
# building/testing.
46+
setup_linux_system_environment:
47+
steps:
48+
- run:
49+
name: Set Up System Environment
50+
no_output_timeout: "1h"
51+
command: ~/workspace/.circleci/scripts/setup_linux_system_environment.sh
52+
5153
brew_update:
5254
description: "Update Homebrew and install base formulae"
5355
steps:
@@ -290,8 +292,7 @@ jobs:
290292
steps:
291293
# See Note [Workspace for CircleCI scripts] in job-specs-setup.yml
292294
- should_run_job
293-
- run:
294-
<<: *setup_linux_system_environment
295+
- setup_linux_system_environment
295296
- checkout
296297
- run:
297298
<<: *setup_ci_environment
@@ -349,8 +350,7 @@ jobs:
349350
steps:
350351
# See Note [Workspace for CircleCI scripts] in job-specs-setup.yml
351352
- should_run_job
352-
- run:
353-
<<: *setup_linux_system_environment
353+
- setup_linux_system_environment
354354
- run:
355355
<<: *setup_ci_environment
356356
- run:
@@ -388,8 +388,7 @@ jobs:
388388
steps:
389389
# See Note [Workspace for CircleCI scripts] in job-specs-setup.yml
390390
- should_run_job
391-
- run:
392-
<<: *setup_linux_system_environment
391+
- setup_linux_system_environment
393392
- checkout
394393
- run:
395394
<<: *setup_ci_environment
@@ -450,8 +449,7 @@ jobs:
450449
steps:
451450
# See Note [Workspace for CircleCI scripts] in job-specs-setup.yml
452451
- should_run_job
453-
- run:
454-
<<: *setup_linux_system_environment
452+
- setup_linux_system_environment
455453
- run:
456454
<<: *setup_ci_environment
457455
- run:
@@ -651,8 +649,7 @@ jobs:
651649
# TODO: We shouldn't attach the workspace multiple times
652650
- attach_workspace:
653651
at: /home/circleci/project
654-
- run:
655-
<<: *setup_linux_system_environment
652+
- setup_linux_system_environment
656653
- run:
657654
<<: *setup_ci_environment
658655
- run:
@@ -673,8 +670,7 @@ jobs:
673670
steps:
674671
# See Note [Workspace for CircleCI scripts] in job-specs-setup.yml
675672
- should_run_job
676-
- run:
677-
<<: *setup_linux_system_environment
673+
- setup_linux_system_environment
678674
- run:
679675
<<: *setup_ci_environment
680676
- attach_workspace:
@@ -702,8 +698,7 @@ jobs:
702698
at: ~/workspace
703699
- attach_workspace:
704700
at: /home/circleci/project
705-
- run:
706-
<<: *setup_linux_system_environment
701+
- setup_linux_system_environment
707702
- run:
708703
<<: *setup_ci_environment
709704
- run:
@@ -859,8 +854,7 @@ jobs:
859854
steps:
860855
# See Note [Workspace for CircleCI scripts] in job-specs-setup.yml
861856
- should_run_job
862-
- run:
863-
<<: *setup_linux_system_environment
857+
- setup_linux_system_environment
864858
- run:
865859
<<: *setup_ci_environment
866860
- run:
@@ -895,8 +889,7 @@ jobs:
895889
steps:
896890
# See Note [Workspace for CircleCI scripts] in job-specs-setup.yml
897891
- should_run_job
898-
- run:
899-
<<: *setup_linux_system_environment
892+
- setup_linux_system_environment
900893
- run:
901894
<<: *setup_ci_environment
902895
- run:
@@ -942,8 +935,7 @@ jobs:
942935
steps:
943936
# See Note [Workspace for CircleCI scripts] in job-specs-setup.yml
944937
- should_run_job
945-
- run:
946-
<<: *setup_linux_system_environment
938+
- setup_linux_system_environment
947939
- run:
948940
<<: *setup_ci_environment
949941
- run:
@@ -1100,8 +1092,7 @@ jobs:
11001092
image: ubuntu-1604:201903-01
11011093
steps:
11021094
- should_run_job
1103-
- run:
1104-
<<: *setup_linux_system_environment
1095+
- setup_linux_system_environment
11051096
- checkout
11061097
- run:
11071098
<<: *setup_ci_environment
@@ -1196,8 +1187,7 @@ jobs:
11961187
if [ -z "${CIRCLE_PULL_REQUEST:-}" ]; then
11971188
circleci step halt
11981189
fi
1199-
- run:
1200-
<<: *setup_linux_system_environment
1190+
- setup_linux_system_environment
12011191
- checkout
12021192
- run:
12031193
<<: *setup_ci_environment
@@ -1289,8 +1279,7 @@ jobs:
12891279
steps:
12901280
- attach_workspace:
12911281
at: ~/workspace
1292-
- run:
1293-
<<: *setup_linux_system_environment
1282+
- setup_linux_system_environment
12941283
- run:
12951284
<<: *binary_checkout
12961285
# N.B. we do not run binary_populate_env. The only variable we need is
@@ -1344,8 +1333,7 @@ jobs:
13441333
steps:
13451334
- attach_workspace:
13461335
at: ~/workspace
1347-
- run:
1348-
<<: *setup_linux_system_environment
1336+
- setup_linux_system_environment
13491337
- run:
13501338
<<: *binary_checkout
13511339
- run:

.circleci/verbatim-sources/binary-job-specs.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,7 @@
6060
# TODO: We shouldn't attach the workspace multiple times
6161
- attach_workspace:
6262
at: /home/circleci/project
63-
- run:
64-
<<: *setup_linux_system_environment
63+
- setup_linux_system_environment
6564
- run:
6665
<<: *setup_ci_environment
6766
- run:
@@ -82,8 +81,7 @@
8281
steps:
8382
# See Note [Workspace for CircleCI scripts] in job-specs-setup.yml
8483
- should_run_job
85-
- run:
86-
<<: *setup_linux_system_environment
84+
- setup_linux_system_environment
8785
- run:
8886
<<: *setup_ci_environment
8987
- attach_workspace:
@@ -111,8 +109,7 @@
111109
at: ~/workspace
112110
- attach_workspace:
113111
at: /home/circleci/project
114-
- run:
115-
<<: *setup_linux_system_environment
112+
- setup_linux_system_environment
116113
- run:
117114
<<: *setup_ci_environment
118115
- run:

.circleci/verbatim-sources/binary_update_htmls.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@
1212
steps:
1313
- attach_workspace:
1414
at: ~/workspace
15-
- run:
16-
<<: *setup_linux_system_environment
15+
- setup_linux_system_environment
1716
- run:
1817
<<: *binary_checkout
1918
# N.B. we do not run binary_populate_env. The only variable we need is
@@ -67,8 +66,7 @@
6766
steps:
6867
- attach_workspace:
6968
at: ~/workspace
70-
- run:
71-
<<: *setup_linux_system_environment
69+
- setup_linux_system_environment
7270
- run:
7371
<<: *binary_checkout
7472
- run:

.circleci/verbatim-sources/caffe2-job-specs.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
steps:
66
# See Note [Workspace for CircleCI scripts] in job-specs-setup.yml
77
- should_run_job
8-
- run:
9-
<<: *setup_linux_system_environment
8+
- setup_linux_system_environment
109
- checkout
1110
- run:
1211
<<: *setup_ci_environment
@@ -67,8 +66,7 @@
6766
steps:
6867
# See Note [Workspace for CircleCI scripts] in job-specs-setup.yml
6968
- should_run_job
70-
- run:
71-
<<: *setup_linux_system_environment
69+
- setup_linux_system_environment
7270
- run:
7371
<<: *setup_ci_environment
7472
- run:

.circleci/verbatim-sources/commands.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,16 @@ commands:
1414
no_output_timeout: "2m"
1515
command: ~/workspace/.circleci/scripts/should_run_job.sh
1616

17+
# This system setup script is meant to run before the CI-related scripts, e.g.,
18+
# installing Git client, checking out code, setting up CI env, and
19+
# building/testing.
20+
setup_linux_system_environment:
21+
steps:
22+
- run:
23+
name: Set Up System Environment
24+
no_output_timeout: "1h"
25+
command: ~/workspace/.circleci/scripts/setup_linux_system_environment.sh
26+
1727
brew_update:
1828
description: "Update Homebrew and install base formulae"
1929
steps:

.circleci/verbatim-sources/header-section.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,6 @@ docker_config_defaults: &docker_config_defaults
2020
aws_access_key_id: ${CIRCLECI_AWS_ACCESS_KEY_FOR_ECR_READ_WRITE_V4}
2121
aws_secret_access_key: ${CIRCLECI_AWS_SECRET_KEY_FOR_ECR_READ_WRITE_V4}
2222

23-
# This system setup script is meant to run before the CI-related scripts, e.g.,
24-
# installing Git client, checking out code, setting up CI env, and
25-
# building/testing.
26-
setup_linux_system_environment: &setup_linux_system_environment
27-
name: Set Up System Environment
28-
no_output_timeout: "1h"
29-
command: ~/workspace/.circleci/scripts/setup_linux_system_environment.sh
30-
3123
setup_ci_environment: &setup_ci_environment
3224
name: Set Up CI Environment After attach_workspace
3325
no_output_timeout: "1h"

.circleci/verbatim-sources/job-specs-custom.yml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010
steps:
1111
# See Note [Workspace for CircleCI scripts] in job-specs-setup.yml
1212
- should_run_job
13-
- run:
14-
<<: *setup_linux_system_environment
13+
- setup_linux_system_environment
1514
- run:
1615
<<: *setup_ci_environment
1716
- run:
@@ -46,8 +45,7 @@
4645
steps:
4746
# See Note [Workspace for CircleCI scripts] in job-specs-setup.yml
4847
- should_run_job
49-
- run:
50-
<<: *setup_linux_system_environment
48+
- setup_linux_system_environment
5149
- run:
5250
<<: *setup_ci_environment
5351
- run:
@@ -93,8 +91,7 @@
9391
steps:
9492
# See Note [Workspace for CircleCI scripts] in job-specs-setup.yml
9593
- should_run_job
96-
- run:
97-
<<: *setup_linux_system_environment
94+
- setup_linux_system_environment
9895
- run:
9996
<<: *setup_ci_environment
10097
- run:
@@ -251,8 +248,7 @@
251248
image: ubuntu-1604:201903-01
252249
steps:
253250
- should_run_job
254-
- run:
255-
<<: *setup_linux_system_environment
251+
- setup_linux_system_environment
256252
- checkout
257253
- run:
258254
<<: *setup_ci_environment
@@ -347,8 +343,7 @@
347343
if [ -z "${CIRCLE_PULL_REQUEST:-}" ]; then
348344
circleci step halt
349345
fi
350-
- run:
351-
<<: *setup_linux_system_environment
346+
- setup_linux_system_environment
352347
- checkout
353348
- run:
354349
<<: *setup_ci_environment

.circleci/verbatim-sources/pytorch-job-specs.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ jobs:
66
steps:
77
# See Note [Workspace for CircleCI scripts] in job-specs-setup.yml
88
- should_run_job
9-
- run:
10-
<<: *setup_linux_system_environment
9+
- setup_linux_system_environment
1110
- checkout
1211
- run:
1312
<<: *setup_ci_environment
@@ -65,8 +64,7 @@ jobs:
6564
steps:
6665
# See Note [Workspace for CircleCI scripts] in job-specs-setup.yml
6766
- should_run_job
68-
- run:
69-
<<: *setup_linux_system_environment
67+
- setup_linux_system_environment
7068
- run:
7169
<<: *setup_ci_environment
7270
- run:

0 commit comments

Comments
 (0)