ICU-23473 Action for Automated CLDR Import - #4098
Draft
srl295 wants to merge 3 commits into
Draft
Conversation
There was a problem hiding this comment.
zizmor found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
srl295
force-pushed
the
srl295/icu-23473/cldr-15060/auto-integrate-cldr
branch
from
July 24, 2026 22:45
5802fd7 to
527041a
Compare
|
Notice: the branch changed across the force-push!
~ Your Friendly Jira-GitHub PR Checker Bot |
srl295
force-pushed
the
srl295/icu-23473/cldr-15060/auto-integrate-cldr
branch
from
July 25, 2026 00:15
527041a to
821c2cf
Compare
|
Notice: the branch changed across the force-push!
~ Your Friendly Jira-GitHub PR Checker Bot |
Comment on lines
+1
to
+275
| name: Update ICU from CLDR | ||
|
|
||
| env: | ||
| ICU_DIR: ${{ github.workspace }}/icu | ||
| CLDR_DIR: ${{ github.workspace }}/cldr | ||
| ICU4C_DIR: ${{ github.workspace }}/icu/icu4c | ||
| TOOLS_ROOT: ${{ github.workspace }}/icu/tools | ||
| ICU4J_DIR: ${{ github.workspace }}/icu/icu4j | ||
| CLDR_DATA_DIR: ${{ github.workspace }}/cldr-prod | ||
| JDK_VERSION: 21 | ||
| JDK_DISTRO: temurin | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| cldr-ref: | ||
| description: CLDR ref to build | ||
| required: true | ||
| default: 'main' | ||
| cldr-repo: | ||
| description: CLDR repo to build | ||
| required: true | ||
| default: 'unicode-org/cldr' | ||
| icu-repo: | ||
| description: ICU repo | ||
| required: true | ||
| default: 'unicode-org/icu' | ||
| icu-ref: | ||
| description: ICU branch/tag | ||
| required: true | ||
| default: 'main' | ||
| jobs: | ||
| proddata: | ||
| # TODO CLDR-15060: This is ripe for caching | ||
| name: Build Production Data | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Clone CLDR | ||
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | ||
| with: | ||
| ref: ${{ github.event.inputs.cldr-ref }} | ||
| lfs: false | ||
| repository: ${{ github.event.inputs.cldr-repo }} | ||
| persist-credentials: false | ||
| - name: Set up JDK | ||
| uses: actions/setup-java@1bcf9fb12cf4aa7d266a90ae39939e61372fe520 # v5.4.0 | ||
| with: | ||
| java-version: ${{ env.JDK_VERSION }} | ||
| distribution: ${{ env.JDK_DISTRO }} | ||
| - name: Cache local Maven repository | ||
| uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 | ||
| with: | ||
| path: ~/.m2/repository | ||
| key: ${{ runner.os }}-maven-${{ hashFiles('tools/**/pom.xml') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-maven- | ||
| - name: Build with Maven | ||
| run: > | ||
| mvn -s .github/workflows/mvn-settings.xml -B compile install package --file tools/pom.xml | ||
| -DskipTests=true -pl cldr-code | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| - name: Upload cldr-code | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: cldr-code | ||
| path: tools/cldr-code/target/cldr-code.jar | ||
| - name: Build prod Data | ||
| run: | | ||
| rm -rf target/cldr-prod | ||
| mkdir -p target/cldr-prod/common | ||
| mvn -s .github/workflows/mvn-settings.xml -B -DCLDR_DIR=$(pwd) -DCLDR_GITHUB_ANNOTATIONS=true --file=tools/pom.xml -pl cldr-code \ | ||
| exec:java -Dexec.mainClass=org.unicode.cldr.tool.GenerateProductionData \ | ||
| -Dexec.args="-d target/cldr-prod/common/" | ||
| (cd target/cldr-prod/ && zip -r ../cldr-prod.zip *) | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| - name: Upload cldr-prod | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: cldr-prod | ||
| path: target/cldr-prod.zip | ||
| genicudata: | ||
| name: Generate ICU4C Data | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: write | ||
| pull-requests: write | ||
| needs: proddata | ||
| steps: | ||
| - name: Download CLDR Production Artifact | ||
| id: downloadprod | ||
| uses: actions/download-artifact@v4 | ||
| with: | ||
| name: cldr-prod | ||
| path: . | ||
| - name: Download CLDR tools | ||
| id: downloadtools | ||
| uses: actions/download-artifact@v4 | ||
| with: | ||
| name: cldr-code | ||
| path: cldr-code | ||
| - name: Set up JDK | ||
| uses: actions/setup-java@1bcf9fb12cf4aa7d266a90ae39939e61372fe520 # v5.4.0 | ||
| with: | ||
| java-version: ${{ env.JDK_VERSION }} | ||
| distribution: ${{ env.JDK_DISTRO }} | ||
| - name: Setup Maven Settings | ||
| uses: s4u/maven-settings-action@v2.8.0 | ||
| with: | ||
| servers: | | ||
| [{ | ||
| "id": "github", | ||
| "username": "${{ github.actor }}", | ||
| "password": "${{ github.token }}" | ||
| },{ | ||
| "id": "githubicu", | ||
| "username": "${{ github.actor }}", | ||
| "password": "${{ github.token }}" | ||
| },{ | ||
| "id": "githubcldr", | ||
| "username": "${{ github.actor }}", | ||
| "password": "${{ github.token }}" | ||
| }] | ||
| - name: Create empty CLDR dir, unpack cldr-prod | ||
| run: mkdir -p cldr cldr-prod && cd cldr-prod && unzip ../cldr-prod.zip | ||
| - name: Clone CLDR | ||
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | ||
| with: | ||
| ref: ${{ github.event.inputs.cldr-ref }} | ||
| lfs: false | ||
| repository: ${{ github.event.inputs.cldr-repo }} | ||
| path: cldr | ||
| persist-credentials: false | ||
| - name: Clone ICU | ||
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | ||
| with: | ||
| repository: ${{ github.event.inputs.icu-repo }} | ||
| ref: ${{ github.event.inputs.icu-ref }} | ||
| lfs: false # not needed here | ||
| path: icu | ||
| persist-credentials: false | ||
| - name: Cache local Maven repository | ||
| uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 | ||
| with: | ||
| path: ~/.m2/repository | ||
| key: ${{ runner.os }}-maven-${{ hashFiles('icu/tools/**/pom.xml') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-maven- | ||
| # TODO: update DTDs https://github.com/unicode-org/icu/blob/main/docs/processes/cldr-icu.md#3-make-pre-adjustments | ||
| # TODO: update ICU4J build version and locales https://github.com/unicode-org/icu/blob/main/docs/processes/cldr-icu.md#3-make-pre-adjustments | ||
| - name: Build and Install CLDR jar | ||
| run: > | ||
| env | ||
| mvn --file=cldr/tools/pom.xml -B clean install -pl :cldr-all,:cldr-code -DskipTests -DskipITs | ||
| - name: Generate ICU4C Data | ||
| run: > | ||
| env | ||
| mvn -B --file=$TOOLS_ROOT/cldr/cldr-to-icu/pom.xml clean package -DskipTests -DskipITs && | ||
| cd $TOOLS_ROOT/cldr/cldr-to-icu && java -jar target/cldr-to-icu-1.0-SNAPSHOT-jar-with-dependencies.jar --cldrDataDir="$CLDR_DATA_DIR" | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| - name: copy test data | ||
| run: > | ||
| cd $TOOLS_ROOT/cldr ; ant copy-cldr-testdata | ||
| - name: Zip up icu-data.zip | ||
| run: 'cd icu/icu4c/source && zip -rlq ../../../icu-data.zip data' | ||
| - name: Upload icu-data.zip | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: icu-data | ||
| path: icu-data.zip | ||
| - name: Update branch | ||
| run: | | ||
| cd $ICU4C_DIR | ||
| git config user.name 'Steven R. Loomis [bot]' | ||
| git config user.email 'srloomis@unicode.org' | ||
| git add source/data | ||
| git commit -am 'ICU-00000 integration from CLDR' | ||
| git checkout -b srl295/auto-cldr-update | ||
| git remote set-url origin "https://srl295:${GH_TOKEN}@github.com/srl295/icu.git" | ||
| git push --set-upstream -f origin srl295/auto-cldr-update | ||
| env: | ||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| # 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.) | ||
| icu4c-clang: | ||
| name: ICU4C Build/Test, Ubuntu/Clang, new data | ||
| runs-on: ubuntu-latest | ||
| needs: genicudata | ||
| steps: | ||
| - name: Clone ICU | ||
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | ||
| with: | ||
| repository: ${{ github.event.inputs.icu-repo }} | ||
| ref: ${{ github.event.inputs.icu-ref }} | ||
| lfs: false | ||
| persist-credentials: false | ||
| - name: Download icu-data.zip | ||
| uses: actions/download-artifact@v4 | ||
| with: | ||
| name: icu-data | ||
| path: . | ||
| - name: Unpack icu-data.zip | ||
| run: cd icu4c/source && rm -rf data && unzip -o ../../icu-data.zip | ||
| - name: ICU4C with clang | ||
| env: | ||
| CPPFLAGS: -DU_NO_DEFAULT_INCLUDE_UTF_HEADERS=1 | ||
| CFLAGS: -Wimplicit-fallthrough | ||
| CXXFLAGS: -Wimplicit-fallthrough | ||
| run: | | ||
| sudo apt-get -y install doxygen; | ||
| cd icu4c/source; | ||
| ./runConfigureICU Linux; | ||
| make -j 2; | ||
| make dist | ||
| - name: Upload icu4c | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: icu4c | ||
| path: icu4c/source/dist | ||
| - name: ICU4C with clang test | ||
| env: | ||
| CPPFLAGS: -DU_NO_DEFAULT_INCLUDE_UTF_HEADERS=1 | ||
| CFLAGS: -Wimplicit-fallthrough | ||
| CXXFLAGS: -Wimplicit-fallthrough | ||
| run: | | ||
| cd icu4c/source; | ||
| make -j 2 check; | ||
| ( cd test/depstest && python3 depstest.py ../../../source/ ); | ||
| ( cd .. && source/test/hdrtst/testtagsguards.sh ); | ||
| icu4j-java16: | ||
| name: ICU4J Build/Test, Java 16, new data | ||
| runs-on: ubuntu-latest | ||
| needs: genicudata | ||
| steps: | ||
| - name: Clone ICU | ||
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | ||
| with: | ||
| repository: ${{ github.event.inputs.icu-repo }} | ||
| ref: ${{ github.event.inputs.icu-ref }} | ||
| lfs: true | ||
| persist-credentials: false | ||
| - name: Checkout lfs objects | ||
| run: git lfs pull | ||
| - name: Download icu-data.zip | ||
| uses: actions/download-artifact@v4 | ||
| with: | ||
| name: icu-data | ||
| path: . | ||
| - name: Unpack icu-data.zip | ||
| run: cd icu4c/source && rm -rf data && unzip -o ../../icu-data.zip | ||
| - name: Generate ICU4J data | ||
| run: cd icu4c/source && ./runConfigureICU Linux && make -j2 && make -C data icu4j-data-install ICU4J_ROOT=$(cd ../../icu4j ; pwd) | ||
| - uses: actions/setup-java@1bcf9fb12cf4aa7d266a90ae39939e61372fe520 # v5.4.0 | ||
| with: | ||
| java-version: ${{ env.JDK_VERSION }} | ||
| distribution: ${{ env.JDK_DISTRO }} | ||
| - name: ICU4J Build | ||
| run: | | ||
| cd icu4j; | ||
| ant init; | ||
| ant jar; | ||
| ant releaseBinaries; | ||
| - name: Upload icu4j | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: icu4j | ||
| path: icu4j/release | ||
| - name: ICU4J Test | ||
| run: | |
Comment on lines
+31
to
+79
| default: 'main' | ||
| jobs: | ||
| proddata: | ||
| # TODO CLDR-15060: This is ripe for caching | ||
| name: Build Production Data | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Clone CLDR | ||
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | ||
| with: | ||
| ref: ${{ github.event.inputs.cldr-ref }} | ||
| lfs: false | ||
| repository: ${{ github.event.inputs.cldr-repo }} | ||
| persist-credentials: false | ||
| - name: Set up JDK | ||
| uses: actions/setup-java@1bcf9fb12cf4aa7d266a90ae39939e61372fe520 # v5.4.0 | ||
| with: | ||
| java-version: ${{ env.JDK_VERSION }} | ||
| distribution: ${{ env.JDK_DISTRO }} | ||
| - name: Cache local Maven repository | ||
| uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 | ||
| with: | ||
| path: ~/.m2/repository | ||
| key: ${{ runner.os }}-maven-${{ hashFiles('tools/**/pom.xml') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-maven- | ||
| - name: Build with Maven | ||
| run: > | ||
| mvn -s .github/workflows/mvn-settings.xml -B compile install package --file tools/pom.xml | ||
| -DskipTests=true -pl cldr-code | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| - name: Upload cldr-code | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: cldr-code | ||
| path: tools/cldr-code/target/cldr-code.jar | ||
| - name: Build prod Data | ||
| run: | | ||
| rm -rf target/cldr-prod | ||
| mkdir -p target/cldr-prod/common | ||
| mvn -s .github/workflows/mvn-settings.xml -B -DCLDR_DIR=$(pwd) -DCLDR_GITHUB_ANNOTATIONS=true --file=tools/pom.xml -pl cldr-code \ | ||
| exec:java -Dexec.mainClass=org.unicode.cldr.tool.GenerateProductionData \ | ||
| -Dexec.args="-d target/cldr-prod/common/" | ||
| (cd target/cldr-prod/ && zip -r ../cldr-prod.zip *) | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| - name: Upload cldr-prod | ||
| uses: actions/upload-artifact@v4 |
Comment on lines
+186
to
+229
| # 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.) | ||
| icu4c-clang: | ||
| name: ICU4C Build/Test, Ubuntu/Clang, new data | ||
| runs-on: ubuntu-latest | ||
| needs: genicudata | ||
| steps: | ||
| - name: Clone ICU | ||
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | ||
| with: | ||
| repository: ${{ github.event.inputs.icu-repo }} | ||
| ref: ${{ github.event.inputs.icu-ref }} | ||
| lfs: false | ||
| persist-credentials: false | ||
| - name: Download icu-data.zip | ||
| uses: actions/download-artifact@v4 | ||
| with: | ||
| name: icu-data | ||
| path: . | ||
| - name: Unpack icu-data.zip | ||
| run: cd icu4c/source && rm -rf data && unzip -o ../../icu-data.zip | ||
| - name: ICU4C with clang | ||
| env: | ||
| CPPFLAGS: -DU_NO_DEFAULT_INCLUDE_UTF_HEADERS=1 | ||
| CFLAGS: -Wimplicit-fallthrough | ||
| CXXFLAGS: -Wimplicit-fallthrough | ||
| run: | | ||
| sudo apt-get -y install doxygen; | ||
| cd icu4c/source; | ||
| ./runConfigureICU Linux; | ||
| make -j 2; | ||
| make dist | ||
| - name: Upload icu4c | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: icu4c | ||
| path: icu4c/source/dist | ||
| - name: ICU4C with clang test | ||
| env: | ||
| CPPFLAGS: -DU_NO_DEFAULT_INCLUDE_UTF_HEADERS=1 | ||
| CFLAGS: -Wimplicit-fallthrough |
srl295
force-pushed
the
srl295/icu-23473/cldr-15060/auto-integrate-cldr
branch
from
July 27, 2026 18:27
821c2cf to
569bede
Compare
|
Notice: the branch changed across the force-push!
~ Your Friendly Jira-GitHub PR Checker Bot |
srl295
force-pushed
the
srl295/icu-23473/cldr-15060/auto-integrate-cldr
branch
from
July 28, 2026 23:33
1527205 to
4107e56
Compare
|
Hooray! The files in the branch are the same across the force-push. 😃 ~ Your Friendly Jira-GitHub PR Checker Bot |
srl295
force-pushed
the
srl295/icu-23473/cldr-15060/auto-integrate-cldr
branch
from
July 28, 2026 23:44
4107e56 to
12da246
Compare
|
Notice: the branch changed across the force-push!
~ Your Friendly Jira-GitHub PR Checker Bot |
Comment on lines
+38
to
+43
| - name: Clone CLDR | ||
| uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 | ||
| with: | ||
| ref: ${{ github.event.inputs.cldr-ref }} | ||
| lfs: false | ||
| repository: ${{ github.event.inputs.cldr-repo }} |
Comment on lines
+126
to
+132
| - name: Clone CLDR | ||
| uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 | ||
| with: | ||
| ref: ${{ github.event.inputs.cldr-ref }} | ||
| lfs: false | ||
| repository: ${{ github.event.inputs.cldr-repo }} | ||
| path: cldr |
Comment on lines
+133
to
+139
| - name: Clone ICU | ||
| uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 | ||
| with: | ||
| repository: ${{ github.event.inputs.icu-repo }} | ||
| ref: ${{ github.event.inputs.icu-ref }} | ||
| lfs: false # not needed here | ||
| path: icu |
Comment on lines
+193
to
+198
| - name: Clone ICU | ||
| uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 | ||
| with: | ||
| repository: ${{ github.event.inputs.icu-repo }} | ||
| ref: ${{ github.event.inputs.icu-ref }} | ||
| lfs: false |
Comment on lines
+237
to
+242
| - name: Clone ICU | ||
| uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 | ||
| with: | ||
| repository: ${{ github.event.inputs.icu-repo }} | ||
| ref: ${{ github.event.inputs.icu-ref }} | ||
| lfs: true |
| lfs: false | ||
| repository: ${{ github.event.inputs.cldr-repo }} | ||
| - name: Set up JDK | ||
| uses: actions/setup-java@0f481fcb613427c0f801b606911222b5b6f3083a # v5 |
| name: cldr-code | ||
| path: cldr-code | ||
| - name: Set up JDK | ||
| uses: actions/setup-java@0f481fcb613427c0f801b606911222b5b6f3083a # v5 |
| run: cd icu4c/source && rm -rf data && unzip -o ../../icu-data.zip | ||
| - name: Generate ICU4J data | ||
| run: cd icu4c/source && ./runConfigureICU Linux && make -j2 && make -C data icu4j-data-install ICU4J_ROOT=$(cd ../../icu4j ; pwd) | ||
| - uses: actions/setup-java@0f481fcb613427c0f801b606911222b5b6f3083a # v5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TODO: Please describe your changes here.
TODO: Please read the following on ICU Contributing, and then delete these instructions.
Thank you for your pull request!
TODO: Fill out the checklist below.
Checklist
Demo PR: #3848