Adjusted CI configuration to handle 'en' and 'zh_CN' language versions
This commit is contained in:
parent
56d5647d3f
commit
c63d7a4b5e
|
@ -196,19 +196,26 @@ build_docs:
|
||||||
artifacts:
|
artifacts:
|
||||||
when: always
|
when: always
|
||||||
paths:
|
paths:
|
||||||
- docs/doxygen-warning-log.txt
|
# English version of documentation
|
||||||
- docs/sphinx-warning-log.txt
|
- docs/en/doxygen-warning-log.txt
|
||||||
- docs/sphinx-warning-log-sanitized.txt
|
- docs/en/sphinx-warning-log.txt
|
||||||
- docs/_build/html
|
- 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
|
expire_in: 1 mos
|
||||||
script:
|
script:
|
||||||
- cd docs
|
- cd docs/en
|
||||||
- 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 )
|
|
||||||
- make gh-linkcheck
|
- make gh-linkcheck
|
||||||
- make html
|
- 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:
|
test_nvs_on_host:
|
||||||
stage: test
|
stage: test
|
||||||
|
|
|
@ -2,8 +2,7 @@
|
||||||
#
|
#
|
||||||
# Check for Documentation warnings:
|
# Check for Documentation warnings:
|
||||||
# doxygen-warning-log.txt should be an empty file
|
# doxygen-warning-log.txt should be an empty file
|
||||||
# sphinx-warning-log.txt should only contain (fuzzy) matches to sphinx-known-warnings.txt
|
# sphinx-warning-log.txt should only contain (fuzzy) matches to ../sphinx-known-warnings.txt
|
||||||
cd "$(dirname $0)"
|
|
||||||
RESULT=0
|
RESULT=0
|
||||||
STARS='***************************************************'
|
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~${IDF_PATH}~\${IDF_PATH}~" | \
|
||||||
sed -E "s/:[0-9]+:/:line:/" > sphinx-warning-log-sanitized.txt
|
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
|
# format is to display only lines new or changed in second argument
|
||||||
DIFF_FORMAT="--unchanged-line-format= --old-line-format= --new-line-format=%L"
|
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
|
if ! [ -z "$SPHINX_WARNINGS" ]; then
|
||||||
echo "$STARS"
|
echo "$STARS"
|
||||||
echo "Build failed due to new/different Sphinx warnings:"
|
echo "Build failed due to new/different Sphinx warnings:"
|
||||||
echo "$SPHINX_WARNINGS"
|
echo "$SPHINX_WARNINGS"
|
||||||
echo "$STARS"
|
echo "$STARS"
|
||||||
RESULT=1
|
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
|
fi
|
||||||
|
|
||||||
exit $RESULT
|
exit $RESULT
|
||||||
|
|
Loading…
Reference in a new issue