Skip to content

Commit b3f4d3b

Browse files
authored
Merge pull request #13619 from 0xc0170/fix_travis_status_token
Travis: remove status functionality
2 parents 75f3b6c + 96740b6 commit b3f4d3b

File tree

1 file changed

+4
-48
lines changed

1 file changed

+4
-48
lines changed

.travis.yml

Lines changed: 4 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,6 @@ cache:
3333

3434
before_install:
3535
- source tools/test/travis-ci/functions.sh
36-
- set_status "pending" "Test started."
37-
38-
after_success:
39-
- set_status "success" "Success!"
40-
41-
after_failure:
42-
- set_status "failure" "Test failed."
4336

4437

4538
matrix:
@@ -86,32 +79,23 @@ matrix:
8679
| while read file; do cp --parents "${file}" SCANCODE_NEW_FILES; done
8780
- scancode -l --json-pp scancode_new_files.json SCANCODE_NEW_FILES
8881
- python ./tools/test/travis-ci/scancode-evaluate.py -f scancode_new_files.json || true
89-
after_success:
90-
- python ./tools/test/travis-ci/scancode-evaluate.py -f scancode.json
9182
- cat scancode-evaluate.log
92-
- COUNT=$(cat scancode-evaluate.log | grep 'File:' | wc -l)
83+
- COUNT=$(cat scancode-evaluate.log | grep 'File:' | wc -l) || true
9384
- python ./tools/test/travis-ci/scancode-evaluate.py -f scancode_new_files.json
9485
- cat scancode-evaluate.log
95-
- COUNT_NEW_FILES=$(cat scancode-evaluate.log | grep 'File:' | wc -l)
86+
- COUNT_NEW_FILES=$(cat scancode-evaluate.log | grep 'File:' | wc -l) || true
9687
- |
9788
if [ $COUNT == 0 ] && [ $COUNT_NEW_FILES == 0 ]; then
9889
echo "License check OK";
99-
STATUSM="All licenses OK";
100-
set_status "success" "$STATUSM";
90+
true;
10191
elif [ $COUNT_NEW_FILES != 0 ]; then
102-
echo "License check failed, files with the license issues found";
103-
STATUSM="Needs review, license issues in modified files: ${COUNT}, new files: ${COUNT_NEW_FILES}";
104-
set_status "failure" "$STATUSM";
92+
echo "License check failed, new files with the license issues found";
10593
false;
10694
else
10795
echo "License check failed, please review license issues found in modified files";
108-
STATUSM="Needs review, ${COUNT} license issues found";
109-
set_status "success" "$STATUSM";
11096
false;
11197
fi
11298
113-
114-
11599
- <<: *basic-vm
116100
name: "include check"
117101
env: NAME=include_check
@@ -305,20 +289,6 @@ matrix:
305289
# Run profiling tests
306290
- make -C ${EVENTS}/tests/unit prof | tee prof
307291
- ccache -s
308-
after_success:
309-
# Update status, comparing with master if possible.
310-
- |
311-
CURR=$(grep -o '[0-9]\+ cycles' prof | awk '{sum += $1} END {print sum}')
312-
PREV=$(curl -u "${MBED_BOT}" https://api.github.com/repos/${TRAVIS_REPO_SLUG}/status/master \
313-
| jq -re "select(.sha != \"${TRAVIS_COMMIT}\")
314-
| .statuses[] | select(.context == \"travis-ci/${NAME}\").description
315-
| capture(\"runtime is (?<runtime>[0-9]+)\").runtime" \
316-
|| echo 0)
317-
318-
delta=""
319-
[ "${PREV}" -ne 0 ] && delta="($(printf "%+d" "$(( ${CURR} - ${PREV} ))" cycles)"
320-
321-
set_status "success" "Success! Runtime is ${CURR} cycles. ${delta}"
322292

323293
- <<: *extended-vm
324294
name: "littlefs"
@@ -379,17 +349,3 @@ matrix:
379349
CFLAGS+="-DLFS_NO_ASSERT -DLFS_NO_DEBUG -DLFS_NO_WARN -DLFS_NO_ERROR"
380350
| tee sizes
381351
- ccache -s
382-
after_success:
383-
# Update status, comparing with master if possible.
384-
- |
385-
CURR=$(tail -n1 sizes | awk '{print $1}')
386-
PREV=$(curl -u "${MBED_BOT}" https://api.github.com/repos/${TRAVIS_REPO_SLUG}/status/master \
387-
| jq -re "select(.sha != \"${TRAVIS_COMMIT}\")
388-
| .statuses[] | select(.context == \"travis-ci/${NAME}\").description
389-
| capture(\"code size is (?<size>[0-9]+)\").size" \
390-
|| echo 0)
391-
392-
delta=""
393-
[ "${PREV}" -ne 0 ] && delta="($(printf "%+0.2f%%" "$(<<< "100 * ((${CURR} - ${PREV})/${PREV})" bc -l)"))"
394-
395-
set_status "success" "Success! Code size is ${CURR}B. ${delta}"

0 commit comments

Comments
 (0)