]> granicus.if.org Git - icu/commitdiff
ICU-21649 Adds build and execution of Unicode update tools to GHA CI.
authorgnrunge <nrunge@google.com>
Thu, 30 Sep 2021 18:25:03 +0000 (11:25 -0700)
committerNorbert Runge <41129501+gnrunge@users.noreply.github.com>
Thu, 30 Sep 2021 22:18:13 +0000 (15:18 -0700)
Checks that the build process completes without failure and that the
generated data is identical with the data currently in the repository.

ICU-21649 Fix trigger mechanism.

.github/workflows/icu_ci.yml

index e9690d934f986333ea806e50eae4a3bc426acfb2..622f41d26799c9e00f4be4ce86c3f8943895b79e 100644 (file)
@@ -399,9 +399,44 @@ jobs:
       - uses: actions/checkout@v2
       - run: python3 tools/scripts/uconfig_vars_test.py -u
 
-# Run header tests with UCONFIG_NO_XXX variations.
+  # Run header tests with UCONFIG_NO_XXX variations.
   uconfig_variation-check-all-header-tests:
     runs-on: ubuntu-latest
     steps:
       - uses: actions/checkout@v2
       - run: python3 tools/scripts/uconfig_vars_test.py -p
+
+  # Build Unicode update tools
+  unicode-update-tools:
+    runs-on: ubuntu-latest
+    steps:
+    - uses: actions/checkout@v2
+    - uses: bazelbuild/setup-bazelisk@v1
+    - name: Mount bazel cache
+      uses: actions/cache@v2
+      with:
+        path: "~/.cache/bazel"
+        key: bazel
+
+    - 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