Adjusted CI configuration to handle 'en' and 'zh_CN' language versions

This commit is contained in:
krzychb 2018-02-03 22:12:13 +01:00
parent 56d5647d3f
commit c63d7a4b5e
2 changed files with 20 additions and 14 deletions

View File

@ -196,19 +196,26 @@ build_docs:
artifacts:
when: always
paths:
- docs/doxygen-warning-log.txt
- docs/sphinx-warning-log.txt
- docs/sphinx-warning-log-sanitized.txt
- docs/_build/html
# English version of documentation
- docs/en/doxygen-warning-log.txt
- docs/en/sphinx-warning-log.txt
- docs/en/sphinx-warning-log-sanitized.txt
- docs/en/_build/html
# Chinese version of documentation
- docs/zh_CN/doxygen-warning-log.txt
- docs/zh_CN/sphinx-warning-log.txt
- docs/zh_CN/sphinx-warning-log-sanitized.txt
- docs/zh_CN/_build/html
expire_in: 1 mos
script:
- cd docs
- doxygen
# If there are Doxygen warnings, print them and bail out
- test $(cat doxygen-warning-log.txt | wc -l) -eq 0 || ( echo "Doxygen pass had some warnings:" && cat doxygen-warning-log.txt && false )
- cd docs/en
- make gh-linkcheck
- make html
- ./check_doc_warnings.sh
- ../check_doc_warnings.sh
- cd ../zh_CN
- make gh-linkcheck
- make html
- ../check_doc_warnings.sh
test_nvs_on_host:
stage: test

View File

@ -2,8 +2,7 @@
#
# Check for Documentation warnings:
# doxygen-warning-log.txt should be an empty file
# sphinx-warning-log.txt should only contain (fuzzy) matches to sphinx-known-warnings.txt
cd "$(dirname $0)"
# sphinx-warning-log.txt should only contain (fuzzy) matches to ../sphinx-known-warnings.txt
RESULT=0
STARS='***************************************************'
@ -22,19 +21,19 @@ sed -r 's:\x1B\[[0-9;]*[mK]::g' sphinx-warning-log.txt | \
sed -E "s~${IDF_PATH}~\${IDF_PATH}~" | \
sed -E "s/:[0-9]+:/:line:/" > sphinx-warning-log-sanitized.txt
# diff sanitized warnings, ignoring lines which only appear in sphinx-known-warnings.txt
# diff sanitized warnings, ignoring lines which only appear in ../sphinx-known-warnings.txt
# format is to display only lines new or changed in second argument
DIFF_FORMAT="--unchanged-line-format= --old-line-format= --new-line-format=%L"
SPHINX_WARNINGS=$(diff $DIFF_FORMAT sphinx-known-warnings.txt sphinx-warning-log-sanitized.txt)
SPHINX_WARNINGS=$(diff $DIFF_FORMAT ../sphinx-known-warnings.txt sphinx-warning-log-sanitized.txt)
if ! [ -z "$SPHINX_WARNINGS" ]; then
echo "$STARS"
echo "Build failed due to new/different Sphinx warnings:"
echo "$SPHINX_WARNINGS"
echo "$STARS"
RESULT=1
echo "(Check files sphinx-known-warnings.txt and sphinx-warning-log.txt for full details.)"
echo "(Check files ../sphinx-known-warnings.txt and sphinx-warning-log.txt for full details.)"
fi
exit $RESULT