From c63d7a4b5e484d520b7d99af95e2154ad35bf36c Mon Sep 17 00:00:00 2001 From: krzychb Date: Sat, 3 Feb 2018 22:12:13 +0100 Subject: [PATCH] Adjusted CI configuration to handle 'en' and 'zh_CN' language versions --- .gitlab-ci.yml | 25 ++++++++++++++++--------- docs/check_doc_warnings.sh | 9 ++++----- 2 files changed, 20 insertions(+), 14 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 09711b6b75..f398583047 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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 diff --git a/docs/check_doc_warnings.sh b/docs/check_doc_warnings.sh index 4107b9929e..87bf6b3974 100755 --- a/docs/check_doc_warnings.sh +++ b/docs/check_doc_warnings.sh @@ -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