Skip to content

Commit

Permalink
CLDR-16499 merge from main
Browse files Browse the repository at this point in the history
  • Loading branch information
srl295 committed Sep 5, 2024
2 parents 3c6b88c + dd57ed9 commit ad081a6
Show file tree
Hide file tree
Showing 1,203 changed files with 1,304,498 additions and 938,461 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/auto-author-assign.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# .github/workflows/auto-author-assign.yml
name: Auto Author Assign

on:
pull_request_target:
types: [ opened, reopened ]

permissions:
pull-requests: write

jobs:
assign-author:
runs-on: ubuntu-latest
steps:
- uses: toshimaru/[email protected]
26 changes: 18 additions & 8 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@

name: Publish to gh-pages
name: gh-pages

# Note: we have a foot in two camps here, maybe more
#
# - docs/ldml is the spec, and it gets special handling and generation. Ends up cldr-smoke for now
# - docs/rfc needs to end up somewhere. for now, generate to github.io

# - docs/site is an entire 'site' that gets deployed to what will be cldr.unicode.org
# This is now handled in site.yml

permissions:
pages: write
deployments: write
id-token: write

on:
pull_request:
push:
branches:
- main
Expand Down Expand Up @@ -56,7 +65,7 @@ jobs:
with:
ruby-version: 3.2
bundler-cache: true
- name: Build Jekyll part of the site
- name: Build Jekyll part of the site (not spec, not site/)
run: |
gem install bundler github-pages kramdown-parser-gfm # should pull in jekyll, etc.
cd docs && github-pages build && mkdir -vp ../_site/ldml
Expand All @@ -68,7 +77,7 @@ jobs:
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: actions/upload-pages-artifact@v2
- name: Deploy to Smoketest
if: github.repository == 'unicode-org/cldr'
if: github.repository == 'unicode-org/cldr' && github.event_name == 'push'
shell: bash
env:
RSA_KEY_CCC: ${{ secrets.RSA_KEY_CCC }}
Expand All @@ -86,7 +95,9 @@ jobs:
rsync -cav --delete-after -e "ssh -o UserKnownHostsFile=${HOME}/.knownhosts -i ${HOME}/.key -p ${CCC_PORT}" ./_site/ ${CCC_USER}@${CCC_HOST}:spec/$(basename ${GITHUB_REF_NAME})/
echo "::endgroup::"
echo "Now go to https://cldr-smoke.unicode.org/spec/"$(basename ${GITHUB_REF_NAME})
deploy:
if: github.repository == 'unicode-org/cldr' && github.event_name == 'push'
environment:
name: github-pages
url: ${{steps.deployment.outputs.page_url}}
Expand All @@ -96,8 +107,7 @@ jobs:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2

# only run one of these at a time
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# only run one deployment at once.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
9 changes: 8 additions & 1 deletion .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,13 @@ jobs:
-DskipTests=true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: DataDog sourcemap upload
# only on push to main!
if: github.repository == 'unicode-org/cldr' && github.event_name == 'push' && github.ref == 'refs/heads/main' && github.event.inputs.git-ref == ''
run: npx --package=@datadog/datadog-ci datadog-ci sourcemaps upload tools/cldr-apps/src/main/webapp/dist/ --minified-path-prefix=/cldr-apps/dist/ --release-version=r${{ github.sha }} --service=surveytool
env:
DATADOG_SITE: ${{ secrets.DATADOG_SITE }}
DATADOG_API_KEY: ${{ secrets.DATADOG_API_KEY }}
- name: Checkout CLDR archive
run: >
mkdir -v ../cldr-archive && java -jar tools/cldr-code/target/cldr-code.jar checkout-archive
Expand Down Expand Up @@ -187,7 +194,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: run CLDR console check
run: java -DCLDR_GITHUB_ANNOTATIONS=true -DCLDR_DIR=$(pwd) -Xmx6g -jar tools/cldr-code/target/cldr-code.jar check -S common,seed -e -z BUILD
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
deploy:
# don't run deploy on manual builds!
if: github.repository == 'unicode-org/cldr' && github.event_name == 'push' && github.ref == 'refs/heads/main' && github.event.inputs.git-ref == ''
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Calculate Tag Name
id: tagname
run: >
echo "::set-output name=tag::$(env TZ=UTC date +'production/%Y-%m-%d-%H%Mz')"
echo "tag=$(env TZ=UTC date +'production/%Y-%m-%d-%H%Mz')" >> $GITHUB_OUTPUT
- name: Set up JDK
uses: actions/setup-java@v4
with:
Expand All @@ -52,6 +52,11 @@ jobs:
-DskipTests=true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: DataDog sourcemap upload
run: npx --package=@datadog/datadog-ci datadog-ci sourcemaps upload tools/cldr-apps/src/main/webapp/dist/ --minified-path-prefix=/cldr-apps/dist/ --release-version=r${{ github.event.inputs.git-ref }} --service=surveytool
env:
DATADOG_SITE: ${{ secrets.DATADOG_SITE }}
DATADOG_API_KEY: ${{ secrets.DATADOG_API_KEY }}
- name: Build liberty server
run: >
mvn -s .github/workflows/mvn-settings.xml -B -pl cldr-apps liberty:create liberty:deploy liberty:package -Dinclude=usr --file tools/pom.xml
Expand Down
67 changes: 67 additions & 0 deletions .github/workflows/site.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: CLDR Site

permissions:
deployments: write
id-token: write
pull-requests: write

on:
pull_request:
paths:
# - "tools/scripts/tr-archive/**"
- "docs/site/**"
- '.github/workflows/site.yml'
push:
branches:
- main
# Only run if docs change.
paths:
# - "tools/scripts/tr-archive/**"
- "docs/site/**"
- '.github/workflows/site.yml'

jobs:
cloudflare:
runs-on: ubuntu-latest
environment: cloudflare
steps:
- uses: actions/checkout@v4
with:
lfs: false
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2
bundler-cache: true
- name: Setup Jekyll
run: 'gem install bundler jekyll kramdown-parser-gfm webrick'
- name: Setup assets
run: 'cd docs/site/assets && npm ci && npm run build'
- name: Build cldr.pages.dev
run: 'cd docs/site && jekyll build'
- name: Pre-install Wrangler
run: npm i -g [email protected]
# see https://github.com/cloudflare/wrangler-action/issues/286
- name: Deploy cldr.pages.dev
id: deploy
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy ./_site --project-name=cldr
- name: Add deploy comment to PR
uses: actions/github-script@v7
if: github.event_name == 'pull_request'
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: '✨ deployed to <${{ steps.deploy.outputs.deployment-url }}>'
})
github.rest.issues.addLabels({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ['Site Update']
})
4 changes: 0 additions & 4 deletions .github/workflows/staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@ jobs:
ref: ${{ github.event.inputs.git-ref }}
repository: ${{ github.event.inputs.repo }}
lfs: false
- name: Calculate Tag Name
id: tagname
run: >
echo "::set-output name=tag::$(env TZ=UTC date +'staging/%Y-%m-%d-%H%Mz')"
- name: Set up JDK
uses: actions/setup-java@v4
with:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
# All
.project
.classpath
.idea

# /tools/
/tools/dist
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@ A source formatter is now used, please see [spotless](./tools/README.md#spotless

Copyright © 2004-2024 Unicode, Inc. Unicode and the Unicode Logo are registered trademarks of Unicode, Inc. in the United States and other countries.

The project is released under [LICENSE](./LICENSE).
A CLA is required to contribute to this project - please refer to the [CONTRIBUTING.md](./CONTRIBUTING.md) file (or start a Pull Request) for more information.

The contents of this repository are governed by the Unicode [Terms of Use](https://www.unicode.org/copyright.html) and are released under [LICENSE](./LICENSE).

Note that some CLDR tools depend on libraries managed via Maven; use of these libraries is governed by separate license agreements.

A CLA is required to contribute to this project - please refer to the [CONTRIBUTING.md](./CONTRIBUTING.md) file (or start a Pull Request) for more information.
Loading

0 comments on commit ad081a6

Please sign in to comment.