Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,22 @@ orbs:
gcp-gke: circleci/[email protected]
go: circleci/[email protected]

commands:
skip-job-on-doc-only-changes:
description: "Do not continue this job and exit with success for PRs with only doc changes"
steps:

- run:
name: docs-only changes skip check
command: |
if git diff --name-only << pipeline.git.base_revision >>...<< pipeline.git.revision >> | egrep -qv '\.(md|rst)$'
then
echo "Non-docs were modified in this PR, proceeding normally"
else
echo "Only docs were modified in this PR, quitting this job"
circleci step halt
fi

# TPU REFERENCES
references:
checkout_ml_testing: &checkout_ml_testing
Expand Down Expand Up @@ -72,6 +88,7 @@ jobs:
parallelism: 1
steps:
- checkout
- skip-job-on-doc-only-changes
- restore_cache:
keys:
- v0.4-torch_and_tf-{{ checksum "setup.py" }}
Expand All @@ -98,6 +115,7 @@ jobs:
parallelism: 1
steps:
- checkout
- skip-job-on-doc-only-changes
- restore_cache:
keys:
- v0.4-torch-{{ checksum "setup.py" }}
Expand All @@ -124,6 +142,7 @@ jobs:
parallelism: 1
steps:
- checkout
- skip-job-on-doc-only-changes
- restore_cache:
keys:
- v0.4-tf-{{ checksum "setup.py" }}
Expand All @@ -150,6 +169,7 @@ jobs:
parallelism: 1
steps:
- checkout
- skip-job-on-doc-only-changes
- restore_cache:
keys:
- v0.4-flax-{{ checksum "setup.py" }}
Expand All @@ -176,6 +196,7 @@ jobs:
parallelism: 1
steps:
- checkout
- skip-job-on-doc-only-changes
- restore_cache:
keys:
- v0.4-torch-{{ checksum "setup.py" }}
Expand All @@ -202,6 +223,7 @@ jobs:
parallelism: 1
steps:
- checkout
- skip-job-on-doc-only-changes
- restore_cache:
keys:
- v0.4-tf-{{ checksum "setup.py" }}
Expand All @@ -226,6 +248,7 @@ jobs:
RUN_CUSTOM_TOKENIZERS: yes
steps:
- checkout
- skip-job-on-doc-only-changes
- restore_cache:
keys:
- v0.4-custom_tokenizers-{{ checksum "setup.py" }}
Expand Down Expand Up @@ -253,6 +276,7 @@ jobs:
parallelism: 1
steps:
- checkout
- skip-job-on-doc-only-changes
- restore_cache:
keys:
- v0.4-torch_examples-{{ checksum "setup.py" }}
Expand Down