From: Fredrik Roubert Date: Fri, 16 Dec 2022 05:59:41 +0000 (+0900) Subject: ICU-22193 Make clang-release-build-and-test work with ubuntu-latest. X-Git-Tag: cldr/2023-02-02~20 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=82115c060f14dc68601ccd66bcb2fa6e6918d926;p=icu ICU-22193 Make clang-release-build-and-test work with ubuntu-latest. Contemporary implementations of the C++ standard library also use the @deprecated annotation in its header files and these then get included by the preprocessor when preprocessing the ICU header files, like this: /// @deprecated Non-standard. Use `is_null_pointer` instead. In order to work as expected, testtagsguards.sh must therefore be updated to ignore @deprecated annotations unless they're for ICU. --- diff --git a/.github/workflows/icu_ci.yml b/.github/workflows/icu_ci.yml index b5871b7b5c9..2153fe1fa54 100644 --- a/.github/workflows/icu_ci.yml +++ b/.github/workflows/icu_ci.yml @@ -224,7 +224,7 @@ jobs: # (FORCE guards make this tool pass but won't compile to working code. # See the testtagsguards.sh script for details.) clang-release-build-and-test: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 diff --git a/icu4c/source/test/hdrtst/testtagsguards.sh b/icu4c/source/test/hdrtst/testtagsguards.sh index a432538a058..19d6c341d85 100755 --- a/icu4c/source/test/hdrtst/testtagsguards.sh +++ b/icu4c/source/test/hdrtst/testtagsguards.sh @@ -45,7 +45,7 @@ for file in source/common/unicode/*.h source/i18n/unicode/*.h source/io/unicode/ GUARD=DEPRECATED echo " @$TAG" $CXX $INCL -C -E -DU_HIDE_${GUARD}_API=1 -DU_FORCE_HIDE_${GUARD}_API=1 $DEF -o $TMPDIR/ht-$base-$TAG.i $TMPDIR/ht-$base.cpp - if grep "@$TAG" -C 5 $TMPDIR/ht-$base-$TAG.i; then + if grep "@$TAG\b.*\bICU\b" -C 5 $TMPDIR/ht-$base-$TAG.i; then echo "*** error: @$TAG not hidden in $TMPDIR/ht-$base-$TAG.i" exit 1 fi