Skip to content

Commit 7e9d065

Browse files
committed
Merge remote-tracking branch 'upstream/main' into new-era-codes
2 parents 975aa52 + d2293cc commit 7e9d065

File tree

3,333 files changed

+938782
-635602
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

3,333 files changed

+938782
-635602
lines changed

.github/workflows/gh-pages.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ on:
3030
- '.github/workflows/gh-pages.yml'
3131
jobs:
3232
build:
33+
name: "Build Github Pages"
3334
runs-on: ubuntu-latest
3435
steps:
3536
- uses: actions/checkout@v4
@@ -113,6 +114,7 @@ jobs:
113114
echo "::endgroup::"
114115
echo "Now go to https://cldr-smoke.unicode.org/spec/"$(basename ${GITHUB_REF_NAME})
115116
deploy:
117+
name: "Deploy to GitHub Pages"
116118
# only deploy from main branch of main repo
117119
if: github.repository == 'unicode-org/cldr' && github.event_name == 'push' && github.ref == 'refs/heads/main'
118120
environment:

.github/workflows/maven.yml

Lines changed: 169 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
name: cldr-mvn
22

3+
env:
4+
## uncomment only ONE of these
5+
CLDR_CHECK_MODE: FINAL_TESTING
6+
# CLDR_CHECK_MODE: BUILD
7+
38
on:
49
push:
510
pull_request:
@@ -40,22 +45,30 @@ jobs:
4045
${{ runner.os }}-mavenspotless-
4146
- name: Check Java style
4247
run: mvn --file=tools/pom.xml spotless:check || (echo "Style checker failed. Formatting changes can be applied by 'mvn spotless:apply'" && exit 1)
43-
build:
48+
- name: Restore lychee cache
49+
uses: actions/cache@v3
50+
with:
51+
path: .lycheecache
52+
key: cache-lychee-${{ github.sha }}
53+
restore-keys: cache-lychee-
54+
- name: Run lychee on PathDescriptions.md
55+
uses: lycheeverse/lychee-action@v1
56+
with:
57+
args: "-n --cache --max-cache-age 10d tools/cldr-code/src/main/resources/org/unicode/cldr/util/data/PathDescriptions.md"
58+
fail: true
59+
format: markdown
60+
output: linkcheck.md
61+
- name: Link Checker Summary PathDescriptions.md
62+
run: cat linkcheck.md >> $GITHUB_STEP_SUMMARY
63+
package:
64+
name: "Package up CLDR"
4465
runs-on: ubuntu-latest
4566
steps:
4667
- name: Clone Repository
4768
uses: actions/checkout@v4
4869
with:
4970
lfs: false
5071
fetch-depth: 0 # Needed for cldr-archive
51-
if: github.event.inputs.git-ref == ''
52-
- name: Clone Repository (manual ref)
53-
uses: actions/checkout@v4
54-
with:
55-
lfs: false
56-
fetch-depth: 0 # Needed for cldr-archive
57-
ref: ${{ github.event.inputs.git-ref }}
58-
if: github.event.inputs.git-ref != ''
5972
- name: Set up JDK
6073
uses: actions/setup-java@v4
6174
with:
@@ -97,16 +110,14 @@ jobs:
97110
env:
98111
DATADOG_SITE: ${{ secrets.DATADOG_SITE }}
99112
DATADOG_API_KEY: ${{ secrets.DATADOG_API_KEY }}
100-
- name: Checkout CLDR archive
101-
run: >
102-
mkdir -v ../cldr-archive && java -jar tools/cldr-code/target/cldr-code.jar checkout-archive
103113
- name: Build liberty server
104114
run: >
105115
mvn -s .github/workflows/mvn-settings.xml -B -pl cldr-apps liberty:create liberty:deploy liberty:package -Dinclude=usr --file tools/pom.xml
106116
-DskipTests=true
107117
env:
108118
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
109119
- name: Cleanup liberty server
120+
# we remove the 'expanded' version of the .war file, to save space
110121
run: >
111122
zip tools/cldr-apps/target/cldr-apps.zip -d wlp/usr/servers/cldr/apps/expanded/\*
112123
- name: Upload cldr-apps.zip
@@ -119,34 +130,63 @@ jobs:
119130
with:
120131
name: cldr-code
121132
path: tools/cldr-code/target/cldr-code.jar
122-
- name: BOM check in .xml files
123-
run: >
124-
mvn -s .github/workflows/mvn-settings.xml --file tools/pom.xml -pl cldr-code
125-
exec:java -Dexec.mainClass=org.unicode.cldr.util.XMLValidator
126-
-Dexec.cleanupDaemonThreads=false
127-
-Dexec.args="-q --justCheckBom exemplars seed common keyboards"
128-
&& echo 'No XML BOM detected'
129-
- name: Schema check common/main in .xml files
130-
run: >
131-
mvn -s .github/workflows/mvn-settings.xml --file tools/pom.xml -pl cldr-code
132-
exec:java -Dexec.mainClass=org.unicode.cldr.util.XMLValidator
133-
-Dexec.cleanupDaemonThreads=false
134-
-Dexec.args="-q --schema=common/dtd/ldml.xsd common/main"
135-
|| (echo 'Schema failed, rerun GenerateDtd' ; exit 0)
136-
- name: Keyboard Schema Check
133+
build:
134+
#Cannot change the name, it's a required step.
135+
#name: "Build / Unit-test"
136+
runs-on: ubuntu-latest
137+
steps:
138+
- name: Clone Repository
139+
uses: actions/checkout@v4
140+
with:
141+
lfs: false
142+
fetch-depth: 0 # Needed for cldr-archive
143+
if: github.event.inputs.git-ref == ''
144+
- name: Clone Repository (manual ref)
145+
uses: actions/checkout@v4
146+
with:
147+
lfs: false
148+
fetch-depth: 0 # Needed for cldr-archive
149+
ref: ${{ github.event.inputs.git-ref }}
150+
if: github.event.inputs.git-ref != ''
151+
- name: Set up JDK
152+
uses: actions/setup-java@v4
153+
with:
154+
java-version: 11
155+
distribution: 'temurin'
156+
- name: Cache local Maven repository
157+
uses: actions/cache@v4
158+
with:
159+
path: ~/.m2/repository
160+
key: ${{ runner.os }}-maven-${{ hashFiles('tools/**/pom.xml') }}
161+
restore-keys: |
162+
${{ runner.os }}-maven-
163+
- name: Cache local npm repository
164+
uses: actions/cache@v4
165+
with:
166+
path: ~/.npm
167+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
168+
restore-keys: |
169+
${{ runner.os }}-node-
170+
node-
171+
- name: Cache webpack
172+
uses: actions/cache@v4
173+
with:
174+
path: tools/cldr-apps/target/webpack_cache
175+
key: ${{ runner.os }}-webpack-${{ hashFiles('tools/cldr-apps/package*') }}-${{ hashFiles('tools/cldr-apps/src/**') }}
176+
restore-keys: |
177+
${{ runner.os }}-webpack-
178+
webpack-
179+
- name: Build with Maven
137180
run: >
138-
mvn -s .github/workflows/mvn-settings.xml --file tools/pom.xml -pl cldr-code
139-
exec:java -Dexec.mainClass=org.unicode.cldr.util.XMLValidator
140-
-Dexec.cleanupDaemonThreads=false
141-
-Dexec.args="--schema=keyboards/dtd/ldmlKeyboard.xsd keyboards/3.0"
142-
|| (echo 'Schema failed, rerun GenerateDtd' ; exit 0)
143-
- name: Keyboard Test Schema Check
181+
mvn -s .github/workflows/mvn-settings.xml -B compile install package --file tools/pom.xml
182+
-DskipTests=true
183+
env:
184+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
185+
- name: Checkout CLDR archive
144186
run: >
145-
mvn -s .github/workflows/mvn-settings.xml --file tools/pom.xml -pl cldr-code
146-
exec:java -Dexec.mainClass=org.unicode.cldr.util.XMLValidator
147-
-Dexec.cleanupDaemonThreads=false
148-
-Dexec.args="--schema=keyboards/dtd/ldmlKeyboardTest.xsd keyboards/test"
149-
|| (echo 'Schema failed, rerun GenerateDtd' ; exit 0)
187+
mkdir -v ../cldr-archive && java -jar tools/cldr-code/target/cldr-code.jar checkout-archive
188+
env:
189+
GIT_LFS_SKIP_SMUDGE: 1
150190
- name: Setup MySQL
151191
run: |
152192
sudo systemctl start mysql.service
@@ -163,6 +203,8 @@ jobs:
163203
env:
164204
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
165205
check:
206+
#Cannot change the name, it's a required step.
207+
#name: "Run ConsoleCheckCLDR"
166208
runs-on: ubuntu-latest
167209
steps:
168210
- name: Clone Repository
@@ -194,14 +236,102 @@ jobs:
194236
env:
195237
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
196238
- name: run CLDR console check
197-
run: java -DCLDR_GITHUB_ANNOTATIONS=true -DCLDR_DIR=$(pwd) -Xmx6g -jar tools/cldr-code/target/cldr-code.jar check -S common,seed -e -z FINAL_TESTING
239+
run: java -DCLDR_GITHUB_ANNOTATIONS=true -DCLDR_DIR=$(pwd) -Xmx6g -jar tools/cldr-code/target/cldr-code.jar check -S common,seed -e -z ${CLDR_CHECK_MODE}
240+
- name: BOM check in .xml files
241+
run: >
242+
mvn -s .github/workflows/mvn-settings.xml --file tools/pom.xml -pl cldr-code
243+
exec:java -Dexec.mainClass=org.unicode.cldr.util.XMLValidator
244+
-Dexec.cleanupDaemonThreads=false
245+
-Dexec.args="-q --justCheckBom exemplars seed common keyboards"
246+
&& echo 'No XML BOM detected'
247+
- name: Schema check common/main in .xml files
248+
run: >
249+
mvn -s .github/workflows/mvn-settings.xml --file tools/pom.xml -pl cldr-code
250+
exec:java -Dexec.mainClass=org.unicode.cldr.util.XMLValidator
251+
-Dexec.cleanupDaemonThreads=false
252+
-Dexec.args="-q --schema=common/dtd/ldml.xsd common/main"
253+
|| (echo 'Schema failed, rerun GenerateDtd' ; exit 0)
254+
- name: Keyboard Schema Check
255+
run: >
256+
mvn -s .github/workflows/mvn-settings.xml --file tools/pom.xml -pl cldr-code
257+
exec:java -Dexec.mainClass=org.unicode.cldr.util.XMLValidator
258+
-Dexec.cleanupDaemonThreads=false
259+
-Dexec.args="--schema=keyboards/dtd/ldmlKeyboard.xsd keyboards/3.0"
260+
|| (echo 'Schema failed, rerun GenerateDtd' ; exit 0)
261+
- name: Keyboard Test Schema Check
262+
run: >
263+
mvn -s .github/workflows/mvn-settings.xml --file tools/pom.xml -pl cldr-code
264+
exec:java -Dexec.mainClass=org.unicode.cldr.util.XMLValidator
265+
-Dexec.cleanupDaemonThreads=false
266+
-Dexec.args="--schema=keyboards/dtd/ldmlKeyboardTest.xsd keyboards/test"
267+
|| (echo 'Schema failed, rerun GenerateDtd' ; exit 0)
268+
servertest:
269+
name: "Docker test cldr-apps"
270+
needs:
271+
- package
272+
runs-on: ubuntu-latest
273+
steps:
274+
- name: Clone Repository
275+
uses: actions/checkout@v4
276+
with:
277+
lfs: false
278+
- run: mkdir -p tools/cldr-apps/target
279+
- name: Download cldr-apps.zip
280+
uses: actions/download-artifact@v4
281+
with:
282+
name: cldr-apps-server
283+
path: tools/cldr-apps/target/cldr-apps.zip
284+
- name: Cache local Maven repository
285+
uses: actions/cache@v4
286+
with:
287+
path: ~/.m2/repository
288+
key: ${{ runner.os }}-mavencheck-${{ hashFiles('tools/**/pom.xml') }}
289+
restore-keys: |
290+
${{ runner.os }}-mavencheck-
291+
- name: Cache local npm repository
292+
uses: actions/cache@v4
293+
with:
294+
path: ~/.npm
295+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
296+
restore-keys: |
297+
${{ runner.os }}-node-
298+
node-
299+
- name: Pull Images
300+
run: docker compose pull -q
301+
working-directory: tools/cldr-apps
302+
- name: Build Containers
303+
run: docker compose build
304+
working-directory: tools/cldr-apps
305+
- name: Bringup Containers
306+
run: docker compose up -d cldr-apps selenium
307+
working-directory: tools/cldr-apps
308+
- name: Build webdriver
309+
run: docker compose run -v ~/.m2/repository:/root/.m2/repository:rw --rm webdriver mvn -B test-compile
310+
working-directory: tools/cldr-apps
311+
- name: Test with Webdriver
312+
# See tools/cldr-apps/README.md
313+
run: >
314+
docker compose run -v ~/.m2/repository:/root/.m2/repository:rw --rm webdriver || ( docker compose exec -it cldr-apps tail /logs/messages.log ; false )
315+
working-directory: tools/cldr-apps
316+
- name: Prepare client tests
317+
run: docker run --rm -v ~/.npm:/root/.npm:rw -v $(pwd)/js:/home/node/app:rw -w /home/node/app node npm ci
318+
working-directory: tools/cldr-apps
319+
- name: Run client tests against ST
320+
run: docker compose run --rm client-test || ( docker compose exec -it cldr-apps tail /logs/messages.log ; false )
321+
working-directory: tools/cldr-apps
322+
- name: Shut down containers
323+
run: docker compose stop || true
324+
working-directory: tools/cldr-apps
198325
deploy:
326+
name: "Deploy to cldr-smoke for testing"
199327
# don't run deploy on manual builds!
200328
if: github.repository == 'unicode-org/cldr' && github.event_name == 'push' && github.ref == 'refs/heads/main' && github.event.inputs.git-ref == ''
201329
needs:
202330
- build
203331
- check
204332
- formatter
333+
- package
334+
# - servertest
205335
runs-on: ubuntu-latest
206336
steps:
207337
- name: Download cldr-apps.zip

.github/workflows/site.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
12
name: CLDR Site
23

34
permissions:
@@ -18,7 +19,7 @@ on:
1819
paths:
1920
# - "tools/scripts/tr-archive/**"
2021
- "docs/site/**"
21-
- '.github/workflows/site.yml'
22+
- '.github/workflows/site.yml'
2223
jobs:
2324
cloudflare:
2425
if: github.event_name == 'push' || github.event_name == 'pull_request'
@@ -28,6 +29,7 @@ jobs:
2829
- uses: actions/checkout@v4
2930
with:
3031
lfs: false
32+
fetch-depth: 2
3133
- uses: ruby/setup-ruby@v1
3234
with:
3335
ruby-version: 3.2
@@ -41,15 +43,20 @@ jobs:
4143
- name: Pre-install Wrangler
4244
if: (github.event_name == 'push') || (github.event.pull_request.head.repo.full_name == 'unicode-org/cldr')
4345
run: npm i -g [email protected]
44-
# see https://github.com/cloudflare/wrangler-action/issues/286
4546
- name: Deploy cldr.pages.dev
4647
if: (github.event_name == 'push') || (github.event.pull_request.head.repo.full_name == 'unicode-org/cldr')
4748
id: deploy
4849
uses: cloudflare/wrangler-action@v3
4950
with:
5051
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
5152
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
52-
command: pages deploy ./_site --project-name=cldr
53+
# use '--branch pr####' (pr###.cldr.pages.dev) for PRs, otherwise goes to cldr.unicode.org (production)
54+
command: pages deploy ./_site --project-name=cldr ${{ github.event_name == 'pull_request' && format('--branch pr{0}', github.event.pull_request.number) || '' }}
55+
- name: Calculate changed site files
56+
id: prdiff
57+
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == 'unicode-org/cldr'
58+
run: |
59+
(echo -n 'prdiff=' ; git diff --name-status HEAD^ HEAD | cut -d/ -f2- | grep '^site/.*\.md$' | sed -e 's%^site/\(.*\)\.md%\\n- [\1.md](${{ steps.deploy.outputs.pages-deployment-alias-url }}/\1)%' | tr -d '\012' ) | tee -a $GITHUB_OUTPUT
5360
- name: Add deploy comment to PR
5461
uses: actions/github-script@v7
5562
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == 'unicode-org/cldr'
@@ -59,7 +66,7 @@ jobs:
5966
issue_number: context.issue.number,
6067
owner: context.repo.owner,
6168
repo: context.repo.repo,
62-
body: '✨ deployed to <${{ steps.deploy.outputs.deployment-url }}>'
69+
body: '✨ This commit deployed to <${{ steps.deploy.outputs.deployment-url }}> \n✨ This PR deployed to <${{ steps.deploy.outputs.pages-deployment-alias-url }}>\n\n**Changed Pages in the last commit:**\n\n${{ steps.prdiff.outputs.prdiff }}'
6370
})
6471
github.rest.issues.addLabels({
6572
issue_number: context.issue.number,

.node-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v20.18.0
1+
v22.14.0

bin/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/org/
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
2+
<html>
3+
<head>
4+
<!--
5+
Copyright (C) 2004-2007, Unicode, Inc., International Business Machines Corporation, and others.
6+
For terms of use, see http://www.unicode.org/terms_of_use.html
7+
-->
8+
</head>
9+
<body bgcolor="white">
10+
<h3>Terms of Use</h3>
11+
<pre>* All files Copyright (c) 2004-2007, Unicode Inc, and others. All Rights Reserved.
12+
* For terms of use, see <a href="http://unicode.org/copyright.html#Exhibit1">http://unicode.org/copyright.html#Exhibit1</a></pre>
13+
<p>&nbsp;</p>
14+
</body>
15+
</html>

common/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# CLDR `common` directory
2+
3+
This directory contains CLDR data corresponding to the release.
4+
5+
For copyright, terms of use, and further details, see the top [README](../README.md).

common/annotations/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# CLDR `common/annotations` directory
2+
3+
This directory contains annotations and TTS names for characters.
4+
5+
For copyright, terms of use, and further details, see the top [README](../../README.md).

0 commit comments

Comments
 (0)