From 6eb7d345728c2e3bd8487ced702b4dd798e32148 Mon Sep 17 00:00:00 2001 From: Pedro Kaj Kjellerup Nacht Date: Thu, 16 Nov 2023 22:25:59 +0000 Subject: [PATCH 1/2] ICU-22482 Hash-pin GHA, add dependabot to keep them updated Signed-off-by: Pedro Kaj Kjellerup Nacht --- .github/dependabot.yml | 15 +++++ .github/workflows/cache_retain.yml | 6 +- .github/workflows/icu_ci.yml | 82 +++++++++++++-------------- .github/workflows/icu_envtest.yml | 4 +- .github/workflows/icu_merge_ci.yml | 68 +++++++++++----------- .github/workflows/icu_valgrind.yml | 4 +- .github/workflows/jekyll-gh-pages.yml | 10 ++-- .github/workflows/maven.yaml | 4 +- .github/workflows/scorecard.yml | 8 +-- 9 files changed, 108 insertions(+), 93 deletions(-) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000000..322a2b6ea8f9 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,15 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "monthly" + groups: + github-actions: + patterns: + - "*" diff --git a/.github/workflows/cache_retain.yml b/.github/workflows/cache_retain.yml index 1931ca309c2c..45d70d82bb11 100644 --- a/.github/workflows/cache_retain.yml +++ b/.github/workflows/cache_retain.yml @@ -38,17 +38,17 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout and setup - uses: actions/checkout@v3 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: lfs: true - name: Checkout lfs objects run: git lfs pull - - uses: actions/setup-java@v3 + - uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # v3.13.0 with: distribution: 'temurin' java-version: '11' - name: Restore read-only cache of local Maven repository - uses: actions/cache/restore@v3 + uses: actions/cache/restore@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2 id: cache with: path: ~/.m2/repository diff --git a/.github/workflows/icu_ci.yml b/.github/workflows/icu_ci.yml index 41e0c8561cb2..4f446a19cdfc 100644 --- a/.github/workflows/icu_ci.yml +++ b/.github/workflows/icu_ci.yml @@ -28,7 +28,7 @@ jobs: icu4c-docs-build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: ICU4C doc run: | @@ -47,17 +47,17 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout and setup - uses: actions/checkout@v3 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: lfs: true - name: Checkout lfs objects run: git lfs pull - name: Cache local Maven repository - uses: actions/cache@v3 + uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2 with: path: ~/.m2/repository key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - - uses: actions/setup-java@v3 + - uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # v3.13.0 with: distribution: 'temurin' java-version: '8' @@ -79,20 +79,20 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout and setup - uses: actions/checkout@v3 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: lfs: true - name: Checkout lfs objects run: git lfs pull - name: Restore read-only cache of local Maven repository - uses: actions/cache/restore@v3 + uses: actions/cache/restore@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2 id: cache with: path: ~/.m2/repository key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} restore-keys: | ${{ runner.os }}-maven- - - uses: actions/setup-java@v3 + - uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # v3.13.0 with: distribution: 'temurin' java-version: ${{ matrix.java-version }} @@ -112,13 +112,13 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout and setup - uses: actions/checkout@v3 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: lfs: true - name: Checkout lfs objects run: git lfs pull - name: Restore read-only cache of local Maven repository - uses: actions/cache/restore@v3 + uses: actions/cache/restore@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2 id: cache with: path: ~/.m2/repository @@ -126,7 +126,7 @@ jobs: restore-keys: | ${{ runner.os }}-maven- lookup-only: true - - uses: actions/setup-java@v3 + - uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # v3.13.0 with: distribution: 'temurin' java-version: '11' @@ -153,13 +153,13 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout and setup - uses: actions/checkout@v3 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: lfs: true - name: Checkout lfs objects run: git lfs pull - name: Restore read-only cache of local Maven repository - uses: actions/cache/restore@v3 + uses: actions/cache/restore@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2 id: cache with: path: ~/.m2/repository @@ -167,7 +167,7 @@ jobs: restore-keys: | ${{ runner.os }}-maven- lookup-only: true - - uses: actions/setup-java@v3 + - uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # v3.13.0 with: distribution: 'temurin' java-version: '11' @@ -199,7 +199,7 @@ jobs: gcc-debug-build-and-test: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: ICU4C with gcc env: @@ -222,7 +222,7 @@ jobs: clang-release-build-and-test: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Install doxygen run: | @@ -264,7 +264,7 @@ jobs: # --disable-shared has a build problem. runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Build ICU4C with clang run: | @@ -280,7 +280,7 @@ jobs: gcc-10-stdlib14: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: ICU4C with gcc 10 and c++14 and extra warnings. env: @@ -301,7 +301,7 @@ jobs: clang-asan: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: ICU4C with clang and asan run: | @@ -315,7 +315,7 @@ jobs: clang-ubsan: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: ICU4C with clang and ubsan +alignment run: | @@ -330,7 +330,7 @@ jobs: clang-cfi: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: ICU4C with clang using CFI run: | @@ -349,7 +349,7 @@ jobs: clang-tsan: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: ICU4C with clang and tsan run: | @@ -367,7 +367,7 @@ jobs: macos-clang: runs-on: macos-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: ICU4C with clang on MacOS run: | @@ -379,7 +379,7 @@ jobs: run-with-stubdata: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: ICU4C tests with stubdata run: | @@ -422,7 +422,7 @@ jobs: u-charset-is-utf8-test: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - run: | cd icu4c/source; ./runConfigureICU Linux CPPFLAGS="-DU_CHARSET_IS_UTF8=1"; @@ -432,7 +432,7 @@ jobs: u-override-cxx-allocation-is-0-test: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - run: | cd icu4c/source; ./runConfigureICU Linux CPPFLAGS="-DU_OVERRIDE_CXX_ALLOCATION=0"; @@ -443,7 +443,7 @@ jobs: lstm-test: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - 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; @@ -454,7 +454,7 @@ jobs: adaboost-test: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - 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; @@ -465,7 +465,7 @@ jobs: testmap: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - run: | cd icu4c/source; ./runConfigureICU Linux; @@ -478,21 +478,21 @@ jobs: copyright-scan: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - 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@v3 + - 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@v3 + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - run: tools/scripts/icu-file-utf8-check.py # Verify icu4c release tools buildability. @@ -500,9 +500,9 @@ jobs: needs: icu4j-mvn-init-cache runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Restore read-only cache of local Maven repository - uses: actions/cache/restore@v3 + uses: actions/cache/restore@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2 id: cache with: path: ~/.m2/repository @@ -536,7 +536,7 @@ jobs: - "-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_TRANSLITERATION=1 -DUCONFIG_NO_REGULAR_EXPRESSIONS=1 -DUCONFIG_NO_SERVICE=1 -DUCONFIG_NO_FILTERED_BREAK_ITERATION=1" steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Verify no additional new UCONFIG_NO_xxx added run: | # Test that we have exactly 12 "#ifndef UCONFIG_NO_" in uconfig.h. If the number changes, we need to also @@ -582,7 +582,7 @@ jobs: - "-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_TRANSLITERATION=1 -DUCONFIG_NO_REGULAR_EXPRESSIONS=1 -DUCONFIG_NO_SERVICE=1 -DUCONFIG_NO_FILTERED_BREAK_ITERATION=1" steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Verify no additional new UCONFIG_NO_xxx added run: | # Test that we have exactly 12 "#ifndef UCONFIG_NO_" in uconfig.h. If the number changes, we need to also @@ -611,14 +611,14 @@ jobs: unicode-update-tools: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: bazelbuild/setup-bazelisk@v2 + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + - uses: bazelbuild/setup-bazelisk@95c9bf48d0c570bb3e28e57108f3450cd67c1a44 # v2.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@v3 + uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2 with: path: "~/.cache/bazel" key: bazel-${{ runner.os }}-${{ steps.linux-version.outputs.LINUX_VERSION }} @@ -650,7 +650,7 @@ jobs: icu4c-test-samples: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: ICU4C configure and build run: | @@ -675,7 +675,7 @@ jobs: icu4c-without-collation-rule-strings: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Install hjson dependency run: | sudo apt-get install python3-pip @@ -715,7 +715,7 @@ jobs: icu4c-uconfig-no-conversion: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Set UCONFIG_NO_CONVERSION and configure ICU4C env: UCONFIG_NO_CONVERSION: 1 diff --git a/.github/workflows/icu_envtest.yml b/.github/workflows/icu_envtest.yml index 0d48f34d4841..7a980aa42e09 100644 --- a/.github/workflows/icu_envtest.yml +++ b/.github/workflows/icu_envtest.yml @@ -43,7 +43,7 @@ jobs: run: | locale -a; - name: Checkout and setup - uses: actions/checkout@v3 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Build run: | cd icu4c/source/; @@ -102,7 +102,7 @@ jobs: find /usr/share/zoneinfo/ -type f,l|egrep -v "/(right|posix)/"|egrep -v "\.tab"|wc -l; find /usr/share/zoneinfo/ -type f,l|egrep -v "/(right|posix)/"|egrep -v "\.tab"|cut -d '/' -f5-50; - name: Checkout and setup - uses: actions/checkout@v3 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Build run: | cd icu4c/source/; diff --git a/.github/workflows/icu_merge_ci.yml b/.github/workflows/icu_merge_ci.yml index 3347b246168e..425c165169e1 100644 --- a/.github/workflows/icu_merge_ci.yml +++ b/.github/workflows/icu_merge_ci.yml @@ -32,17 +32,17 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout and setup - uses: actions/checkout@v3 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: lfs: true - name: Checkout lfs objects run: git lfs pull - name: Cache local Maven repository - uses: actions/cache@v3 + uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2 with: path: ~/.m2/repository key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - - uses: actions/setup-java@v3 + - uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # v3.13.0 with: distribution: 'temurin' java-version: '8' @@ -58,20 +58,20 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout and setup - uses: actions/checkout@v3 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: lfs: true - name: Checkout lfs objects run: git lfs pull - name: Lookup read-only cache of local Maven repository - uses: actions/cache@v3 + uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2 with: path: ~/.m2/repository key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} restore-keys: | ${{ runner.os }}-maven- lookup-only: true - - uses: actions/setup-java@v3 + - uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # v3.13.0 with: distribution: 'temurin' java-version: '11' @@ -92,7 +92,7 @@ jobs: if: github.repository == 'unicode-org/icu' && github.ref == 'refs/heads/main' runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Build ICU libraries run: | @@ -102,7 +102,7 @@ jobs: cd lib; cp -Ps ../tools/ctestfw/libicutest* . - name: Upload ICU libraries - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 with: name: icu-perf-libs path: icu4c/source/lib @@ -133,11 +133,11 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Create directory for lib files run: mkdir icu4c/source/perflib - name: Get ICU libs - uses: actions/download-artifact@v3 + uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 with: name: icu-perf-libs path: icu4c/source/lib @@ -207,11 +207,11 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Create directory for lib files run: mkdir icu4c/source/perflib - name: Get ICU libs - uses: actions/download-artifact@v3 + uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 with: name: icu-perf-libs path: icu4c/source/lib @@ -272,11 +272,11 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Create directory for lib files run: mkdir icu4c/source/perflib - name: Get ICU libs - uses: actions/download-artifact@v3 + uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 with: name: icu-perf-libs path: icu4c/source/lib @@ -322,20 +322,20 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout and setup - uses: actions/checkout@v3 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: lfs: true - name: Checkout lfs objects run: git lfs pull - name: Lookup read-only cache of local Maven repository - uses: actions/cache@v3 + uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2 with: path: ~/.m2/repository key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} restore-keys: | ${{ runner.os }}-maven- lookup-only: true - - uses: actions/setup-java@v3 + - uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # v3.13.0 with: distribution: 'temurin' java-version: '8' @@ -384,20 +384,20 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout and setup - uses: actions/checkout@v3 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: lfs: true - name: Checkout lfs objects run: git lfs pull - name: Lookup read-only cache of local Maven repository - uses: actions/cache@v3 + uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2 with: path: ~/.m2/repository key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} restore-keys: | ${{ runner.os }}-maven- lookup-only: true - - uses: actions/setup-java@v3 + - uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # v3.13.0 with: distribution: 'temurin' java-version: '8' @@ -448,20 +448,20 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout and setup - uses: actions/checkout@v3 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: lfs: true - name: Checkout lfs objects run: git lfs pull - name: Lookup read-only cache of local Maven repository - uses: actions/cache@v3 + uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2 with: path: ~/.m2/repository key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} restore-keys: | ${{ runner.os }}-maven- lookup-only: true - - uses: actions/setup-java@v3 + - uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # v3.13.0 with: distribution: 'temurin' java-version: '8' @@ -517,20 +517,20 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout and setup - uses: actions/checkout@v3 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: lfs: true - name: Checkout lfs objects run: git lfs pull - name: Lookup read-only cache of local Maven repository - uses: actions/cache@v3 + uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2 with: path: ~/.m2/repository key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} restore-keys: | ${{ runner.os }}-maven- lookup-only: true - - uses: actions/setup-java@v3 + - uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # v3.13.0 with: distribution: 'temurin' java-version: '8' @@ -656,20 +656,20 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout and setup - uses: actions/checkout@v3 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: lfs: true - name: Checkout lfs objects run: git lfs pull - name: Lookup read-only cache of local Maven repository - uses: actions/cache@v3 + uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2 with: path: ~/.m2/repository key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} restore-keys: | ${{ runner.os }}-maven- lookup-only: true - - uses: actions/setup-java@v3 + - uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # v3.13.0 with: distribution: 'temurin' java-version: '8' @@ -739,20 +739,20 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout and setup - uses: actions/checkout@v3 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: lfs: true - name: Checkout lfs objects run: git lfs pull - name: Lookup read-only cache of local Maven repository - uses: actions/cache@v3 + uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2 with: path: ~/.m2/repository key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} restore-keys: | ${{ runner.os }}-maven- lookup-only: true - - uses: actions/setup-java@v3 + - uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # v3.13.0 with: distribution: 'temurin' java-version: '8' @@ -802,7 +802,7 @@ jobs: needs: [icu4c-performance-tests, icu4c-performance-tests-with-files, icu4c-strsrchperf, icu4j-unicodesetperf, icu4j-ucharacterperf, icu4j-decimalformatperf, icu4j-normperf, icu4j-converterperf, icu4j-dateformatperf] runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Switch to benchmark data storage branch. run: | @@ -810,7 +810,7 @@ jobs: git checkout perfdata - name: Publish data - uses: peaceiris/actions-gh-pages@v3 + uses: peaceiris/actions-gh-pages@373f7f263a76c20808c831209c920827a82a2847 # v3.9.3 with: deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }} external_repository: unicode-org/icu-perf diff --git a/.github/workflows/icu_valgrind.yml b/.github/workflows/icu_valgrind.yml index cb07ffe80788..7eb950a0ce7c 100644 --- a/.github/workflows/icu_valgrind.yml +++ b/.github/workflows/icu_valgrind.yml @@ -27,7 +27,7 @@ jobs: sudo apt-get -y update; sudo apt-get install -y valgrind; - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Build with debug enable env: CC: clang @@ -72,7 +72,7 @@ jobs: sudo apt-get -y update; sudo apt-get install -y valgrind; - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Build with debug enable env: CC: clang diff --git a/.github/workflows/jekyll-gh-pages.yml b/.github/workflows/jekyll-gh-pages.yml index b73572b7cd3e..25eff30735c5 100644 --- a/.github/workflows/jekyll-gh-pages.yml +++ b/.github/workflows/jekyll-gh-pages.yml @@ -36,16 +36,16 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Setup Ruby - uses: ruby/setup-ruby@v1 + uses: ruby/setup-ruby@8575951200e472d5f2d95c625da0c7bec8217c42 # v1.161.0 with: ruby-version: '2.7.4' # Not needed with a .ruby-version file bundler-cache: true # runs 'bundle install' and caches installed gems automatically cache-version: 0 # Increment this number if you need to re-download cached gems - name: Setup Pages id: pages - uses: actions/configure-pages@v3 + uses: actions/configure-pages@f156874f8191504dae5b037505266ed5dda6c382 # v3.0.6 with: generator_config_file: docs/_config.yml - name: Build with Jekyll @@ -58,7 +58,7 @@ jobs: env: JEKYLL_ENV: production - name: Upload artifact - uses: actions/upload-pages-artifact@v1 + uses: actions/upload-pages-artifact@a753861a5debcf57bf8b404356158c8e1e33150c # v2.0.0 with: path: docs/_site @@ -75,4 +75,4 @@ jobs: steps: - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@v2 + uses: actions/deploy-pages@9dbe3824824f8a1377b8e298bafde1a50ede43e5 # v2.0.4 diff --git a/.github/workflows/maven.yaml b/.github/workflows/maven.yaml index bfcb5fed2947..d926b68c3453 100644 --- a/.github/workflows/maven.yaml +++ b/.github/workflows/maven.yaml @@ -18,10 +18,10 @@ jobs: permissions: packages: write steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: lfs: true - - uses: actions/setup-java@v3 + - uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # v3.13.0 with: distribution: 'temurin' java-version: '11' diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml index b0bdaef3c3db..79bb4ad289e7 100644 --- a/.github/workflows/scorecard.yml +++ b/.github/workflows/scorecard.yml @@ -29,12 +29,12 @@ jobs: steps: - name: "Checkout code" - uses: actions/checkout@v3.5.3 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: persist-credentials: false - name: "Run analysis" - uses: ossf/scorecard-action@v2.2.0 + uses: ossf/scorecard-action@v2 with: results_file: results.sarif results_format: sarif @@ -51,7 +51,7 @@ jobs: # Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF # format to the repository Actions tab. - name: "Upload artifact" - uses: actions/upload-artifact@v3.1.2 + uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 with: name: SARIF file path: results.sarif @@ -59,6 +59,6 @@ jobs: # Upload the results to GitHub's code scanning dashboard. - name: "Upload to code-scanning" - uses: github/codeql-action/upload-sarif@v2.20.1 + uses: github/codeql-action/upload-sarif@66b90a5db151a8042fa97405c6cf843bbe433f7b # v2.22.7 with: sarif_file: results.sarif From 29edef755f32faa66aa55583b4050e6245b3dc95 Mon Sep 17 00:00:00 2001 From: Elango Cheran Date: Wed, 20 Mar 2024 21:04:28 -0700 Subject: [PATCH 2/2] Testing specific optimizations --- .github/workflows/icu4c.yml | 571 ----------------------------- .github/workflows/icu4j.yml | 180 --------- .github/workflows/icu_common.yml | 84 ----- .github/workflows/icu_docs.yml | 56 --- .github/workflows/icu_valgrind.yml | 110 ------ 5 files changed, 1001 deletions(-) delete mode 100644 .github/workflows/icu4c.yml delete mode 100644 .github/workflows/icu4j.yml delete mode 100644 .github/workflows/icu_common.yml delete mode 100644 .github/workflows/icu_docs.yml delete mode 100644 .github/workflows/icu_valgrind.yml diff --git a/.github/workflows/icu4c.yml b/.github/workflows/icu4c.yml deleted file mode 100644 index a2a13200c148..000000000000 --- a/.github/workflows/icu4c.yml +++ /dev/null @@ -1,571 +0,0 @@ -# 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 - -on: - push: - branches: - - main - - 'maint/maint*' - paths: - - 'icu4c/**' - - '.github/workflows/**' - pull_request: - branches: '**' - paths: - - 'icu4c/**' - - '.github/workflows/**' - workflow_dispatch: - # To trigger the Env Test workflow manually, follow the instructions in - # https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow - -permissions: - contents: read - -jobs: - - # ICU4C docs build using doxygen.. - icu4c-docs-build: - runs-on: ubuntu-20.04 - 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-20.04 - 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-20.04 - 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: 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-20.04 - 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-20.04 - 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-20.04 - 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 undefined-behavior sanitizer. - clang-ubsan: - runs-on: ubuntu-20.04 - 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-20.04 - 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-20.04 - 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 - - # MacOS with clang - macos-clang: - runs-on: macos-latest - steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - - name: ICU4C with clang on MacOS - run: | - cd icu4c/source; - PYTHON=python3 ./runConfigureICU MacOSX; - make -j -l4.5 check - - # Run ICU4C tests with stubdata. - run-with-stubdata: - runs-on: ubuntu-20.04 - 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-20.04 - 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-20.04 - 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-20.04 - 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-20.04 - 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-20.04 - 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-20.04 - 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-20.04 - 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-20.04 - 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-20.04 - 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_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_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 12 "#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 "12" below. - expected_count="12"; - 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-20.04 - 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_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_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 12 "#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 "12" below. - count=`egrep "#ifndef UCONFIG_NO_" icu4c/source/common/unicode/uconfig.h| wc -l`; - if [ "12" != $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-20.04 - steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - uses: bazelbuild/setup-bazelisk@95c9bf48d0c570bb3e28e57108f3450cd67c1a44 # v2.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@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.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-20.04 - 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-20.04 - 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 <