Skip to content
Merged
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
e5b5f73
ci-doc-job-skip-take-4
stas00 Dec 8, 2020
9af687b
wip
stas00 Dec 8, 2020
b831912
wip
stas00 Dec 8, 2020
a79ab66
wip
stas00 Dec 8, 2020
b6e5127
wip
stas00 Dec 8, 2020
883a082
skip yaml
stas00 Dec 8, 2020
bd79af0
wip
stas00 Dec 8, 2020
a682765
wip
stas00 Dec 8, 2020
32ff196
wip
stas00 Dec 8, 2020
957510c
wip
stas00 Dec 8, 2020
d98ef2c
wip
stas00 Dec 8, 2020
de3d0c3
wip
stas00 Dec 8, 2020
dbf69c8
wip
stas00 Dec 8, 2020
233b572
wip
stas00 Dec 8, 2020
ceddcf1
wip
stas00 Dec 8, 2020
66999eb
wip
stas00 Dec 8, 2020
23d9c1b
wip
stas00 Dec 8, 2020
39e087b
wip
stas00 Dec 8, 2020
18b8333
ready to test
stas00 Dec 8, 2020
75c975d
yet another way
stas00 Dec 8, 2020
17bf69f
trying with HEAD
stas00 Dec 8, 2020
feef8cb
trying with head.sha
stas00 Dec 8, 2020
1b2df2a
trying with head.sha fix
stas00 Dec 8, 2020
c0e4d65
trying with head.sha fix wip
stas00 Dec 8, 2020
e9c1c42
undo
stas00 Dec 8, 2020
1a94a92
try to switch to sha
stas00 Dec 8, 2020
f9ee368
current branch
stas00 Dec 8, 2020
44d2814
current branch
stas00 Dec 8, 2020
0f5bc2a
PR number check
stas00 Dec 8, 2020
dd71098
joy ride
stas00 Dec 8, 2020
09760ab
joy ride
stas00 Dec 8, 2020
e3c4a96
joy ride
stas00 Dec 8, 2020
9cb1258
joy ride
stas00 Dec 8, 2020
ecba7c4
joy ride
stas00 Dec 8, 2020
96da1cf
joy ride
stas00 Dec 8, 2020
7d7f2fd
joy ride
stas00 Dec 8, 2020
5ba61b3
joy ride
stas00 Dec 8, 2020
eb07f82
joy ride
stas00 Dec 8, 2020
6e1bd3d
joy ride
stas00 Dec 8, 2020
88a0b7c
joy ride
stas00 Dec 9, 2020
cf2c94d
joy ride
stas00 Dec 9, 2020
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
29 changes: 24 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,40 @@ commands:
- run:
name: docs-only changes skip check
command: |
# pipeline.git.base_revision is not always defined, so only proceed if all external vars are defined
if test -n "<< pipeline.git.base_revision >>" && test -n "<< pipeline.git.revision >>" && test -n "$(git diff --name-only << pipeline.git.base_revision >>...<< pipeline.git.revision >>)"
if test -n "$CIRCLE_PR_NUMBER"
then
if git diff --name-only << pipeline.git.base_revision >>...<< pipeline.git.revision >> | egrep -qv '\.(md|rst)$'
echo $CIRCLE_PR_NUMBER
resp=$(curl -Ls https://api.github.com/repos/huggingface/transformers/pulls/${CIRCLE_PR_NUMBER})
user=$(jq -r .user.login \<<< $resp) # PR creator username
head_ref=$(jq -r .head.ref \<<< $resp) # PR user's branch name
echo head_ref=$head_ref, user=$user
fi

if test -n "$user" && test -n "$head_ref"
then
git clone https://github.com/$user/transformers user-clone
cd user-clone
git checkout $head_ref
fork_point_sha=$(git merge-base --fork-point master)
cd -
fi

if test -n "$fork_point_sha" && test -n "$(git diff --name-only $fork_point_sha)"
then
git --no-pager diff --name-only $fork_point_sha
if git diff --name-only $fork_point_sha | 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"
# disable skipping for now, as circleCI's base_revision is inconsistent leading to invalid ranges
# enable skipping once we get this sorted out
# circleci step halt
fi
else
echo "Can't perform skipping check w/o base_revision defined, continuing the job"
echo "Not enough data to perform a skipping check - continuing the job"
fi


# TPU REFERENCES
references:
checkout_ml_testing: &checkout_ml_testing
Expand Down