Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 22 additions & 9 deletions .github/workflows/cmake-multi-platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ on:
- '!tools/wikidata/**'
- '!documents/**'
env:
ICU_MAJOR: '78'
ICU_MINOR: '3'
ICU_MAJOR: '79'
ICU_MINOR: '1'

jobs:
cache-icu:
Expand All @@ -43,13 +43,13 @@ jobs:
- name: Download and install icu
if: steps.cache.outputs.cache-hit != 'true'
run: |
wget https://github.com/unicode-org/icu/releases/download/release-${ICU_MAJOR}.${ICU_MINOR}/icu4c-${ICU_MAJOR}.${ICU_MINOR}-Ubuntu22.04-x64.tgz
wget https://github.com/unicode-org/icu/releases/download/release-${ICU_MAJOR}.${ICU_MINOR}/icu4c-${ICU_MAJOR}.${ICU_MINOR}-Ubuntu24.04-x64.tgz
export ICU=~/icu/
mkdir -p $ICU
echo "ICU directory is $ICU"

# Get the release and unpack.
cp icu4c-${ICU_MAJOR}.${ICU_MINOR}-Ubuntu22.04-x64.tgz $ICU
cp icu4c-${ICU_MAJOR}.${ICU_MINOR}-Ubuntu24.04-x64.tgz $ICU
pushd $ICU

pwd
Expand Down Expand Up @@ -135,12 +135,25 @@ jobs:
# Install all the required dependencies for the macos
- name: Install ICU (Ubuntu/macos)
run: |
if [[ "${{ matrix.os }}" == "ubuntu-latest" ]]; then
echo "ICU_ROOT=~/icu/icu/usr/local" >> $GITHUB_ENV
elif [[ "${{ matrix.os }}" == "macos-latest" ]]; then
brew list icu4c || brew install icu4c
echo "ICU_ROOT=$(brew --prefix icu4c)" >> $GITHUB_ENV
if [[ "${{ matrix.os }}" == "macos-latest" && "${{ steps.cache.outputs.cache-hit }}" != "true" ]]; then
pushd /tmp
curl -fLO https://github.com/unicode-org/icu/releases/download/release-${ICU_MAJOR}.${ICU_MINOR}/icu4c-${ICU_MAJOR}.${ICU_MINOR}-sources.tgz
tar -xzf icu4c-${ICU_MAJOR}.${ICU_MINOR}-sources.tgz
cd icu/source
./runConfigureICU MacOSX --prefix="$HOME/icu/icu/usr/local" --enable-rpath --disable-samples --disable-tests --disable-extras --disable-icuio
make -j$(sysctl -n hw.ncpu)
make install
popd
rm -rf /tmp/icu /tmp/icu4c-${ICU_MAJOR}.${ICU_MINOR}-sources.tgz
fi
echo "ICU_ROOT=$HOME/icu/icu/usr/local" >> $GITHUB_ENV

- name: Save ICU cache (macOS)
if: matrix.os == 'macos-latest' && steps.cache.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
path: ~/icu
key: ${{ runner.os }}-icu-${{ env.ICU_MAJOR }}-${{ env.ICU_MINOR }}

- name: Install lld (Ubuntu)
# Linux Release builds link with -fuse-ld=lld to avoid gold-plugin LTO version mismatches.
Expand Down
36 changes: 28 additions & 8 deletions .github/workflows/create-distribution-packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ jobs:
artifact_patterns: |
build/*.tar.gz
env:
ICU_MAJOR: '78'
ICU_MINOR: '3'
ICU_MAJOR: '79'
ICU_MINOR: '1'

steps:
- name: Checkout
Expand All @@ -52,7 +52,7 @@ jobs:
if: runner.os == 'Linux'
run: |
sudo apt update
sudo apt install -y cmake build-essential clang pkg-config
sudo apt install -y cmake build-essential clang lld pkg-config

- name: Cache ICU (Ubuntu)
if: runner.os == 'Linux'
Expand All @@ -69,9 +69,9 @@ jobs:
if: runner.os == 'Linux' && steps.cache-icu.outputs.cache-hit != 'true'
run: |
cd /tmp
wget https://github.com/unicode-org/icu/releases/download/release-${ICU_MAJOR}.${ICU_MINOR}/icu4c-${ICU_MAJOR}.${ICU_MINOR}-Ubuntu22.04-x64.tgz
wget https://github.com/unicode-org/icu/releases/download/release-${ICU_MAJOR}.${ICU_MINOR}/icu4c-${ICU_MAJOR}.${ICU_MINOR}-Ubuntu24.04-x64.tgz
mkdir icu-install
tar -xzf icu4c-${ICU_MAJOR}.${ICU_MINOR}-Ubuntu22.04-x64.tgz -C icu-install
tar -xzf icu4c-${ICU_MAJOR}.${ICU_MINOR}-Ubuntu24.04-x64.tgz -C icu-install
sudo mkdir -p /usr/local/icu-${ICU_MAJOR}_${ICU_MINOR}
sudo cp -r icu-install/icu/usr/local/* /usr/local/icu-${ICU_MAJOR}_${ICU_MINOR}/
sudo ldconfig
Expand All @@ -85,7 +85,27 @@ jobs:
- name: Install system dependencies (macOS)
if: runner.os == 'macOS'
run: |
brew install icu4c libxml2 cmake pkg-config
brew install libxml2 cmake pkg-config

- name: Cache ICU (macOS)
if: runner.os == 'macOS'
uses: actions/cache@v4
id: cache-icu-macos
with:
path: ~/icu-${{ env.ICU_MAJOR }}_${{ env.ICU_MINOR }}
key: icu-${{ env.ICU_MAJOR }}_${{ env.ICU_MINOR }}-${{ runner.os }}

- name: Install ICU (macOS)
if: runner.os == 'macOS' && steps.cache-icu-macos.outputs.cache-hit != 'true'
run: |
cd /tmp
curl -fLO https://github.com/unicode-org/icu/releases/download/release-${ICU_MAJOR}.${ICU_MINOR}/icu4c-${ICU_MAJOR}.${ICU_MINOR}-sources.tgz
tar -xzf icu4c-${ICU_MAJOR}.${ICU_MINOR}-sources.tgz
cd icu/source
./runConfigureICU MacOSX --prefix="$HOME/icu-${ICU_MAJOR}_${ICU_MINOR}" --enable-rpath --disable-samples --disable-tests --disable-extras --disable-icuio
make -j$(sysctl -n hw.ncpu)
make install
rm -rf /tmp/icu /tmp/icu4c-${ICU_MAJOR}.${ICU_MINOR}-sources.tgz

# Configure & Build
- name: Configure & Build (Ubuntu)
Expand All @@ -105,7 +125,7 @@ jobs:
- name: Configure & Build (macOS)
if: runner.os == 'macOS'
run: |
ICU_PREFIX=$(brew --prefix icu4c)
ICU_PREFIX="$HOME/icu-${ICU_MAJOR}_${ICU_MINOR}"
XML2_PREFIX=$(brew --prefix libxml2)
export PKG_CONFIG_PATH="$ICU_PREFIX/lib/pkgconfig:$XML2_PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH"
mkdir -p build
Expand All @@ -130,7 +150,7 @@ jobs:
- name: Run tests (macOS)
if: runner.os == 'macOS'
run: |
ICU_PREFIX=$(brew --prefix icu4c)
ICU_PREFIX="$HOME/icu-${ICU_MAJOR}_${ICU_MINOR}"
XML2_PREFIX=$(brew --prefix libxml2)
export PKG_CONFIG_PATH="$ICU_PREFIX/lib/pkgconfig:$XML2_PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH"
export DYLD_LIBRARY_PATH="$ICU_PREFIX/lib:$DYLD_LIBRARY_PATH"
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/doxygen-gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ on:
- '!documents/**'

env:
ICU_MAJOR: '78'
ICU_MINOR: '3'
ICU_MAJOR: '79'
ICU_MINOR: '1'

jobs:
cache-icu:
Expand All @@ -39,13 +39,13 @@ jobs:
- name: Download and install icu
if: steps.cache.outputs.cache-hit != 'true'
run: |
wget https://github.com/unicode-org/icu/releases/download/release-${ICU_MAJOR}.${ICU_MINOR}/icu4c-${ICU_MAJOR}.${ICU_MINOR}-Ubuntu22.04-x64.tgz
wget https://github.com/unicode-org/icu/releases/download/release-${ICU_MAJOR}.${ICU_MINOR}/icu4c-${ICU_MAJOR}.${ICU_MINOR}-Ubuntu24.04-x64.tgz
export ICU=~/icu/
mkdir -p $ICU
echo "ICU directory is $ICU"

# Get the release and unpack.
cp icu4c-${ICU_MAJOR}.${ICU_MINOR}-Ubuntu22.04-x64.tgz $ICU
cp icu4c-${ICU_MAJOR}.${ICU_MINOR}-Ubuntu24.04-x64.tgz $ICU
pushd $ICU

pwd
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ubuntu-memory-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ on:
- '!tools/wikidata/**'
- '!documents/**'
env:
ICU_MAJOR: '78'
ICU_MINOR: '3'
ICU_MAJOR: '79'
ICU_MINOR: '1'

jobs:
cache-icu:
Expand All @@ -41,13 +41,13 @@ jobs:
- name: Download and install icu
if: steps.cache.outputs.cache-hit != 'true'
run: |
wget https://github.com/unicode-org/icu/releases/download/release-${ICU_MAJOR}.${ICU_MINOR}/icu4c-${ICU_MAJOR}.${ICU_MINOR}-Ubuntu22.04-x64.tgz
wget https://github.com/unicode-org/icu/releases/download/release-${ICU_MAJOR}.${ICU_MINOR}/icu4c-${ICU_MAJOR}.${ICU_MINOR}-Ubuntu24.04-x64.tgz
export ICU=~/icu/
mkdir -p $ICU
echo "ICU directory is $ICU"

# Get the release and unpack.
cp icu4c-${ICU_MAJOR}.${ICU_MINOR}-Ubuntu22.04-x64.tgz $ICU
cp icu4c-${ICU_MAJOR}.${ICU_MINOR}-Ubuntu24.04-x64.tgz $ICU
pushd $ICU

pwd
Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,9 @@ install(DIRECTORY ${INFLECTION_DATA_ROOT}/ TYPE DATA COMPONENT inflection_
# CPack Configuration for Ubuntu Packaging
#
# To update ICU version:
# 1. Update ICU_VERSION in the GitHub Actions workflow (.github/workflows/create-ubuntu-distribution-packaging.yml)
# 1. Update ICU_MAJOR and ICU_MINOR in the GitHub Actions workflows (.github/workflows/create-distribution-packaging.yml, etc.)
# 2. Make sure the downloaded ICU binary file matches the filename format
# (e.g., icu4c-78_1-Ubuntu22.04-x64.tgz)
# (e.g., icu4c-79.1-Ubuntu24.04-x64.tgz)
# 3. Update the line below to match the correct ICU dependency in Debian packaging
# ----------------------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion cmake/versions.mk
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
# Copyright 2021-2024 Apple Inc. All rights reserved.
#
CATCH2_VERSION := 3.15.1
ICU_VERSION_MINIMUM := 78.1
ICU_VERSION_MINIMUM := 79.1
MARISA_VERSION := 0.3.1
7 changes: 4 additions & 3 deletions documents/how_to_update_icu.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,16 @@ Follow [ICU instructions](https://unicode-org.github.io/icu/download/) on how to
Test your update locally and fix any problems - most likely to happen due to CLDR changes.
If there are errors, you'll need to update the CI actions before submitting.

### Update Actions on GitHub
Edit all yml files under .github/workflows that contain:
### Update Minimum ICU Version and Actions on GitHub
1. Update `ICU_VERSION_MINIMUM` in `cmake/versions.mk` (e.g. `79.1`) and `CPACK_DEBIAN_PACKAGE_DEPENDS` in `CMakeLists.txt` (e.g. `libicu79 (>= ${ICU_VERSION_MINIMUM})`).
2. Edit all `.yml` files under `.github/workflows` that contain:

```
env:
ICU_MAJOR: 'xx'
ICU_MINOR: 'y'
```
and update major and minor ICU versions, e.g. 78.2.
and update major and minor ICU versions, e.g. `79` and `1`.

### Clear the GitHub Cache if necessary
Go to [Caches](https://github.com/unicode-org/inflection/actions/caches) page, and clear all ICU related caches on the right.
Loading
Loading