From 8078ae4937ac507b20dc613fb739d29a1c887d15 Mon Sep 17 00:00:00 2001 From: gnrunge Date: Fri, 11 Dec 2020 12:17:31 -0800 Subject: [PATCH] ICU-21434 First version of a GitHub Action CI script. Contains selected CI targets migrated from Travis CI. ICU-21434 Shorten the GitHub Action name to ICU CI only to leave more space on the dashboard. ICU-21434 Review comments: better name, and one line turned out to be a no-op. ICU-21434 Fix Java JDK version setting. ICU-21434 Sort out Java version setting. ICU-21434 Adds an entry to icu4c/source/test/depstest/dependencies.txt to fix depstest and enable depstest. --- .github/workflows/icu_ci.yml | 80 +++++++++++++++++++++ icu4c/source/test/depstest/dependencies.txt | 2 + 2 files changed, 82 insertions(+) create mode 100644 .github/workflows/icu_ci.yml diff --git a/.github/workflows/icu_ci.yml b/.github/workflows/icu_ci.yml new file mode 100644 index 00000000000..9e67b091557 --- /dev/null +++ b/.github/workflows/icu_ci.yml @@ -0,0 +1,80 @@ +# Copyright (C) 2016 and later: Unicode, Inc. and others. +# License & terms of use: http://www.unicode.org/copyright.html +# +# GitHub Action configuration script for ICU continuous integration tasks. + +name: GHA CI + +on: + push: + branches: [ master ] + pull_request: + branches: '*' + +jobs: + + # ICU4J build and unit test + icu4j-build-and-test: + runs-on: ubuntu-latest + steps: + - name: Checkout and setup + uses: actions/checkout@v2 + with: + lfs: true + - name: Checkout lfs objects + run: git lfs pull + - uses: actions/setup-java@v1 + with: + java-version: '11' + - name: ICU4J + run: | + cd icu4j; + ant init; + ant check; + + # clang release build with some options to enforce useful constraints. + # Includes dependency checker on an in-source, optimized build. + # Includes checking @draft etc. API tags vs. ifndef guards like + # U_HIDE_DRAFT_API and U_FORCE_HIDE_DRAFT_API. + # (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-latest + steps: + - uses: actions/checkout@v2 + + - name: ICU4C with clang + run: | + sudo apt-get -y install doxygen; + cd icu4c/source; + ./runConfigureICU Linux --enable-layoutex=no; + make -j 2; + make -j 2 check; + ( cd test/depstest && python3 depstest.py ../../../source/ ); + ( cd .. && source/test/hdrtst/testtagsguards.sh ); + make dist + env: + CPPFLAGS: -DU_NO_DEFAULT_INCLUDE_UTF_HEADERS=1 + CFLAGS: -Wimplicit-fallthrough + CXXFLAGS: -Wimplicit-fallthrough + + # Copyright scan + copyright-scan: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - run: perl tools/scripts/cpysearch/cpyscan.pl + + # Check compilation of internal headers. + internal-header-compilation: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - run: cd icu4c/source; test/hdrtst/testinternalheaders.sh + + # Check source files for valid UTF-8 and for absence of BOM. + valid-UTF-8-and-no-BOM-check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - run: tools/scripts/icu-file-utf8-check.py diff --git a/icu4c/source/test/depstest/dependencies.txt b/icu4c/source/test/depstest/dependencies.txt index 9367f1630dc..c8c39711384 100644 --- a/icu4c/source/test/depstest/dependencies.txt +++ b/icu4c/source/test/depstest/dependencies.txt @@ -58,6 +58,8 @@ group: c_strings # We must not use tolower and toupper because they are system-locale-sensitive (Turkish i). strlen strchr strrchr strstr strcmp strncmp strcpy strncpy strcat strncat memchr memcmp memcpy memmove memset + # BSD version of memcmp(). + bcmp # Additional symbols in an optimized build. __strcpy_chk __strncpy_chk __strcat_chk __strncat_chk __rawmemchr __memcpy_chk __memmove_chk __memset_chk