Skip to content

Commit

Permalink
Start using ICU 69.1.
Browse files Browse the repository at this point in the history
- Drop older versions of the ICU library from support.
- Update all versioning to match.
- Remove old versions of the buildenvs
- Update README with version info
- uprev to 0.5.0

Fixes google#198
  • Loading branch information
filmil committed Apr 23, 2021
1 parent 910da76 commit e7fb6e5
Show file tree
Hide file tree
Showing 26 changed files with 5,509 additions and 201 deletions.
18 changes: 3 additions & 15 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
icu_version: [63, 64, 65, 66, 67, 68]
icu_version: [63, 67, 68, 69]
steps:
- uses: actions/checkout@v2
- name: Test ICU version ${{ matrix.icu_version }}
Expand All @@ -26,18 +26,6 @@ jobs:
- uses: actions/checkout@v2
- name: Test ICU version ${{ matrix.icu_version }}
run: make DOCKER_TEST_ENV=rust_icu_testenv-${{ matrix.icu_version }} RUST_ICU_MAJOR_VERSION_NUMBER=${{ matrix.icu_version }} DOCKER_TEST_CARGO_TEST_ARGS="--no-default-features --features ${{ matrix.feature_set }}" docker-test
test-64-plus-features:
runs-on: ubuntu-latest
strategy:
matrix:
icu_version: [64, 65]
feature_set:
- "renaming,icu_version_in_env,icu_version_64_plus"
- "renaming,icu_version_64_plus,icu_config,use-bindgen"
steps:
- uses: actions/checkout@v2
- name: Test ICU version ${{ matrix.icu_version }}
run: make DOCKER_TEST_ENV=rust_icu_testenv-${{ matrix.icu_version }} RUST_ICU_MAJOR_VERSION_NUMBER=${{ matrix.icu_version }} DOCKER_TEST_CARGO_TEST_ARGS="--no-default-features --features ${{ matrix.feature_set }}" docker-test
test-67-plus-features:
runs-on: ubuntu-latest
strategy:
Expand All @@ -50,11 +38,11 @@ jobs:
- uses: actions/checkout@v2
- name: Test ICU version ${{ matrix.icu_version }}
run: make DOCKER_TEST_ENV=rust_icu_testenv-${{ matrix.icu_version }} RUST_ICU_MAJOR_VERSION_NUMBER=${{ matrix.icu_version }} DOCKER_TEST_CARGO_TEST_ARGS="--no-default-features --features ${{ matrix.feature_set }}" docker-test
test-68-plus-features:
test-69-plus-features:
runs-on: ubuntu-latest
strategy:
matrix:
icu_version: [68]
icu_version: [68, 69]
feature_set:
- "renaming,icu_version_in_env,icu_version_64_plus,icu_version_67_plus,icu_version_68_plus"
- "renaming,icu_version_64_plus,icu_version_67_plus,icu_version_68_plus,icu_config,use-bindgen"
Expand Down
107 changes: 52 additions & 55 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ endif
# make USED_BUILDENV_VERSION=whatever-you-want docker-test
#
# NOTE: This version number is completely independent of the crate version.
USED_BUILDENV_VERSION ?= 1.4.0
USED_BUILDENV_VERSION ?= 1.4.2

CARGO_FEATURE_VERSION :=

Expand Down Expand Up @@ -55,7 +55,7 @@ CARGO_TARGET_DIR := ${TMP}/rust_icu-${LOGNAME}-target
# Pass different values for DOCKER_TEST_ENV and DOCKER_TEST_CARGO_TEST_ARGS to
# test different configurations. This is useful in Travis CI matrix tests, for
# example.
RUST_ICU_MAJOR_VERSION_NUMBER ?= 68
RUST_ICU_MAJOR_VERSION_NUMBER ?= 69
DOCKER_TEST_ENV ?= rust_icu_testenv-${RUST_ICU_MAJOR_VERSION_NUMBER}
DOCKER_TEST_CARGO_TEST_ARGS ?=
docker-test:
Expand Down Expand Up @@ -92,13 +92,10 @@ static-bindgen-%:
"-c" "env OUTPUT_DIR=./rust_icu/rust_icu_sys/bindgen \
./rust_icu/rust_icu_sys/bindgen/run_bindgen.sh"

# Keep only the latest version of the library in the static-bindgen target,
# and any versions that do not have a lib.rs in rust_icu_sys/bindgen.
static-bindgen: \
static-bindgen-68 \
static-bindgen-67 \
static-bindgen-66 \
static-bindgen-65 \
static-bindgen-64 \
static-bindgen-63
static-bindgen-69
.PHONY: static-bindgen

# Builds and pushes the build environment containers. You would not normally
Expand All @@ -115,70 +112,70 @@ clean:
# The sleep call is needed because we've observed that crates are sometimes
# not found by cargo immediately after a publish. Sleeping on this is bad,
# but there doesn't seem to be a much better option available.
define publish
define publishfn
( cd $(1) && cargo publish && sleep 30)
endef

# This is not the best method, since it will error out if a crate has already
# been published.
.PHONY: publish
publish:
$(call publish,rust_icu_sys)
$(call publish,rust_icu_common)
$(call publish,rust_icu_uenum)
$(call publish,rust_icu_ustring)
$(call publish,rust_icu_utext)
$(call publish,rust_icu_uloc)
$(call publish,rust_icu_ucal)
$(call publish,rust_icu_udat)
$(call publish,rust_icu_udata)
$(call publish,rust_icu_ucol)
$(call publish,rust_icu_umsg)
$(call publish,rust_icu_ulistformatter)
$(call publish,rust_icu_upluralrules)
$(call publish,rust_icu_uformattable)
$(call publish,rust_icu_unum)
$(call publish,rust_icu_ubrk)
$(call publish,rust_icu_utrans)
$(call publish,rust_icu)
$(call publish,rust_icu_unumberformatter)
$(call publish,rust_icu_ecma402)
$(call publishfn,rust_icu_sys)
$(call publishfn,rust_icu_common)
$(call publishfn,rust_icu_uenum)
$(call publishfn,rust_icu_ustring)
$(call publishfn,rust_icu_utext)
$(call publishfn,rust_icu_uloc)
$(call publishfn,rust_icu_ucal)
$(call publishfn,rust_icu_udat)
$(call publishfn,rust_icu_udata)
$(call publishfn,rust_icu_ucol)
$(call publishfn,rust_icu_umsg)
$(call publishfn,rust_icu_ulistformatter)
$(call publishfn,rust_icu_upluralrules)
$(call publishfn,rust_icu_uformattable)
$(call publishfn,rust_icu_unum)
$(call publishfn,rust_icu_ubrk)
$(call publishfn,rust_icu_utrans)
$(call publishfn,rust_icu)
$(call publishfn,rust_icu_unumberformatter)
$(call publishfn,rust_icu_ecma402)
.PHONY: publish

# A helper to up-rev the cargo crate versions.
# NOTE: The cargo crate version number is completely independent of the Docker
# build environment version number.
UPREV_OLD_VERSION ?= 0.4.1
UPREV_NEW_VERSION ?= 0.4.2
define uprev
UPREV_OLD_VERSION ?= 0.5.0
UPREV_NEW_VERSION ?= 0.5.1
define uprevfn
( \
cd $(1) && \
sed -i -e s/${UPREV_OLD_VERSION}/$(UPREV_NEW_VERSION)/g Cargo.toml \
)
endef

.PHONY: uprev
uprev:
$(call uprev,rust_icu)
$(call uprev,rust_icu_common)
$(call uprev,rust_icu_intl)
$(call uprev,rust_icu_sys)
$(call uprev,rust_icu_ucal)
$(call uprev,rust_icu_ucol)
$(call uprev,rust_icu_udat)
$(call uprev,rust_icu_udata)
$(call uprev,rust_icu_uenum)
$(call uprev,rust_icu_ulistformatter)
$(call uprev,rust_icu_uloc)
$(call uprev,rust_icu_umsg)
$(call uprev,rust_icu_upluralrules)
$(call uprev,rust_icu_ustring)
$(call uprev,rust_icu_utext)
$(call uprev,rust_icu_uformattable)
$(call uprev,rust_icu_unum)
$(call uprev,rust_icu_unumberformatter)
$(call uprev,rust_icu_ubrk)
$(call uprev,rust_icu_utrans)
$(call uprev,rust_icu_ecma402)
$(call uprevfn,rust_icu)
$(call uprevfn,rust_icu_common)
$(call uprevfn,rust_icu_intl)
$(call uprevfn,rust_icu_sys)
$(call uprevfn,rust_icu_ucal)
$(call uprevfn,rust_icu_ucol)
$(call uprevfn,rust_icu_udat)
$(call uprevfn,rust_icu_udata)
$(call uprevfn,rust_icu_uenum)
$(call uprevfn,rust_icu_ulistformatter)
$(call uprevfn,rust_icu_uloc)
$(call uprevfn,rust_icu_umsg)
$(call uprevfn,rust_icu_upluralrules)
$(call uprevfn,rust_icu_ustring)
$(call uprevfn,rust_icu_utext)
$(call uprevfn,rust_icu_uformattable)
$(call uprevfn,rust_icu_unum)
$(call uprevfn,rust_icu_unumberformatter)
$(call uprevfn,rust_icu_ubrk)
$(call uprevfn,rust_icu_utrans)
$(call uprevfn,rust_icu_ecma402)
.PHONY: uprev

cov:
./build/showprogress.sh
35 changes: 20 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# rust_icu: low-level rust language bindings for the ICU library

Item | Description
---------- | -----------
ICU 63..68 | [![Test status](https://github.com/google/rust_icu/workflows/Test/badge.svg)](https://github.com/google/rust_icu/workflows/Test/badge.svg)
Source | https://github.com/google/rust_icu
README | https://github.com/google/rust_icu/blob/main/README.md
Coverage | [View report](/coverage/report.md)
Docs | https://docs.rs/crate/rust_icu
Item | Description
-------------- | -----------
ICU 63, 67..69 | [![Test status](https://github.com/google/rust_icu/workflows/Test/badge.svg)](https://github.com/google/rust_icu/workflows/Test/badge.svg)
Source | https://github.com/google/rust_icu
README | https://github.com/google/rust_icu/blob/main/README.md
Coverage | [View report](/coverage/report.md)
Docs | https://docs.rs/crate/rust_icu

This is a library of low level native rust language bindings for the
International Components for Unicode (ICU) library for C (a.k.a. ICU4C).
Expand Down Expand Up @@ -100,15 +100,20 @@ The limitations we know of today are as follows:

# Compatibility

Up to 3 minor releases of `rust_icu` are tested for each major release, and
automated tests are executed for all ICU library versions of interest, in all
feature combinations of interest.
The compatibility guarantee is as follows:

`rust_icu` version | ICU 63.x | ICU 64.2 | ICU 65.1 | ICU 66.0.1 | ICU 67.1 | ICU 68.1
------------------ | -------- | -------- | -------- | ---------- | -------- | --------
0.2 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅
0.3 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅
0.4 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅
1. Up to 3 minor releases of `rust_icu` are tested for each major release
2. Automated tests are executed for last three major ICU library versions in all
feature combinations of interest.
3. Automated tests are executed for the ICU library version in use by the docs.rs
system (so the documentation could be built).

`rust_icu` version | ICU 63.x | ICU 64.2 | ICU 65.1 | ICU 66.0.1 | ICU 67.1 | ICU 68.1 | ICU 69.1
-------------------- | -------- | -------- | -------- | ---------- | -------- | -------- | --------
0.2 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
0.3 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
0.4 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
0.5 | ✅ | | | | ✅ | ✅ | ✅

> Prior to a 1.0.0 release, API versions that only differ in the patch version
> number (0.x.**y**) only should be compatible.
Expand Down
6 changes: 0 additions & 6 deletions build/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,6 @@ all: \
push-testenv-68 \
push-maint-67 \
push-testenv-67 \
push-maint-66 \
push-testenv-66 \
push-maint-65 \
push-testenv-65 \
push-maint-64 \
push-testenv-64 \
push-maint-63 \
push-testenv-63 \
push-testenv \
Expand Down
30 changes: 15 additions & 15 deletions rust_icu/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ license = "Apache-2.0"
name = "rust_icu"
readme = "README.md"
repository = "https://github.com/google/rust_icu"
version = "0.4.1"
version = "0.5.0"

description = """
Native bindings to the ICU4C library from Unicode.
Expand All @@ -18,20 +18,20 @@ keywords = ["icu", "unicode", "i18n", "l10n"]
anyhow = "1.0.25"
log = "0.4.6"
paste = "1.0"
rust_icu_common = { path = "../rust_icu_common", version = "0.4.1", default-features = false }
rust_icu_sys = { path = "../rust_icu_sys", version = "0.4.1", default-features = false }
rust_icu_ubrk = { path = "../rust_icu_ubrk", version = "0.4.1", default-features = false }
rust_icu_ucal = { path = "../rust_icu_ucal", version = "0.4.1", default-features = false }
rust_icu_ucol = { path = "../rust_icu_ucol", version = "0.4.1", default-features = false }
rust_icu_udat = { path = "../rust_icu_udat", version = "0.4.1", default-features = false }
rust_icu_udata = { path = "../rust_icu_udata", version = "0.4.1", default-features = false }
rust_icu_uenum = { path = "../rust_icu_uenum", version = "0.4.1", default-features = false }
rust_icu_ulistformatter = { path = "../rust_icu_ulistformatter", version = "0.4.1", default-features = false }
rust_icu_uloc = { path = "../rust_icu_uloc", version = "0.4.1", default-features = false }
rust_icu_umsg = { path = "../rust_icu_umsg", version = "0.4.1", default-features = false }
rust_icu_ustring = { path = "../rust_icu_ustring", version = "0.4.1", default-features = false }
rust_icu_utext = { path = "../rust_icu_utext", version = "0.4.1", default-features = false }
rust_icu_utrans = { path = "../rust_icu_utrans", version = "0.4.1", default-features = false }
rust_icu_common = { path = "../rust_icu_common", version = "0.5.0", default-features = false }
rust_icu_sys = { path = "../rust_icu_sys", version = "0.5.0", default-features = false }
rust_icu_ubrk = { path = "../rust_icu_ubrk", version = "0.5.0", default-features = false }
rust_icu_ucal = { path = "../rust_icu_ucal", version = "0.5.0", default-features = false }
rust_icu_ucol = { path = "../rust_icu_ucol", version = "0.5.0", default-features = false }
rust_icu_udat = { path = "../rust_icu_udat", version = "0.5.0", default-features = false }
rust_icu_udata = { path = "../rust_icu_udata", version = "0.5.0", default-features = false }
rust_icu_uenum = { path = "../rust_icu_uenum", version = "0.5.0", default-features = false }
rust_icu_ulistformatter = { path = "../rust_icu_ulistformatter", version = "0.5.0", default-features = false }
rust_icu_uloc = { path = "../rust_icu_uloc", version = "0.5.0", default-features = false }
rust_icu_umsg = { path = "../rust_icu_umsg", version = "0.5.0", default-features = false }
rust_icu_ustring = { path = "../rust_icu_ustring", version = "0.5.0", default-features = false }
rust_icu_utext = { path = "../rust_icu_utext", version = "0.5.0", default-features = false }
rust_icu_utrans = { path = "../rust_icu_utrans", version = "0.5.0", default-features = false }
thiserror = "1.0.9"

# See the feature description in ../rust_icu_sys/Cargo.toml for details.
Expand Down
4 changes: 2 additions & 2 deletions rust_icu_common/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
edition = "2018"
name = "rust_icu_common"
version = "0.4.1"
version = "0.5.0"
authors = ["Google Inc."]
license = "Apache-2.0"
readme = "README.md"
Expand All @@ -20,7 +20,7 @@ keywords = ["icu", "unicode", "i18n", "l10n"]
anyhow = "1.0.25"
thiserror = "1.0.9"

rust_icu_sys = { path = "../rust_icu_sys", version = "0.4.1", default-features = false}
rust_icu_sys = { path = "../rust_icu_sys", version = "0.5.0", default-features = false}

# See the feature description in ../rust_icu_sys/Cargo.toml for details.
[features]
Expand Down
20 changes: 10 additions & 10 deletions rust_icu_ecma402/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license = "Apache-2.0"
name = "rust_icu_ecma402"
readme = "README.md"
repository = "https://github.com/google/rust_icu"
version = "0.4.1"
version = "0.5.0"

description = """
ECMA 402 standard implementation in Rust.
Expand All @@ -17,15 +17,15 @@ anyhow = "1.0.25"
ecma402_traits = { path = "../ecma402_traits", version = "0.2.0" }
log = "0.4.6"
paste = "1.0"
rust_icu_common = { path = "../rust_icu_common", version = "0.4.1", default-features = false }
rust_icu_udat = { path = "../rust_icu_udat", version = "0.4.1", default-features = false }
rust_icu_sys = { path = "../rust_icu_sys", version = "0.4.1", default-features = false }
rust_icu_uloc = { path = "../rust_icu_uloc", version = "0.4.1", default-features = false }
rust_icu_ustring = { path = "../rust_icu_ustring", version = "0.4.1", default-features = false }
rust_icu_ulistformatter = { path = "../rust_icu_ulistformatter", version = "0.4.1", default-features = false }
rust_icu_upluralrules = { path = "../rust_icu_upluralrules", version = "0.4.1", default-features = false }
rust_icu_unum = { path = "../rust_icu_unum", version = "0.4.1", default-features = false }
rust_icu_unumberformatter = { path = "../rust_icu_unumberformatter", version = "0.4.1", default-features = false }
rust_icu_common = { path = "../rust_icu_common", version = "0.5.0", default-features = false }
rust_icu_udat = { path = "../rust_icu_udat", version = "0.5.0", default-features = false }
rust_icu_sys = { path = "../rust_icu_sys", version = "0.5.0", default-features = false }
rust_icu_uloc = { path = "../rust_icu_uloc", version = "0.5.0", default-features = false }
rust_icu_ustring = { path = "../rust_icu_ustring", version = "0.5.0", default-features = false }
rust_icu_ulistformatter = { path = "../rust_icu_ulistformatter", version = "0.5.0", default-features = false }
rust_icu_upluralrules = { path = "../rust_icu_upluralrules", version = "0.5.0", default-features = false }
rust_icu_unum = { path = "../rust_icu_unum", version = "0.5.0", default-features = false }
rust_icu_unumberformatter = { path = "../rust_icu_unumberformatter", version = "0.5.0", default-features = false }

[dev-dependencies]
anyhow = "1.0.25"
Expand Down
12 changes: 6 additions & 6 deletions rust_icu_intl/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ license = "Apache-2.0"
name = "rust_icu_intl"
readme = "README.md"
repository = "https://github.com/google/rust_icu"
version = "0.4.1"
version = "0.5.0"

description = """
Native bindings to the ICU4C library from Unicode.
Expand All @@ -17,11 +17,11 @@ umsg.h
anyhow = "1.0.25"
log = "0.4.6"
paste = "1.0"
rust_icu_common = { path = "../rust_icu_common", version = "0.4.1", default-features = false }
rust_icu_sys = { path = "../rust_icu_sys", version = "0.4.1", default-features = false }
rust_icu_uloc = { path = "../rust_icu_uloc", version = "0.4.1", default-features = false }
rust_icu_umsg = { path = "../rust_icu_umsg", version = "0.4.1", default-features = false }
rust_icu_ustring = { path = "../rust_icu_ustring", version = "0.4.1", default-features = false }
rust_icu_common = { path = "../rust_icu_common", version = "0.5.0", default-features = false }
rust_icu_sys = { path = "../rust_icu_sys", version = "0.5.0", default-features = false }
rust_icu_uloc = { path = "../rust_icu_uloc", version = "0.5.0", default-features = false }
rust_icu_umsg = { path = "../rust_icu_umsg", version = "0.5.0", default-features = false }
rust_icu_ustring = { path = "../rust_icu_ustring", version = "0.5.0", default-features = false }
thiserror = "1.0.9"

# See the feature description in ../rust_icu_sys/Cargo.toml for details.
Expand Down
2 changes: 1 addition & 1 deletion rust_icu_sys/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rust_icu_sys"
version = "0.4.1"
version = "0.5.0"
authors = ["Google Inc."]
license = "Apache-2.0"
readme = "README.md"
Expand Down
Loading

0 comments on commit e7fb6e5

Please sign in to comment.