]> granicus.if.org Git - icu/commitdiff
ICU-22193 Make clang-release-build-and-test work with ubuntu-latest.
authorFredrik Roubert <roubert@google.com>
Fri, 16 Dec 2022 05:59:41 +0000 (14:59 +0900)
committerFredrik Roubert <fredrik@roubert.name>
Mon, 19 Dec 2022 01:56:01 +0000 (10:56 +0900)
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.

.github/workflows/icu_ci.yml
icu4c/source/test/hdrtst/testtagsguards.sh

index b5871b7b5c95e4049d285239521c8c7c17c4b5ef..2153fe1fa548f0ecbd8ea94404ff7f13eb935531 100644 (file)
@@ -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
 
index a432538a058d225dd7cf688d9cc0aef1eb459f20..19d6c341d858b01d0585c7b9bf3b7b26636f951b 100755 (executable)
@@ -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