diff --git a/.ci-builds/.azure-exhaustive-tests.yml b/.ci-builds/.azure-exhaustive-tests.yml deleted file mode 100644 index 92b3b7d6567b..000000000000 --- a/.ci-builds/.azure-exhaustive-tests.yml +++ /dev/null @@ -1,81 +0,0 @@ -# Azure Pipelines configuration for Exhaustive Tests for ICU. -# -# Note: The exhaustive test configuration is in a separate file -# so that it can be run independently from the regular builds. -# -# Only run the exhaustive tests on the main and maint branches, and -# also batch up any pending changes so that we will only have at most -# one build running at a given time (since they take a long time). -trigger: - # batch=true to reduce number of concurrent runs on the same branch: - # https://learn.microsoft.com/en-us/azure/devops/pipelines/yaml-schema/trigger?view=azure-pipelines#properties - # potential future feature to supersede batch=true: - # https://learn.microsoft.com/en-us/azure/devops/pipelines/process/stages?view=azure-devops&tabs=yaml#specify-queuing-policies - batch: true - branches: - include: - - main - - maint/maint-* - paths: - include: - - '*' - exclude: - - .github/* - - .ci-builds/.azure-pipelines-icu4c.yml - - .ci-builds/.azure-pipelines-icu4j.yml - - .ci-builds/.azure-valgrind.yml - - docs/* - - tools/* - - vendor/* - - .cpyskip.txt - - .travis.yml - - KEYS - - README.md - -variables: - MAVEN_ARGS: '--show-version --no-transfer-progress' - -jobs: -#------------------------------------------------------------------------- -# Note: The exhaustive tests can take more than 1 hour to complete. -- job: ICU4J_OpenJDK_Ubuntu_2204 - displayName: 'J: Linux OpenJDK (Ubuntu 22.04)' - timeoutInMinutes: 180 - pool: - vmImage: 'ubuntu-22.04' - demands: ant - steps: - - checkout: self - lfs: true - fetchDepth: 10 - - script: | - echo "Building ICU4J" && cd icu4j && mvn install -DICU.exhaustive=10 - displayName: 'Build and Exhaustive Tests' - env: - BUILD: ICU4J - - script: | - cd icu4j && cat `find . -name surefire-reports -type d -exec grep -l -r --include="*.txt" FAILED {} \;` - condition: failed() # only run if the build fails. - displayName: 'List failures (if any)' - timeoutInMinutes: 2 -#------------------------------------------------------------------------- -# Note: The exhaustive tests can take more than 1 hour to complete. -- job: ICU4C_Clang_Exhaustive_Ubuntu_2204 - displayName: 'C: Linux Clang Exhaustive Tests (Ubuntu 22.04)' - timeoutInMinutes: 120 - pool: - vmImage: 'ubuntu-22.04' - steps: - - checkout: self - lfs: true - fetchDepth: 10 - - script: | - cd icu4c/source && ./runConfigureICU Linux && make -j -l2.5 - displayName: 'Build' - - script: | - cd icu4c/source && make check-exhaustive - displayName: 'Exhaustive Tests' - env: - CC: clang - CXX: clang++ -#------------------------------------------------------------------------- diff --git a/.ci-builds/.azure-pipelines-icu4c.yml b/.ci-builds/.azure-pipelines-icu4c.yml index 2c7e675aa0ce..7b8b259003dc 100644 --- a/.ci-builds/.azure-pipelines-icu4c.yml +++ b/.ci-builds/.azure-pipelines-icu4c.yml @@ -667,4 +667,4 @@ jobs: displayName: 'Run Tests (icucheck.bat)' inputs: filename: icu4c/source/allinone/icucheck.bat - arguments: 'x64 Release' + arguments: 'x64 Release' \ No newline at end of file diff --git a/.ci-builds/data-filter.json b/.github/data-filter.json similarity index 100% rename from .ci-builds/data-filter.json rename to .github/data-filter.json diff --git a/.github/workflows/icu4c.yml b/.github/workflows/icu4c.yml index 01a1fda21082..0340cadc1ce8 100644 --- a/.github/workflows/icu4c.yml +++ b/.github/workflows/icu4c.yml @@ -1,7 +1,7 @@ -# 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. +# # 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 ICU4C @@ -34,211 +34,311 @@ permissions: jobs: - # ICU4C docs build using doxygen.. - icu4c-docs-build: +# # ICU4C docs build using doxygen.. +# icu4c-docs-build: +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + +# - name: ICU4C doc +# run: | +# sudo apt-get -y install doxygen; +# cd icu4c/source; +# ./runConfigureICU Linux --disable-renaming; +# # Fail if 'warning:' appears in doxygen's output, but ignore warnings from file Doxyfile. +# # Regex note: (?! ... ) is a negative lookahead. Succeed if the pattern is not present. +# set +o pipefail && make doc 2>&1 | tee doxygen.log && ( ! grep -P 'warning:(?! .* file .?Doxyfile)' doxygen.log ) + +# # gcc debug build. +# # Includes dependency checker. +# # Note - the dependency checker needs to be run on both a debug and an optimized build. +# # This one (gcc) for debug, and linux clang (see job below) for optimized. +# # +# # Test both out-of-source and in-source builds. This one (gcc) for out-of-source, +# # and linux clang (below) for in-source. +# # +# # Invokes test/hdrtst to check public headers compliance. +# gcc-debug-build-and-test: +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + +# - name: ICU4C with gcc +# env: +# PREFIX: /tmp/icu-prefix +# run: | +# mkdir build; +# cd build; +# ../icu4c/source/runConfigureICU --enable-debug --disable-release Linux/gcc --prefix=$PREFIX --enable-tracing; +# make -j -l4.5 check; +# ( cd ../icu4c/source/test/depstest && ./depstest.py ../../../../build/ ); +# make install; +# PATH=$PREFIX/bin:$PATH make -C test/hdrtst check + +# #gcc 11 with c++ 20 +# gcc11-cpp20: +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 +# - name: Install GCC-11 +# run: | +# sudo add-apt-repository ppa:ubuntu-toolchain-r/test +# sudo apt update +# sudo apt install gcc-11 g++-11 +# - name: Build and Test +# env: +# CC: gcc-11 +# CXX: g++-11 +# CXXFLAGS: -std=c++20 -fext-numeric-literals +# run: | +# cd icu4c/source; +# ./runConfigureICU Linux +# make -j -l4.5 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@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + +# - name: Install doxygen +# run: | +# sudo apt-get -y install doxygen; +# - name: Build ICU4C with clang +# env: +# CPPFLAGS: -DU_NO_DEFAULT_INCLUDE_UTF_HEADERS=1 +# CFLAGS: -Wimplicit-fallthrough +# CXXFLAGS: -Wimplicit-fallthrough +# run: | +# cd icu4c/source; +# ./runConfigureICU Linux/clang; +# make -j -l4.5 check; +# - name: Test Dependency +# run: | +# cd icu4c/source/test/depstest; +# python3 depstest.py ../../../source/; +# - name: Test Tags Guards +# run: | +# cd icu4c; +# source/test/hdrtst/testtagsguards.sh; +# - name: Test C Default locale +# run: | +# cd icu4c/source/test/cintltst && LANG=C LD_LIBRARY_PATH=../../lib:../../tools/ctestfw ./cintltst /tsutil/cloctst/TestCDefaultLocale +# - name: Test C.UTF-8 Default locale +# run: | +# cd icu4c/source/test/cintltst && LANG=C.UTF-8 LD_LIBRARY_PATH=../../lib:../../tools/ctestfw ./cintltst /tsutil/cloctst/TestCDefaultLocale +# - name: Make Dist +# env: +# CPPFLAGS: -DU_NO_DEFAULT_INCLUDE_UTF_HEADERS=1 +# CFLAGS: -Wimplicit-fallthrough +# CXXFLAGS: -Wimplicit-fallthrough +# run: | +# cd icu4c/source; +# make dist + +# # clang build with some options +# clang-options-build-and-test: +# strategy: +# # "fail-fast: false" lets other jobs keep running even if the test breaks in some other options. +# fail-fast: false +# matrix: +# build_option: +# [ --enable-static, --enable-static --disable-shared ] +# # --disable-shared has a build problem. +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + +# - name: Build ICU4C with clang +# run: | +# cd icu4c/source; +# ./runConfigureICU Linux/clang ${{ matrix.build_option }}; +# make -j -l4.5 tests; +# - name: Test +# run: | +# cd icu4c/source; +# make check; + +# # Out of source build with gcc 10, c++14, and extra warnings; executes icuinfo. +# gcc-10-stdlib17: +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + +# - name: ICU4C with gcc 10 and c++17 and extra warnings. +# env: +# PREFIX: /tmp/icu-prefix +# CC: gcc-10 +# CXX: g++-10 +# CXXFLAGS: -std=c++17 -Wextra +# run: | +# mkdir build; +# cd build; +# ../icu4c/source/runConfigureICU Linux --disable-layout --disable-layoutex --prefix=$PREFIX; +# make -j -l4.5 check; +# make -j -l4.5 install; +# cd $PREFIX/bin; +# LD_LIBRARY_PATH=../lib ./icuinfo + +# # Clang Linux with address sanitizer. +# clang-asan: +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + +# - name: ICU4C with clang and asan +# run: | +# cd icu4c/source; +# ./runConfigureICU --enable-debug --disable-release Linux/clang --disable-renaming --enable-tracing; +# make -j -l4.5 check; +# env: +# CPPFLAGS: -fsanitize=address +# LDFLAGS: -fsanitize=address +# # Clang Linux with leak sanitizer. +# clang-lsan: +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + +# - name: ICU4C with clang and lsan +# run: | +# cd icu4c/source; +# ./runConfigureICU --enable-debug --disable-release Linux/clang --disable-renaming --enable-tracing; +# make -j -l4.5 check; +# env: +# CPPFLAGS: -fsanitize=leak +# LDFLAGS: -fsanitize=leak +# ASAN_OPTIONS: detect_leaks=1 +# # Clang Linux with undefined-behavior sanitizer. +# clang-ubsan: +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + +# - name: ICU4C with clang and ubsan +alignment +# run: | +# cd icu4c/source; +# ./runConfigureICU --enable-debug --disable-release Linux/clang --disable-renaming; +# make -j -l4.5 check; +# env: +# CPPFLAGS: -fsanitize=undefined -fsanitize=alignment -fno-sanitize-recover=undefined,alignment +# CFLAGS: -fsanitize=undefined -fsanitize=alignment -fno-sanitize-recover=undefined,alignment +# LDFLAGS: -fsanitize=undefined -fsanitize=alignment -fno-sanitize-recover=undefined,alignment +# # Control Flow Integrity. +# clang-cfi: +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + +# - name: ICU4C with clang using CFI +# run: | +# cd icu4c/source; +# ./runConfigureICU Linux --disable-renaming; +# make -j -l4.5 check; +# env: +# CC: clang +# CXX: clang++ +# # add -fsanitize=cfi-vcall -fsanitize=cfi-icall later +# CXXFLAGS: -flto -fvisibility=hidden -fsanitize=cfi-derived-cast -fno-sanitize-trap=cfi -fno-inline-functions -fno-inline -fno-omit-frame-pointer -O1 +# # add -fsanitize=cfi-vcall -fsanitize=cfi-icall later +# LDFLAGS: -flto -fvisibility=hidden -fuse-ld=gold -fsanitize=cfi-derived-cast -fsanitize=cfi-unrelated-cast -fno-sanitize-trap=cfi -fsanitize-cfi-icall-generalize-pointers + +# # Clang Linux with thread sanitizer. +# clang-tsan: +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + +# - name: ICU4C with clang and tsan +# run: | +# cd icu4c/source; +# ./runConfigureICU --enable-debug --disable-release Linux/clang --disable-renaming +# make -j -l4.5; +# make -j -l4.5 -C test; +# make -j -l4.5 -C test/intltest check +# env: +# INTLTEST_OPTS: utility/MultithreadTest +# CPPFLAGS: -fsanitize=thread +# LDFLAGS: -fsanitize=thread + + #------------------------------------------------------ + # Clang Linux with data filter + # Note: This job uses `make -j2` instead of `make -j -l4.5` because with more parallelism (PR #2456) + # this check became flaky. The build apparently was not done copying one or another .ucm file before + # calling makeconv for it, although the Makefile has appropriate dependencies. + clang-datafilter: runs-on: ubuntu-latest steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - - name: ICU4C doc - run: | - sudo apt-get -y install doxygen; - cd icu4c/source; - ./runConfigureICU Linux --disable-renaming; - # Fail if 'warning:' appears in doxygen's output, but ignore warnings from file Doxyfile. - # Regex note: (?! ... ) is a negative lookahead. Succeed if the pattern is not present. - set +o pipefail && make doc 2>&1 | tee doxygen.log && ( ! grep -P 'warning:(?! .* file .?Doxyfile)' doxygen.log ) - - # gcc debug build. - # Includes dependency checker. - # Note - the dependency checker needs to be run on both a debug and an optimized build. - # This one (gcc) for debug, and linux clang (see job below) for optimized. - # - # Test both out-of-source and in-source builds. This one (gcc) for out-of-source, - # and linux clang (below) for in-source. - # - # Invokes test/hdrtst to check public headers compliance. - gcc-debug-build-and-test: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - - name: ICU4C with gcc - env: - PREFIX: /tmp/icu-prefix - run: | - mkdir build; - cd build; - ../icu4c/source/runConfigureICU --enable-debug --disable-release Linux/gcc --prefix=$PREFIX --enable-tracing; - make -j -l4.5 check; - ( cd ../icu4c/source/test/depstest && ./depstest.py ../../../../build/ ); - make install; - PATH=$PREFIX/bin:$PATH make -C test/hdrtst 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@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - - name: Install doxygen + - name: Extract ICU version run: | - sudo apt-get -y install doxygen; + # Extract ICU version from icuver.txt + icuverContent=$(cat icu4c/source/data/misc/icuver.txt) + icuVersion=$(echo "$icuverContent" | grep -oP 'ICUVersion\{"\K\d+\.\d+\.\d+\.\d+') + majorVersion=$(echo "$icuVersion" | cut -d. -f1) + echo "majorVersion=$majorVersion" + echo "majorVersion=$majorVersion" >> $GITHUB_ENV - name: Build ICU4C with clang - env: - CPPFLAGS: -DU_NO_DEFAULT_INCLUDE_UTF_HEADERS=1 - CFLAGS: -Wimplicit-fallthrough - CXXFLAGS: -Wimplicit-fallthrough - run: | - cd icu4c/source; - ./runConfigureICU Linux/clang; - make -j -l4.5 check; - - name: Test Dependency - run: | - cd icu4c/source/test/depstest; - python3 depstest.py ../../../source/; - - name: Test Tags Guards - run: | - cd icu4c; - source/test/hdrtst/testtagsguards.sh; - - name: Make Dist - env: - CPPFLAGS: -DU_NO_DEFAULT_INCLUDE_UTF_HEADERS=1 - CFLAGS: -Wimplicit-fallthrough - CXXFLAGS: -Wimplicit-fallthrough - run: | - cd icu4c/source; - make dist - - # clang build with some options - clang-options-build-and-test: - strategy: - # "fail-fast: false" lets other jobs keep running even if the test breaks in some other options. - fail-fast: false - matrix: - build_option: - [ --enable-static, --enable-static --disable-shared ] - # --disable-shared has a build problem. - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - - name: Build ICU4C with clang - run: | - cd icu4c/source; - ./runConfigureICU Linux/clang ${{ matrix.build_option }}; - make -j -l4.5 tests; - - name: Test - run: | - cd icu4c/source; - make check; - - # Out of source build with gcc 10, c++14, and extra warnings; executes icuinfo. - gcc-10-stdlib17: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - - name: ICU4C with gcc 10 and c++17 and extra warnings. - env: - PREFIX: /tmp/icu-prefix - CC: gcc-10 - CXX: g++-10 - CXXFLAGS: -std=c++17 -Wextra run: | - mkdir build; - cd build; - ../icu4c/source/runConfigureICU Linux --disable-layout --disable-layoutex --prefix=$PREFIX; - make -j -l4.5 check; - make -j -l4.5 install; - cd $PREFIX/bin; - LD_LIBRARY_PATH=../lib ./icuinfo - - # Clang Linux with address sanitizer. - clang-asan: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - - name: ICU4C with clang and asan - run: | - cd icu4c/source; - ./runConfigureICU --enable-debug --disable-release Linux/clang --disable-renaming --enable-tracing; - make -j -l4.5 check; - env: - CPPFLAGS: -fsanitize=address - LDFLAGS: -fsanitize=address - # Clang Linux with leak sanitizer. - clang-lsan: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - - name: ICU4C with clang and lsan - run: | - cd icu4c/source; - ./runConfigureICU --enable-debug --disable-release Linux/clang --disable-renaming --enable-tracing; - make -j -l4.5 check; - env: - CPPFLAGS: -fsanitize=leak - LDFLAGS: -fsanitize=leak - ASAN_OPTIONS: detect_leaks=1 - # Clang Linux with undefined-behavior sanitizer. - clang-ubsan: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - - name: ICU4C with clang and ubsan +alignment - run: | - cd icu4c/source; - ./runConfigureICU --enable-debug --disable-release Linux/clang --disable-renaming; - make -j -l4.5 check; - env: - CPPFLAGS: -fsanitize=undefined -fsanitize=alignment -fno-sanitize-recover=undefined,alignment - CFLAGS: -fsanitize=undefined -fsanitize=alignment -fno-sanitize-recover=undefined,alignment - LDFLAGS: -fsanitize=undefined -fsanitize=alignment -fno-sanitize-recover=undefined,alignment - # Control Flow Integrity. - clang-cfi: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - - name: ICU4C with clang using CFI - run: | - cd icu4c/source; - ./runConfigureICU Linux --disable-renaming; - make -j -l4.5 check; - env: - CC: clang - CXX: clang++ - # add -fsanitize=cfi-vcall -fsanitize=cfi-icall later - CXXFLAGS: -flto -fvisibility=hidden -fsanitize=cfi-derived-cast -fno-sanitize-trap=cfi -fno-inline-functions -fno-inline -fno-omit-frame-pointer -O1 - # add -fsanitize=cfi-vcall -fsanitize=cfi-icall later - LDFLAGS: -flto -fvisibility=hidden -fuse-ld=gold -fsanitize=cfi-derived-cast -fsanitize=cfi-unrelated-cast -fno-sanitize-trap=cfi -fsanitize-cfi-icall-generalize-pointers - - # Clang Linux with thread sanitizer. - clang-tsan: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - - name: ICU4C with clang and tsan - run: | - cd icu4c/source; - ./runConfigureICU --enable-debug --disable-release Linux/clang --disable-renaming - make -j -l4.5; - make -j -l4.5 -C test; - make -j -l4.5 -C test/intltest check - env: - INTLTEST_OPTS: utility/MultithreadTest - CPPFLAGS: -fsanitize=thread - LDFLAGS: -fsanitize=thread + cd icu4c/source && \ + ICU_DATA_FILTER_FILE=../../.github/data-filter.json ./runConfigureICU Linux/clang && \ + make -j2 tests && \ + \[ ! -d data/out/build/icudt${majorVersion}l/translit \] && \ + (cd test/intltest && LD_LIBRARY_PATH=../../lib:../../tools/ctestfw ./intltest translit/TransliteratorTest/TestBasicTransliteratorEvenWithoutData) && \ + (cd test/cintltst && LANG=C LD_LIBRARY_PATH=../../lib:../../tools/ctestfw ./cintltst /tsutil/cloctst/TestEnglishExemplarCharacters /tsutil/cldrtest/TestCoverage) + +# # Clang Linux with CPP 17 +# clang-cpp17: +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 +# - name: Build ICU4C with CPP 17 +# env: +# CXXFLAGS: -std=c++17 -Winvalid-constexpr +# run: | +# cd icu4c/source && ./runConfigureICU --enable-debug --disable-release Linux/clang && make -j -l4.5 check + +# # Clang Linux with LANG: en_US@calendar=gregorian;hours=h12 +# clang-lang-with-extn-tags: +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 +# - name: Linux Clang - LANG has extension tags +# env: +# LANG: "en_US@calendar=gregorian;hours=h12" +# run: | +# cd icu4c/source && ./runConfigureICU --enable-debug --disable-release Linux/clang && make -j -l4.5 check + + # Clang Linux 16 with CPP20 and treat warnings as errors + clang16-cpp20-warning-as-errors: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + flags: + - '-std=c++20' + - '-std=c++20 -stdlib=libc++' + steps: + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + - name: Install Clang-16 + run: | + curl -Ls https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - + sudo apt-add-repository 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-16 main' + sudo apt update + sudo apt install -qy clang-16 lld-16 libc++-16-dev libc++abi-16-dev + - name: Clang-16 build and Test + env: + CC: clang-16 + CXX: clang++-16 + CPPFLAGS: '-Wall -Wextra -Wno-strict-prototypes -Wctad-maybe-unsupported -Werror -Wno-error=strict-prototypes' # + CXXFLAGS: ${{ matrix.flags }} + run: | + cd icu4c/source && ./runConfigureICU --enable-debug --disable-release Linux/clang && make -j -l4.5 check # MacOS with clang macos-clang: @@ -247,349 +347,657 @@ jobs: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: ICU4C with clang on MacOS + env: + CPPFLAGS: '-Wall -Wextra -Wextra-semi -Wundef -Wnon-virtual-dtor -Wctad-maybe-unsupported -Werror -Wno-error=strict-prototypes' # -Werror TODO: uncomment warnings as errors run: | cd icu4c/source; PYTHON=python3 ./runConfigureICU MacOSX; - make -j -l4.5 check - - # Run ICU4C tests with stubdata. - run-with-stubdata: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - - name: ICU4C tests with stubdata - run: | - cd icu4c/source; - ./runConfigureICU Linux; - make -j -l4.5 check; - rm lib/libicudata.so*; - cp -P stubdata/libicudata.so* lib; - - cd test/cintltst; - echo 'Running ICU4C cintltst with stubdata.'; - # Note: 'Elapsed Time: ' is printed by makefile upon final success. - CINTLTST_OPTS=-w make -j -l4.5 check 2>&1 | tee stubdata_ctest.log; - if ! grep 'Elapsed Time: ' stubdata_ctest.log - then - echo - echo cintltst run with stubdata failed - echo - echo See - echo https://unicode-org.github.io/icu/processes/release/tasks/integration.html#run-tests-without-icu-data - echo for how to reproduce and debug the failure - exit 1 - fi - - cd ../intltest; - echo 'Running ICU4C intltest with stubdata.'; - INTLTEST_OPTS=-w make -j -l4.5 check 2>&1 | tee stubdata_intltest.log; - if ! grep 'Elapsed Time: ' stubdata_intltest.log - then - echo - echo intltest run with stubdata failed - echo - echo See - echo https://unicode-org.github.io/icu/processes/release/tasks/integration.html#run-tests-without-icu-data - echo for how to reproduce and debug the failure - exit 1 - fi - - # Test U_CHARSET_IS_UTF8 - u-charset-is-utf8-test: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - run: | - cd icu4c/source; - ./runConfigureICU Linux CPPFLAGS="-DU_CHARSET_IS_UTF8=1"; - make -j -l4.5 check - - # Test U_OVERRIDE_CXX_ALLOCATION-is-0-test - u-override-cxx-allocation-is-0-test: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - run: | - cd icu4c/source; - ./runConfigureICU Linux CPPFLAGS="-DU_OVERRIDE_CXX_ALLOCATION=0"; - make clean; - make -j -l4.5 check - - # Test LSTM - lstm-test: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - run: | - cd icu4c/source; - ICU_DATA_FILTER_FILE=../../.github/lstm_for_th_my.json ./runConfigureICU --enable-debug --disable-release Linux -disable-layoutex; - make clean; - make -j -l4.5 check - - # Test adaboost - adaboost-test: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - run: | - cd icu4c/source; - ICU_DATA_FILTER_FILE=../../.github/adaboost.json CPPFLAGS=-DUCONFIG_USE_ML_PHRASE_BREAKING=1 ./runConfigureICU --enable-debug --disable-release Linux -disable-layoutex; - make clean; - make -j -l4.5 check - - # Build and run testmap - testmap: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - run: | - cd icu4c/source; - ./runConfigureICU Linux; - make -j -l4.5 check; - CONFIG_FILES=test/testmap/Makefile ./config.status; - cd test/testmap; - make -j -l4.5 check | grep '*** PASS PASS PASS, test PASSED!!!!!!!!' - - # Copyright scan - copyright-scan: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - run: perl tools/scripts/cpysearch/cpyscan.pl - - # Check compilation of internal headers. - internal-header-compilation: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - 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@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - run: tools/scripts/icu-file-utf8-check.py - - # Run unit tests with UCONFIG_NO_XXX variations. - uconfig-unit-tests: - runs-on: ubuntu-latest - strategy: - # "fail-fast: false" lets other jobs keep running even if the test breaks in some other uconfig. - fail-fast: false - matrix: - uconfig_cppflags: - # Ignore the following two. - # - "-DUCONFIG_NO_FILE_IO=1" - # - "-DUCONFIG_NO_CONVERSION=1" - - "-DUCONFIG_NO_LEGACY_CONVERSION=1" - - "-DUCONFIG_NO_NORMALIZATION=1" - - "-DUCONFIG_NO_BREAK_ITERATION=1" - - "-DUCONFIG_NO_IDNA=1" - - "-DUCONFIG_NO_COLLATION=1" - - "-DUCONFIG_NO_FORMATTING=1" - - "-DUCONFIG_NO_MF2=1" - - "-DUCONFIG_NO_TRANSLITERATION=1" - - "-DUCONFIG_NO_REGULAR_EXPRESSIONS=1" - - "-DUCONFIG_NO_SERVICE=1" - - "-DUCONFIG_NO_FILTERED_BREAK_ITERATION=1" - # Turn on all the options in one test. - - "-DUCONFIG_NO_LEGACY_CONVERSION=1 -DUCONFIG_NO_NORMALIZATION=1 -DUCONFIG_NO_BREAK_ITERATION=1 -DUCONFIG_NO_IDNA=1 -DUCONFIG_NO_COLLATION=1 -DUCONFIG_NO_FORMATTING=1 -DUCONFIG_NO_MF2=1 -DUCONFIG_NO_TRANSLITERATION=1 -DUCONFIG_NO_REGULAR_EXPRESSIONS=1 -DUCONFIG_NO_SERVICE=1 -DUCONFIG_NO_FILTERED_BREAK_ITERATION=1" - steps: - - name: Checkout - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - name: Verify no additional new UCONFIG_NO_xxx added - run: | - # Test that we have exactly 13 "#ifndef UCONFIG_NO_" in uconfig.h. If the number changes, we need to also - # adjust the uconfig_cppflags above to include the new one and update the "13" below. - expected_count="13"; - count=`egrep "#ifndef UCONFIG_NO_" icu4c/source/common/unicode/uconfig.h| wc -l`; - if [ $expected_count != $count ]; then - echo "More than %s UCONFIG_NO_* defined in uconfig.h, please adjust uconfig_cppflags above to include any newly added flag" % $expected_count; - echo "Currently UCONFIG_NO_* defined in uconfig.h:"; - egrep "#ifndef UCONFIG_NO_" icu4c/source/common/unicode/uconfig.h; - exit -1 - fi - - name: Build and Test - env: - CPPFLAGS: ${{ matrix.uconfig_cppflags }} - run: | - cd icu4c/source/; - ./runConfigureICU Linux; - make -j -l4.5 tests; - - # Run header tests with UCONFIG_NO_XXX variations. - uconfig-header-tests: - runs-on: ubuntu-latest + make -j -l2.5 check + + # Windows MSVC builds +# windows-msvc: +# runs-on: windows-2022 +# strategy: +# fail-fast: false +# matrix: +# include: +# - test_flags: 'x64 Debug' +# build_flags: '/p:Configuration=Debug /p:Platform=x64' +# - test_flags: 'x86 Debug' +# build_flags: '/p:Configuration=Debug /p:Platform=Win32' +# - test_flags: 'arm Release' +# build_flags: '/p:Configuration=Release /p:Platform=ARM' +# - test_flags: 'x64 Release' +# build_flags: '/p:LanguageStandard=stdcpplatest /p:Configuration=Release /p:Platform=x64' +# - test_flags: 'x64 Release' +# build_flags: '/p:_HAS_EXCEPTIONS=0 /p:Configuration=Release /p:Platform=x64' +# steps: +# - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 +# - name: Set up MSBuild +# uses: microsoft/setup-msbuild@v2 +# - name: Build Solution x64 +# if: contains(matrix.test_flags, 'arm Release') +# run: msbuild icu4c/source/allinone/allinone.sln /p:Configuration=Release /p:Platform=x64 +# - name: Build Solution +# run: | +# msbuild icu4c/source/allinone/allinone.sln ${{ matrix.build_flags }} +# - name: Run ${{ matrix.test_flags }} Tests (icucheck.bat) +# if: contains(matrix.test_flags, 'arm Release') == false +# run: | +# icu4c\source\allinone\icucheck.bat ${{ matrix.test_flags }} + +# # Windows data filter build +# windows-msvc-datafilter: +# runs-on: windows-latest +# timeout-minutes: 30 +# steps: +# - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 +# - name: Set ICU_DATA_FILTER_FILE variable +# run: | +# $filterPath = "${{ github.workspace }}\.github\data-filter.json" +# echo "ICU_DATA_FILTER_FILE=$filterPath" >> $GITHUB_ENV +# shell: pwsh +# - name: Set up MSBuild +# uses: microsoft/setup-msbuild@v2 +# - name: Build Solution with Data Filter +# run: msbuild icu4c/source/allinone/allinone.sln /p:Configuration=Release /p:Platform=x64 /p:SkipUWP=true + +# # Windows MSVC distribution release +# windows-msvc-dist-release: +# runs-on: windows-latest +# timeout-minutes: 30 +# strategy: +# fail-fast: false +# matrix: +# include: +# - arch: 'x64' +# plat: 'x64' +# win_ver: 'Win64' +# - arch: 'x86' +# plat: 'Win32' +# win_ver: 'Win32' +# - arch: 'arm64' +# plat: 'ARM64' +# win_ver: 'WinARM64' +# steps: +# - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 +# - name: Set up MSBuild +# uses: microsoft/setup-msbuild@v2 +# - name: Build Solution x64 +# if: contains(matrix.win_ver, 'ARM64') +# run: msbuild icu4c/source/allinone/allinone.sln /p:Configuration=Release /p:Platform=x64 +# - name: Build Solution +# run: msbuild icu4c/source/allinone/allinone.sln /p:Configuration=Release /p:Platform=${{ matrix.plat }} +# - name: Run Tests (icucheck.bat) +# if: contains(matrix.win_ver, 'ARM64') == false +# run: icu4c/source/allinone/icucheck.bat ${{ matrix.arch }} Release +# - name: "Run PowerShell: Distrelease script (${{ matrix.arch }})" +# run: | +# cd ./icu4c/ +# ./packaging/distrelease.ps1 -arch ${{ matrix.arch }} +# shell: pwsh +# - name: Extract ICU version and rename zip file +# id: set-zip-name +# run: | +# # Extract ICU version from icuver.txt +# $icuverContent = Get-Content icu4c\source\data\misc\icuver.txt +# $icuVersion = ($icuverContent -match 'ICUVersion{"(\d+\.\d+\.\d+\.\d+)"}')[0] +# $icuVersion -match '\{"(.*?)"\}' | Out-Null +# $icuVersion = $matches[1] +# $majorVersion = $icuVersion.Split('.')[0] +# $minorVersion = $icuVersion.Split('.')[1] +# # Determine the new file name based on the version +# if ($minorVersion -eq "0") { +# $newZipName = "icu4c-${majorVersion}rc-${{ matrix.win_ver }}-MSVC2022" +# } else { +# $newZipName = "icu4c-${majorVersion}_${minorVersion}-${{ matrix.win_ver }}-MSVC2022" +# } +# # Debugging: Print the new zip name +# Write-Host "New Zip Name: $newZipName" +# # Rename the existing zip file +# cd icu4c\source\dist\ && ls -l . +# Rename-Item -Path icu-windows.zip -NewName "${newZipName}.zip" +# echo $newZipName +# ls -l . +# echo "newZipName=$newZipName" | Out-File -FilePath $env:GITHUB_ENV -Append +# - name: Upload artifact +# uses: actions/upload-artifact@v4 +# with: +# name: icu4c.${{ matrix.win_ver }}.run_#${{ github.run_number }} +# path: icu4c/source/dist/${{ env.newZipName }}.zip + +# # Window MSYS2 tests +# windows-msys2-gcc-x86_64: +# runs-on: windows-latest +# timeout-minutes: 45 +# defaults: +# run: +# shell: msys2 {0} +# steps: +# - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 +# - name: Set up MSYS2 +# uses: msys2/setup-msys2@v2 +# id: msys2 +# with: +# update: true +# msystem: mingw64 +# install: > +# base-devel +# mingw-w64-x86_64-toolchain +# make +# - name: 'Verify MinGW Installation' +# run: gcc --version +# - name: Build and Test +# run: | +# cd '${{ github.workspace }}' && cd icu4c/source && ./runConfigureICU MinGW --prefix='/tmp/build-icu' && make -j -l4.5 check +# - name: Make install +# run: | +# cd '${{ github.workspace }}' && cd icu4c/source && make install && cd /tmp/build-icu && echo 'Recursive ls' && ls -lR +# - name: Run icuinfo +# run: | +# echo 'Run icuinfo from MSYS shell' && cd /tmp/build-icu/bin && ./icuinfo.exe +# - name: Run icuinfo from CMD +# shell: cmd +# run: | +# cd /d ${{ steps.msys2.outputs.msys2-location }}\tmp\build-icu\bin +# set PATH=C:\tools\msys64\mingw64\bin;%PATH% +# .\icuinfo.exe + +# # Run ICU4C tests with stubdata. +# run-with-stubdata: +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + +# - name: ICU4C tests with stubdata +# run: | +# cd icu4c/source; +# ./runConfigureICU Linux; +# make -j -l4.5 check; +# rm lib/libicudata.so*; +# cp -P stubdata/libicudata.so* lib; + +# cd test/cintltst; +# echo 'Running ICU4C cintltst with stubdata.'; +# # Note: 'Elapsed Time: ' is printed by makefile upon final success. +# CINTLTST_OPTS=-w make -j -l4.5 check 2>&1 | tee stubdata_ctest.log; +# if ! grep 'Elapsed Time: ' stubdata_ctest.log +# then +# echo +# echo cintltst run with stubdata failed +# echo +# echo See +# echo https://unicode-org.github.io/icu/processes/release/tasks/integration.html#run-tests-without-icu-data +# echo for how to reproduce and debug the failure +# exit 1 +# fi + +# cd ../intltest; +# echo 'Running ICU4C intltest with stubdata.'; +# INTLTEST_OPTS=-w make -j -l4.5 check 2>&1 | tee stubdata_intltest.log; +# if ! grep 'Elapsed Time: ' stubdata_intltest.log +# then +# echo +# echo intltest run with stubdata failed +# echo +# echo See +# echo https://unicode-org.github.io/icu/processes/release/tasks/integration.html#run-tests-without-icu-data +# echo for how to reproduce and debug the failure +# exit 1 +# fi + +# # Test U_CHARSET_IS_UTF8 +# u-charset-is-utf8-test: +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 +# - run: | +# cd icu4c/source; +# ./runConfigureICU Linux CPPFLAGS="-DU_CHARSET_IS_UTF8=1"; +# make -j -l4.5 check + +# # Test U_OVERRIDE_CXX_ALLOCATION-is-0-test +# u-override-cxx-allocation-is-0-test: +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 +# - run: | +# cd icu4c/source; +# ./runConfigureICU Linux CPPFLAGS="-DU_OVERRIDE_CXX_ALLOCATION=0"; +# make clean; +# make -j -l4.5 check + +# # Test LSTM +# lstm-test: +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 +# - run: | +# cd icu4c/source; +# ICU_DATA_FILTER_FILE=../../.github/lstm_for_th_my.json ./runConfigureICU --enable-debug --disable-release Linux -disable-layoutex; +# make clean; +# make -j -l4.5 check + +# # Test adaboost +# adaboost-test: +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 +# - run: | +# cd icu4c/source; +# ICU_DATA_FILTER_FILE=../../.github/adaboost.json CPPFLAGS=-DUCONFIG_USE_ML_PHRASE_BREAKING=1 ./runConfigureICU --enable-debug --disable-release Linux -disable-layoutex; +# make clean; +# make -j -l4.5 check + +# # Build and run testmap +# testmap: +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 +# - run: | +# cd icu4c/source; +# ./runConfigureICU Linux; +# make -j -l4.5 check; +# CONFIG_FILES=test/testmap/Makefile ./config.status; +# cd test/testmap; +# make -j -l4.5 check | grep '*** PASS PASS PASS, test PASSED!!!!!!!!' + +# # Copyright scan +# copyright-scan: +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 +# - run: perl tools/scripts/cpysearch/cpyscan.pl + +# # Check compilation of internal headers. +# internal-header-compilation: +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 +# - 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@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 +# - run: tools/scripts/icu-file-utf8-check.py + +# # Run unit tests with UCONFIG_NO_XXX variations. +# uconfig-unit-tests: +# runs-on: ubuntu-latest +# strategy: +# # "fail-fast: false" lets other jobs keep running even if the test breaks in some other uconfig. +# fail-fast: false +# matrix: +# uconfig_cppflags: +# # Ignore the following two. +# # - "-DUCONFIG_NO_FILE_IO=1" +# # - "-DUCONFIG_NO_CONVERSION=1" +# - "-DUCONFIG_NO_LEGACY_CONVERSION=1" +# - "-DUCONFIG_NO_NORMALIZATION=1" +# - "-DUCONFIG_NO_BREAK_ITERATION=1" +# - "-DUCONFIG_NO_IDNA=1" +# - "-DUCONFIG_NO_COLLATION=1" +# - "-DUCONFIG_NO_FORMATTING=1" +# - "-DUCONFIG_NO_MF2=1" +# - "-DUCONFIG_NO_TRANSLITERATION=1" +# - "-DUCONFIG_NO_REGULAR_EXPRESSIONS=1" +# - "-DUCONFIG_NO_SERVICE=1" +# - "-DUCONFIG_NO_FILTERED_BREAK_ITERATION=1" +# # Turn on all the options in one test. +# - "-DUCONFIG_NO_LEGACY_CONVERSION=1 -DUCONFIG_NO_NORMALIZATION=1 -DUCONFIG_NO_BREAK_ITERATION=1 -DUCONFIG_NO_IDNA=1 -DUCONFIG_NO_COLLATION=1 -DUCONFIG_NO_FORMATTING=1 -DUCONFIG_NO_MF2=1 -DUCONFIG_NO_TRANSLITERATION=1 -DUCONFIG_NO_REGULAR_EXPRESSIONS=1 -DUCONFIG_NO_SERVICE=1 -DUCONFIG_NO_FILTERED_BREAK_ITERATION=1" +# steps: +# - name: Checkout +# uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 +# - name: Verify no additional new UCONFIG_NO_xxx added +# run: | +# # Test that we have exactly 13 "#ifndef UCONFIG_NO_" in uconfig.h. If the number changes, we need to also +# # adjust the uconfig_cppflags above to include the new one and update the "13" below. +# expected_count="13"; +# count=`egrep "#ifndef UCONFIG_NO_" icu4c/source/common/unicode/uconfig.h| wc -l`; +# if [ $expected_count != $count ]; then +# echo "More than %s UCONFIG_NO_* defined in uconfig.h, please adjust uconfig_cppflags above to include any newly added flag" % $expected_count; +# echo "Currently UCONFIG_NO_* defined in uconfig.h:"; +# egrep "#ifndef UCONFIG_NO_" icu4c/source/common/unicode/uconfig.h; +# exit -1 +# fi +# - name: Build and Test +# env: +# CPPFLAGS: ${{ matrix.uconfig_cppflags }} +# run: | +# cd icu4c/source/; +# ./runConfigureICU Linux; +# make -j -l4.5 tests; + +# # Run header tests with UCONFIG_NO_XXX variations. +# uconfig-header-tests: +# runs-on: ubuntu-latest +# strategy: +# # "fail-fast: false" lets other jobs keep running even if the test breaks in some other uconfig. +# fail-fast: false +# matrix: +# uconfig_cppflags: +# # Ignore the following two. +# # - "-DUCONFIG_NO_FILE_IO=1" +# # - "-DUCONFIG_NO_CONVERSION=1" +# - "-DUCONFIG_NO_LEGACY_CONVERSION=1" +# - "-DUCONFIG_NO_NORMALIZATION=1" +# - "-DUCONFIG_NO_BREAK_ITERATION=1" +# - "-DUCONFIG_NO_IDNA=1" +# - "-DUCONFIG_NO_COLLATION=1" +# - "-DUCONFIG_NO_FORMATTING=1" +# - "-DUCONFIG_NO_MF2=1" +# - "-DUCONFIG_NO_TRANSLITERATION=1" +# - "-DUCONFIG_NO_REGULAR_EXPRESSIONS=1" +# - "-DUCONFIG_NO_SERVICE=1" +# - "-DUCONFIG_NO_FILTERED_BREAK_ITERATION=1" +# # Turn on all the options in one test. +# - "-DUCONFIG_NO_LEGACY_CONVERSION=1 -DUCONFIG_NO_NORMALIZATION=1 -DUCONFIG_NO_BREAK_ITERATION=1 -DUCONFIG_NO_IDNA=1 -DUCONFIG_NO_COLLATION=1 -DUCONFIG_NO_FORMATTING=1 -DUCONFIG_NO_MF2=1 -DUCONFIG_NO_TRANSLITERATION=1 -DUCONFIG_NO_REGULAR_EXPRESSIONS=1 -DUCONFIG_NO_SERVICE=1 -DUCONFIG_NO_FILTERED_BREAK_ITERATION=1" +# steps: +# - name: Checkout +# uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 +# - name: Verify no additional new UCONFIG_NO_xxx added +# run: | +# # Test that we have exactly 13 "#ifndef UCONFIG_NO_" in uconfig.h. If the number changes, we need to also +# # adjust the uconfig_cppflags above to include the new one and update the "13" below. +# count=`egrep "#ifndef UCONFIG_NO_" icu4c/source/common/unicode/uconfig.h| wc -l`; +# if [ "13" != $count ]; then +# echo "More than %s UCONFIG_NO_* defined in uconfig.h, please adjust uconfig_cppflags above to include any newly added flag" % $count; +# echo "Currently UCONFIG_NO_* defined in uconfig.h:"; +# egrep "#ifndef UCONFIG_NO_" icu4c/source/common/unicode/uconfig.h; +# exit -1 +# fi +# - name: Build and Install +# run: | +# cd icu4c/source/; +# mkdir /tmp/icu_cnfg; +# ./runConfigureICU Linux --prefix=/tmp/icu_cnfg; +# make -j -l4.5 install; +# - name: Test +# env: +# UCONFIG_NO: ${{ matrix.uconfig_cppflags }} +# run: | +# cd icu4c/source/; +# PATH=/tmp/icu_cnfg/bin:$PATH make -C test/hdrtst check; + +# # Build Unicode update tools +# unicode-update-tools: +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 +# - uses: bazelbuild/setup-bazelisk@b39c379c82683a5f25d34f0d062761f62693e0b2 # v3.0.0 +# - name: Get CI Linux runner VM version +# id: linux-version +# run: | +# echo "LINUX_VERSION=$(grep -F VERSION_ID /etc/os-release | cut -d'"' -f2)" >> $GITHUB_OUTPUT +# - name: Mount bazel cache +# uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 +# with: +# path: "~/.cache/bazel" +# key: bazel-${{ runner.os }}-${{ steps.linux-version.outputs.LINUX_VERSION }} + +# - name: Generate the data +# run: | +# export ICU_SRC=`pwd`; +# icu4c/source/data/unidata/generate.sh; +# if $? +# then +# echo +# echo Build of Unicode update tools failed. +# echo See +# echo https://unicode-org.github.io/icu/processes/unicode-update#bazel-build-process +# echo for how to reproduce and debug the failure +# exit 1 +# fi + +# git diff --exit-code; +# if $? +# then +# echo +# echo ICU unicode data has changed! +# echo Did you forget to include the changed data files in this PR? +# exit 1 +# fi + +# # Build and run ICU4C samples +# icu4c-test-samples: +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + +# - name: ICU4C configure and build +# run: | +# # Perform an out-of-source build of icu4c +# mkdir /tmp/icu_samples +# cd icu4c/source +# ./runConfigureICU Linux -prefix=/tmp/icu_samples +# make install +# # Reference the paths in the new build +# cd samples +# # To clean all the test binaries +# make clean-samples-recursive +# # To rebuild them all +# echo "Make all samples" +# PATH=$PATH:/tmp/icu_samples/bin LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/tmp/icu_samples/lib make all-samples-recursive +# # To run all tests serially +# echo "Run all samples" +# pwd +# PATH=$PATH:/tmp/icu_samples/bin LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/tmp/icu_samples/lib make check-samples-recursive + +# # https://unicode-org.github.io/icu/processes/release/tasks/integration.html#verify-that-icu4c-tests-pass-without-collation-rule-strings +# icu4c-without-collation-rule-strings: +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 +# - name: Install hjson dependency +# run: | +# sudo apt-get install python3-pip +# pip3 install hjson +# - name: Create data filter file to remove collation rule strings +# run: | +# cat > icu4c/coll-norules.hjson <> $GITHUB_OUTPUT - - name: Mount bazel cache - uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 - with: - path: "~/.cache/bazel" - key: bazel-${{ runner.os }}-${{ steps.linux-version.outputs.LINUX_VERSION }} - - - name: Generate the data - run: | - export ICU_SRC=`pwd`; - icu4c/source/data/unidata/generate.sh; - if $? - then - echo - echo Build of Unicode update tools failed. - echo See - echo https://unicode-org.github.io/icu/processes/unicode-update#bazel-build-process - echo for how to reproduce and debug the failure - exit 1 - fi - - git diff --exit-code; - if $? - then - echo - echo ICU unicode data has changed! - echo Did you forget to include the changed data files in this PR? - exit 1 - fi - -# Build and run ICU4C samples - icu4c-test-samples: - runs-on: ubuntu-latest - steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - - name: ICU4C configure and build - run: | - # Perform an out-of-source build of icu4c - mkdir /tmp/icu_samples - cd icu4c/source - ./runConfigureICU Linux -prefix=/tmp/icu_samples - make install - # Reference the paths in the new build - cd samples - # To clean all the test binaries - make clean-samples-recursive - # To rebuild them all - echo "Make all samples" - PATH=$PATH:/tmp/icu_samples/bin LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/tmp/icu_samples/lib make all-samples-recursive - # To run all tests serially - echo "Run all samples" - pwd - PATH=$PATH:/tmp/icu_samples/bin LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/tmp/icu_samples/lib make check-samples-recursive - - # https://unicode-org.github.io/icu/processes/release/tasks/integration.html#verify-that-icu4c-tests-pass-without-collation-rule-strings - icu4c-without-collation-rule-strings: - runs-on: ubuntu-latest + - name: Set up MSBuild + uses: microsoft/setup-msbuild@v1 + - name: Build Solution + run: msbuild icu4c/source/allinone/allinone.sln /p:Configuration=${{ matrix.config }} /p:Platform=${{ matrix.platform }} + - name: Run Tests (icucheck.bat) + run: icu4c/source/allinone/icucheck.bat ${{ matrix.arch }} ${{ matrix.config }} + - name: Build Sample Solution + run: msbuild icu4c/source/samples/all/all.sln /p:Configuration=${{ matrix.config }} /p:Platform=${{ matrix.arch }} + - name: Test Samples (samplecheck.bat) + run: icu4c/source/samples/all/samplecheck.bat ${{ matrix.arch }} ${{ matrix.config }} + + icu4c-windows-cygwin-gcc: + runs-on: windows-latest + timeout-minutes: 50 + env: + ICU_CI_CACHE: c:\icu-ci-cache + CYG_URL: https://cygwin.com/setup-x86_64.exe + CYG_MIRROR: http://mirrors.kernel.org/sourceware/cygwin/ + CYG_PACKAGES: automake,gcc-core,gcc-g++,make,pkg-config,perl,python3 + CYG_ROOT: c:\cygwin-root + CYG_CACHE: 'c:\icu-ci-cache\cygwin64-v3' + CYG_CACHED_SETUP: 'c:\icu-ci-cache\cygwin64-v3\setup.exe' + CYG_VERSION_KEY: cygwin-3.2 + defaults: + run: + shell: cmd steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - name: Install hjson dependency + - name: Configure Git to checkout with Unix line endings (LF) run: | - sudo apt-get install python3-pip - pip3 install hjson - - name: Create data filter file to remove collation rule strings + git config --global core.autocrlf input + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + - name: Restore Cygwin cache + uses: actions/cache@v2 + with: + path: ${{ env.CYG_CACHE }} + key: ${{ hashFiles('.github/workflows/icu_merge_ci.yml') }} + - name: Download Cygwin setup + shell: pwsh run: | - cat > icu4c/coll-norules.hjson < pr.json + PR_NUMBER=$(jq -r '.number' pr.json) + SHA=$(jq -r '.head.sha' pr.json) + echo "PR_NUMBER=$PR_NUMBER" >> $GITHUB_ENV + echo "SHA=$SHA" >> $GITHUB_ENV + - name: Add a check to the PR + id: add-check + if: contains(github.event.comment.body, 'run exhaustive tests') + run: | + WORKFLOW_URL="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" + echo $WORKFLOW_URL + echo ${{ secrets.GITHUB_TOKEN }} | gh auth login --with-token + CHECK_ID=$(gh api \ + -X POST \ + -F name='Exhaustive Tests / ICU4J' \ + -F head_sha="${{ env.SHA }}" \ + -F status='in_progress' \ + -F details_url=$WORKFLOW_URL \ + -F output[title]='Exhaustive Tests' \ + -F output[summary]='Running exhaustive tests for ICU4J' \ + -F output[text]=$WORKFLOW_URL \ + /repos/${{ github.repository_owner }}/${{ github.event.repository.name }}/check-runs \ + -q .id) + echo "CHECK_ID=$CHECK_ID" >> $GITHUB_ENV + - name: Build and Exhaustive Tests + run: | + echo "Building ICU4J" && cd icu4j && mvn install -DICU.exhaustive=10 + env: + BUILD: ICU4J + - name: List failures (if any) + if: failure() + run: | + cd icu4j && cat `find . -name surefire-reports -type d -exec grep -l -r --include="*.txt" FAILED {} \;` + timeout-minutes: 2 + - name: Complete the check + if: always() && contains(github.event.comment.body, 'run exhaustive tests') + run: | + WORKFLOW_URL="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" + STATUS="completed" + CONCLUSION="success" + if [ "${{ job.status }}" != "success" ]; then + CONCLUSION="failure" + fi + gh api \ + -X PATCH \ + -F status="$STATUS" \ + -F conclusion="$CONCLUSION" \ + -F details_url="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" \ + -F output[title]='Exhaustive Tests' \ + -F output[summary]='Completed exhaustive tests for ICU4J' \ + -F output[text]=$WORKFLOW_URL \ + /repos/${{ github.repository_owner }}/${{ github.event.repository.name }}/check-runs/${{ env.CHECK_ID }} + + + icu4c-linux-clang: + if: contains(github.event_name, 'workflow_dispatch') || contains(github.event.comment.body, 'run exhaustive tests') + runs-on: ubuntu-latest + timeout-minutes: 120 + steps: + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + - name: Fetch PR Details + id: pr-details + if: contains(github.event.comment.body, 'run exhaustive tests') + run: | + echo ${{ secrets.GITHUB_TOKEN }} | gh auth login --with-token + gh api "${{ github.event.issue.pull_request.url }}" > pr.json + PR_NUMBER=$(jq -r '.number' pr.json) + SHA=$(jq -r '.head.sha' pr.json) + echo "PR_NUMBER=$PR_NUMBER" >> $GITHUB_ENV + echo "SHA=$SHA" >> $GITHUB_ENV + - name: Add a check to the PR + id: add-check + if: contains(github.event.comment.body, 'run exhaustive tests') + run: | + WORKFLOW_URL="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" + echo $WORKFLOW_URL + echo ${{ secrets.GITHUB_TOKEN }} | gh auth login --with-token + CHECK_ID=$(gh api \ + -X POST \ + -F name='Exhaustive Tests / ICU4C' \ + -F head_sha="${{ env.SHA }}" \ + -F status='in_progress' \ + -F details_url=$WORKFLOW_URL \ + -F output[title]='Exhaustive Tests' \ + -F output[summary]='Running exhaustive tests for ICU4C' \ + -F output[text]=$WORKFLOW_URL \ + /repos/${{ github.repository_owner }}/${{ github.event.repository.name }}/check-runs \ + -q .id) + echo "CHECK_ID=$CHECK_ID" >> $GITHUB_ENV + - name: Build + run: | + cd icu4c/source && ./runConfigureICU Linux/clang && make -j -l4.5 + - name: Exhaustive Tests + run: | + cd icu4c/source && make check-exhaustive + env: + CC: clang + CXX: clang++ + - name: Complete the check + if: always() && contains(github.event.comment.body, 'run exhaustive tests') + run: | + WORKFLOW_URL="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" + STATUS="completed" + CONCLUSION="success" + if [ "${{ job.status }}" != "success" ]; then + CONCLUSION="failure" + fi + gh api \ + -X PATCH \ + -F status="$STATUS" \ + -F conclusion="$CONCLUSION" \ + -F details_url="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" \ + -F output[title]='Exhaustive Tests' \ + -F output[summary]='Completed exhaustive tests for ICU4C' \ + -F output[text]=$WORKFLOW_URL \ + /repos/${{ github.repository_owner }}/${{ github.event.repository.name }}/check-runs/${{ env.CHECK_ID }} \ No newline at end of file diff --git a/.github/workflows/icu_merge_ci.yml b/.github/workflows/icu_merge_ci.yml index 23b2d5315bce..888e6c72162c 100644 --- a/.github/workflows/icu_merge_ci.yml +++ b/.github/workflows/icu_merge_ci.yml @@ -824,3 +824,91 @@ jobs: publish_branch: main publish_dir: ./perf keep_files: true + + # Build ICU and tests sample on some windows configurations + icu4c-windows-msvc-postmerge: + runs-on: windows-2022 + timeout-minutes: 30 + strategy: + matrix: + arch: [x64, x86] + config: [Debug, Release] + include: + - arch: x86 + platform: Win32 + - arch: x64 + platform: x64 + steps: + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + - name: Set up MSBuild + uses: microsoft/setup-msbuild@v1 + - name: Build Solution + run: msbuild icu4c/source/allinone/allinone.sln /p:Configuration=${{ matrix.config }} /p:Platform=${{ matrix.platform }} + - name: Run Tests (icucheck.bat) + run: icu4c/source/allinone/icucheck.bat ${{ matrix.arch }} ${{ matrix.config }} + - name: Build Sample Solution + run: msbuild icu4c/source/samples/all/all.sln /p:Configuration=${{ matrix.config }} /p:Platform=${{ matrix.arch }} + - name: Test Samples (samplecheck.bat) + run: icu4c/source/samples/all/samplecheck.bat ${{ matrix.arch }} ${{ matrix.config }} + + icu4c-windows-cygwin-gcc: + runs-on: windows-latest + timeout-minutes: 50 + env: + ICU_CI_CACHE: c:\icu-ci-cache + CYG_URL: https://cygwin.com/setup-x86_64.exe + CYG_MIRROR: http://mirrors.kernel.org/sourceware/cygwin/ + CYG_PACKAGES: automake,gcc-core,gcc-g++,make,pkg-config,perl,python3 + CYG_ROOT: c:\cygwin-root + CYG_CACHE: 'c:\icu-ci-cache\cygwin64-v3' + CYG_CACHED_SETUP: 'c:\icu-ci-cache\cygwin64-v3\setup.exe' + CYG_VERSION_KEY: cygwin-3.2 + steps: + - name: Configure Git to checkout with Unix line endings (LF) + run: | + git config --global core.autocrlf input + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + - name: Restore Cygwin cache + uses: actions/cache@v2 + with: + path: ${{ env.CYG_CACHE }} + key: ${{ hashFiles('.github/workflows/icu_merge_ci.yml') }} + - name: Download Cygwin setup + run: | + if ( !(Test-Path "${{ env.CYG_CACHED_SETUP }}" -NewerThan (Get-Date).AddDays(-7)) ) + { + Write-Host "Cached Cygwin setup does not exist or is older than 7 days, downloading from external site." + + New-Item -Force -Type Directory ${{ env.CYG_CACHE }} + Write-Host "Downloading Cygwin setup..." + + $start_time = Get-Date + (New-Object System.Net.WebClient).DownloadFile(${{ env.CYG_URL }}, ${{ env.CYG_CACHED_SETUP }}) + + Write-Output "Download took: $((Get-Date).Subtract($start_time).Seconds) second(s)." + } + - name: Install Cygwin + run: | + ${{ env.CYG_CACHED_SETUP }} --no-verify --quiet-mode --no-shortcuts --no-startmenu --no-desktop --upgrade-also --only-site --site "${{ env.CYG_MIRROR }}" --root "${{ env.CYG_ROOT }}" --local-package-dir "${{ env.CYG_CACHE }}" --packages "${{ env.CYG_PACKAGES }}" + ls -l ${{ env.CYG_ROOT }} + ls -l ${{ env.CYG_ROOT }}\bin + - name: Check Dir + run: | + ls -l ${{ env.CYG_ROOT }} + ls -l ${{ env.CYG_ROOT }}\bins + - name: Check Cygwin environment + run: | + ${{ env.CYG_ROOT }}\bin\sh -lc 'echo Hello' && ${{ env.CYG_ROOT }}\bin\sh -lc 'uname -a' + - name: Build ICU (source and test) + run: | + ${{ env.CYG_ROOT }}/bin/bash -lc "cd $(cygpath \"${{ github.workspace }}\") && cd icu4c/source && ./runConfigureICU Cygwin && make tests -j -l4.5" + env: + CC: gcc + CXX: g++ + - name: Run Tests + run: | + ${{ env.CYG_ROOT }}/bin/bash -lc "cd $(cygpath \"${{ github.workspace }}\") && cd icu4c/source && make -j -l4.5 check" + env: + CC: gcc + CXX: g++ + \ No newline at end of file diff --git a/docs/processes/cldr-icu.md b/docs/processes/cldr-icu.md index 4cf53813f534..d255f575c4df 100644 --- a/docs/processes/cldr-icu.md +++ b/docs/processes/cldr-icu.md @@ -380,11 +380,11 @@ If the data is OK , other sources of failure can include: Exhautive tests should always be run for a CLDR-ICU integration PR before it is merged. Once you have a PR, you can do this for both C and J as part of the pre-merge CI tests by adding the following as a comment in the pull request:
-`/azp run CI-Exhaustive` (the exhaustive tests are not run automatically on every PR). +`run exhaustive tests` (the exhaustive tests are not run automatically on every PR). The following instructions run the ICU4C exhaustive tests locally (which you may want to do before even committing changes, or which may be necessary to diagnose failures in the -CI tests: +CI tests): ``` cd $ICU4C_DIR/source export INTLTEST_OPTS="-e" diff --git a/docs/processes/release/tasks/healthy-code.md b/docs/processes/release/tasks/healthy-code.md index a4bc4b6f3125..a3a4f6b41a7e 100644 --- a/docs/processes/release/tasks/healthy-code.md +++ b/docs/processes/release/tasks/healthy-code.md @@ -474,7 +474,7 @@ make check ## Test ICU4C Samples and Demos ### Windows build and test -Note: Since ICU 73, this task has been included in the Azure DevOps Pipeline which is triggered automatically upon merging with main/maint* branches. +Note: Since ICU 75, this task has been included in the GHA workflows which is triggered automatically upon merging with main/maint* branches. These instructions explain how to run the tests manually. To build the ICU4C samples on Windows with Visual Studio, use the following diff --git a/docs/processes/release/tasks/publish/azure-ci-builds-artifacts-download.png b/docs/processes/release/tasks/publish/azure-ci-builds-artifacts-download.png deleted file mode 100644 index b6817934faa9..000000000000 Binary files a/docs/processes/release/tasks/publish/azure-ci-builds-artifacts-download.png and /dev/null differ diff --git a/docs/processes/release/tasks/publish/azure-ci-builds-artifacts.png b/docs/processes/release/tasks/publish/azure-ci-builds-artifacts.png deleted file mode 100644 index 57efc4bd7427..000000000000 Binary files a/docs/processes/release/tasks/publish/azure-ci-builds-artifacts.png and /dev/null differ diff --git a/docs/processes/release/tasks/publish/azure-ci-builds.png b/docs/processes/release/tasks/publish/azure-ci-builds.png deleted file mode 100644 index 1de2309e9d7b..000000000000 Binary files a/docs/processes/release/tasks/publish/azure-ci-builds.png and /dev/null differ diff --git a/docs/processes/release/tasks/publish/gha-ci-artifacts.png b/docs/processes/release/tasks/publish/gha-ci-artifacts.png new file mode 100644 index 000000000000..3c474b606ccc Binary files /dev/null and b/docs/processes/release/tasks/publish/gha-ci-artifacts.png differ diff --git a/docs/processes/release/tasks/publish/gha-ci-summary.png b/docs/processes/release/tasks/publish/gha-ci-summary.png new file mode 100644 index 000000000000..5f3da30b69b3 Binary files /dev/null and b/docs/processes/release/tasks/publish/gha-ci-summary.png differ diff --git a/docs/processes/release/tasks/publish/index.md b/docs/processes/release/tasks/publish/index.md index 47d7bc538c80..5b000ae77a11 100644 --- a/docs/processes/release/tasks/publish/index.md +++ b/docs/processes/release/tasks/publish/index.md @@ -309,36 +309,24 @@ run \`make dist\`. * Click on the green check mark (✔) on the most recent/last commit. (It might be a red X if the builds failed, hopefully not). * This will open up a pop-up with links to various CI builds. - * Click on one of the various links that says "Details" for the Azure CI - builds. + * Click on one of the various links that says "Details" any of the GHA + builds and click on "Summary". * This will open up the GitHub overview of the build status.
- ![image](azure-ci-builds.png)
- * Click on the link "View more details on Azure Pipelines" link. - * This will take you to the actual Azure CI build page. - * On the top right of the page there should be a button titled - "Artifacts". Click this and it should show a drop-down with various ZIP - files that you can download.
- ![image](azure-ci-builds-artifacts.png)
- * The ZIP may automatically download for you. - * However, if you are signed-in to visualstudio.com then you might see a - dialog titled "Artifacts explorer". - * In this case click on the name, then the "..." button to download the - zip file.
- ![image](azure-ci-builds-artifacts-download.png)
- * Download both the x64 (64-bit) and x86 (32-bit) ZIP files. + ![image](gha-ci-summary.png)
+ * Scroll down at the bottom to find the sub-section "Artifacts". It should show you list of zips you can download
+ ![image](gha-ci-artifacts.png)
+ * Download the x64, x86 and ARM zip files. * For each architecture: * Extract the Zip file. (It will have a name like - "20190829.6_ICU4C_MSVC_x64_Release.zip"). + "icu4c.Win64.run_#104.zip"). * Navigate into the folder with the same name. - * Rename the file "icu-windows.zip" to the appropriate name: - * Ex: The x64 zip for version 64.1 was named - "icu4c-64_1-Win64-MSVC2017.zip" - * Ex: The x86 zip for version 64.1 was named - "icu4c-64_1-Win32-MSVC2017.zip" - * Note: Note: As of ICU 68, the pre-built binaries use MSVC2019 - instead of MSVC2017. + * Check and verify the names of the zip file are appropriate: + * Ex: The x64 zip for version 76.1 should be named + "icu4c-76_1-Win64-MSVC2022.zip" + * Ex: The x86 zip for version 76.1 should be named + "icu4c-76_1-Win32-MSVC2022.zip" * Note: For RC releases the name looked like this: - "icu4c-64rc-Win64-MSVC2017.zip" + "icu4c-76rc-Win64-MSVC2022" * ~~AIX Bin:~~ (AIX is broken and ignored for now.) * ~~login to gcc119.fsffrance.org and copy the ICU4C source archive created above to there.~~ @@ -360,7 +348,7 @@ run \`make dist\`. This step publishes pre-processed Unicode property data, which may be ingested by downstream clients such as ICU4X. * Using the output from the build bots: - * Navigate to the Azure Pipeline `C: Create Artifacts from icuexportdata` and download its single artifact (`icuexportdata_output`) + * Navigate to the GHA Workflow `icu4c-icuexportdata` and download the artifact (`icuexportdata_output`) from summary page * Unzip the file * Rename the `icuexportdata_tag-goes-here.zip` file to the correct tag (replacing slashes with dashes) diff --git a/docs/userguide/dev/ci.md b/docs/userguide/dev/ci.md index f7c7490eac43..57564e22dcb2 100644 --- a/docs/userguide/dev/ci.md +++ b/docs/userguide/dev/ci.md @@ -30,10 +30,7 @@ ICU4J's unit tests in JUnit). ICU uses Continuous Integration systems to run these tests automatically for each new code contribution, and upon each update to a future contribution under development (that is: for each [successful Pull Request merge, and upon a new push of new git commits to a Pull Request](../gitdev.md)). -ICU has 2 systems configured to run Continuous Integration testing: - -* Github Actions -* Azure Pipelines +ICU has GitHub Actions configured to run Continuous Integration testing. Continuous Integration systems can also be used to regularly and automatically run other tasks besides testing. ICU uses a CI workflow to automatically publish changes to its User Guide that is hosted on Github Pages. @@ -120,71 +117,3 @@ because if a PR does not include ICU4J code changes, the workflow will not run and Github is not capable of ignoring the check in that scenario. Furthermore, workflow conditional triggers can only be triggered at the workflow level, not the job level. Open Source users can now access machines with [at least 4 cores available per job](https://github.blog/2024-01-17-github-hosted-runners-double-the-power-for-open-source/). - -## Azure Pipelines - -ICU also uses [Azure Pipelines](https://azure.microsoft.com/en-us/products/devops/pipelines) to run CI jobs. - -### Workflow files - -Workflow files are in YAML form stored at `.ci-builds/`. - -### UI Dashboard - -All Azure piplines show up in the -[Azure Piplines ICU project dashboard](https://dev.azure.com/ms/icu/), -specifically in the -[Pipelines page](https://dev.azure.com/ms/icu/_build). - -After clicking on a specific pipeline, -all of the instances/runs for that pipeline appear. -All of the runs can be filtered in the Branch filter by the destination branch name (ex: `main`) or the PR number (ex: `2874`). - -### Configuration - -#### Initial Setup with Github. - -The upstream Github repo needs to be connected to Azure Pipelines in order for Azure Pipelines to listen for and trigger new pipelines based on events occuring in Github, -and to return the status back to Github. -This configuration is started by ensuring that the upstream ICU repo `unicode-org/icu` has the Azure Pipelines 3rd party app installed from the Github Marketplace. - -Once installed, the app will appear in the repo's Github "Settings" page under "Integrations" > "Github Apps". - -In order to configure a newly pipeline in Azure using the Github app for Azure Pipelines, you must do: - -1. Create and check-in a new YAML file in the icu repo at `.ci-builds/` -2. In the repo settings, go to "Github Apps" -3. In the Installed GitHub Apps section, click option to configure "Azure Pipelines". -4. A page to update Azure Pipeline's repository access apears next. Click on "Update access". -5. Next a page to authenticate with your Microsoft credentials appear. Sign in with Microsoft credentials. -6. Select ADO org as `ms` and project as `icu`, click on continue. -7. After authentication from Azure and Github, you come to the new pipeline wizard. -8. Select repo as `unicode-org/icu` and select "Existing Azure Pipelines YAML file" and choose the yaml file created in step #1 -9. Review YAML file and click save. You will find a new pipeline created with name `unicode-org.icu`. Rename it to a more appropriate name - -***The pipline should now run as per the YAML rules and would be visible from Github settings for branch protection.*** - - -#### Jobs - -Jobs can be added, removed, and edited merely by editing the YAML workflow files. - -The syntax for Azure Pipelines workflows is very similar to Github Actions, including the YAML format. -However, there are noteworthy differences in functionality and the expression of equivalent configurations aross the systems and syntaxes. - -#### Conditional Triggers - -Conditional triggers can be configured for Azure Pipelines similarly to Github Actions. - -Note: The triggers for merges to a branch (ex: `main`) may need to be duplicated into a separate trigger section for Pull Requests because they seem to be handled differently. - -### Caveats - -In order to set up a pipeline, a person must simultaneously have access to the Azure Pipelines project for ICU and to the Github ICU repository. - -If an Azure Pipeline only has one job, -that job might not be shown on a PR's main page within the list of all of the running CI checks. -There will only be an entry with the pipeline name in the list of checks. -However, if an Azure Pipeline has multiple jobs, -then each of the constituent jobs of the pipeline will be represent in the list of checks, -in addition to an entry for the pipeline itself. \ No newline at end of file