Skip to content

Commit 21db560

Browse files
authored
[CI] skip docs-only jobs take #2 (huggingface#8853)
* restore skip * Revert "Remove deprecated `evalutate_during_training` (huggingface#8852)" This reverts commit 5530299. * check that pipeline.git.base_revision is defined before proceeding * Revert "Revert "Remove deprecated `evalutate_during_training` (huggingface#8852)"" This reverts commit dfec84d. * check that pipeline.git.base_revision is defined before proceeding * doc only * doc + code * restore * restore * typo
1 parent a947386 commit 21db560

File tree

1 file changed

+18
-12
lines changed

1 file changed

+18
-12
lines changed

.circleci/config.yml

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,18 @@ commands:
1111
- run:
1212
name: docs-only changes skip check
1313
command: |
14-
if git diff --name-only << pipeline.git.base_revision >>...<< pipeline.git.revision >> | egrep -qv '\.(md|rst)$'
14+
# pipeline.git.base_revision is not always defined, so only proceed if all external vars are defined
15+
if test -n "<< pipeline.git.base_revision >>" && test -n "<< pipeline.git.revision >>"
1516
then
16-
echo "Non-docs were modified in this PR, proceeding normally"
17+
if git diff --name-only << pipeline.git.base_revision >>...<< pipeline.git.revision >> | egrep -qv '\.(md|rst)$'
18+
then
19+
echo "Non-docs were modified in this PR, proceeding normally"
20+
else
21+
echo "Only docs were modified in this PR, quitting this job"
22+
circleci step halt
23+
fi
1724
else
18-
echo "Only docs were modified in this PR, quitting this job"
19-
circleci step halt
25+
echo "Can't perform skipping check w/o base_revision defined, continuing the job"
2026
fi
2127
2228
# TPU REFERENCES
@@ -88,7 +94,7 @@ jobs:
8894
parallelism: 1
8995
steps:
9096
- checkout
91-
# - skip-job-on-doc-only-changes
97+
- skip-job-on-doc-only-changes
9298
- restore_cache:
9399
keys:
94100
- v0.4-torch_and_tf-{{ checksum "setup.py" }}
@@ -115,7 +121,7 @@ jobs:
115121
parallelism: 1
116122
steps:
117123
- checkout
118-
# - skip-job-on-doc-only-changes
124+
- skip-job-on-doc-only-changes
119125
- restore_cache:
120126
keys:
121127
- v0.4-torch-{{ checksum "setup.py" }}
@@ -142,7 +148,7 @@ jobs:
142148
parallelism: 1
143149
steps:
144150
- checkout
145-
# - skip-job-on-doc-only-changes
151+
- skip-job-on-doc-only-changes
146152
- restore_cache:
147153
keys:
148154
- v0.4-tf-{{ checksum "setup.py" }}
@@ -169,7 +175,7 @@ jobs:
169175
parallelism: 1
170176
steps:
171177
- checkout
172-
# - skip-job-on-doc-only-changes
178+
- skip-job-on-doc-only-changes
173179
- restore_cache:
174180
keys:
175181
- v0.4-flax-{{ checksum "setup.py" }}
@@ -196,7 +202,7 @@ jobs:
196202
parallelism: 1
197203
steps:
198204
- checkout
199-
# - skip-job-on-doc-only-changes
205+
- skip-job-on-doc-only-changes
200206
- restore_cache:
201207
keys:
202208
- v0.4-torch-{{ checksum "setup.py" }}
@@ -223,7 +229,7 @@ jobs:
223229
parallelism: 1
224230
steps:
225231
- checkout
226-
# - skip-job-on-doc-only-changes
232+
- skip-job-on-doc-only-changes
227233
- restore_cache:
228234
keys:
229235
- v0.4-tf-{{ checksum "setup.py" }}
@@ -248,7 +254,7 @@ jobs:
248254
RUN_CUSTOM_TOKENIZERS: yes
249255
steps:
250256
- checkout
251-
# - skip-job-on-doc-only-changes
257+
- skip-job-on-doc-only-changes
252258
- restore_cache:
253259
keys:
254260
- v0.4-custom_tokenizers-{{ checksum "setup.py" }}
@@ -276,7 +282,7 @@ jobs:
276282
parallelism: 1
277283
steps:
278284
- checkout
279-
# - skip-job-on-doc-only-changes
285+
- skip-job-on-doc-only-changes
280286
- restore_cache:
281287
keys:
282288
- v0.4-torch_examples-{{ checksum "setup.py" }}

0 commit comments

Comments
 (0)