From 519f0ff1646fc6f7a2893b40f2f016720a7b0a37 Mon Sep 17 00:00:00 2001 From: Robert Bastian <4706271+robertbastian@users.noreply.github.com> Date: Wed, 14 Aug 2024 15:06:54 +0200 Subject: [PATCH] Don't build unnecessary ICU4X components (#867) --- .github/workflows/intl4x.yml | 6 ++--- .github/workflows/intl4x_artifacts.yml | 32 +++++++++++++------------- pkgs/intl4x/hook/build.dart | 4 ++-- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/.github/workflows/intl4x.yml b/.github/workflows/intl4x.yml index 4aa4d942..db807e3a 100644 --- a/.github/workflows/intl4x.yml +++ b/.github/workflows/intl4x.yml @@ -118,7 +118,7 @@ jobs: cd ffi/dart dart pub get cd ../.. - dart run ffi/dart/tool/build_libs.dart bin/linux_x64 linux_x64 dynamic default_components,experimental_components + dart run ffi/dart/tool/build_libs.dart bin/linux_x64 linux_x64 dynamic icu_collator,icu_datetime,icu_list,icu_decimal,icu_plurals,experimental_components - name: Build Mac if: matrix.os == 'macos-latest' @@ -130,7 +130,7 @@ jobs: cd ffi/dart dart pub get cd ../.. - dart run ffi/dart/tool/build_libs.dart bin/macos_arm64 macos_arm64 dynamic default_components,experimental_components + dart run ffi/dart/tool/build_libs.dart bin/macos_arm64 macos_arm64 dynamic icu_collator,icu_datetime,icu_list,icu_decimal,icu_plurals,experimental_components - name: Build Windows if: matrix.os == 'windows-latest' @@ -142,7 +142,7 @@ jobs: cd ffi/dart dart pub get cd ../.. - dart run ffi/dart/tool/build_libs.dart bin/windows_x64 windows_x64 dynamic default_components,experimental_components + dart run ffi/dart/tool/build_libs.dart bin/windows_x64 windows_x64 dynamic icu_collator,icu_datetime,icu_list,icu_decimal,icu_plurals,experimental_components - run: echo "LOCAL_ICU4X_BINARY=$(realpath submodules/icu4x/bin/linux_x64)" >> $GITHUB_ENV if: matrix.os == 'ubuntu-latest' diff --git a/.github/workflows/intl4x_artifacts.yml b/.github/workflows/intl4x_artifacts.yml index 3eb6dd17..0b92fff1 100644 --- a/.github/workflows/intl4x_artifacts.yml +++ b/.github/workflows/intl4x_artifacts.yml @@ -65,14 +65,14 @@ jobs: cd ffi/dart dart pub get cd ../.. - dart run ffi/dart/tool/build_libs.dart bin/android_arm android_arm dynamic default_components,experimental_components - dart run ffi/dart/tool/build_libs.dart bin/android_arm64 android_arm64 dynamic default_components,experimental_components - dart run ffi/dart/tool/build_libs.dart bin/android_ia32 android_ia32 dynamic default_components,experimental_components - dart run ffi/dart/tool/build_libs.dart bin/android_x64 android_x64 dynamic default_components,experimental_components - dart run ffi/dart/tool/build_libs.dart bin/linux_arm linux_arm dynamic default_components,experimental_components - dart run ffi/dart/tool/build_libs.dart bin/linux_arm64 linux_arm64 dynamic default_components,experimental_components - dart run ffi/dart/tool/build_libs.dart bin/linux_riscv64 linux_riscv64 dynamic default_components,experimental_components - dart run ffi/dart/tool/build_libs.dart bin/linux_x64 linux_x64 dynamic default_components,experimental_components + dart run ffi/dart/tool/build_libs.dart bin/android_arm android_arm dynamic icu_collator,icu_datetime,icu_list,icu_decimal,icu_plurals,experimental_components + dart run ffi/dart/tool/build_libs.dart bin/android_arm64 android_arm64 dynamic icu_collator,icu_datetime,icu_list,icu_decimal,icu_plurals,experimental_components + dart run ffi/dart/tool/build_libs.dart bin/android_ia32 android_ia32 dynamic icu_collator,icu_datetime,icu_list,icu_decimal,icu_plurals,experimental_components + dart run ffi/dart/tool/build_libs.dart bin/android_x64 android_x64 dynamic icu_collator,icu_datetime,icu_list,icu_decimal,icu_plurals,experimental_components + dart run ffi/dart/tool/build_libs.dart bin/linux_arm linux_arm dynamic icu_collator,icu_datetime,icu_list,icu_decimal,icu_plurals,experimental_components + dart run ffi/dart/tool/build_libs.dart bin/linux_arm64 linux_arm64 dynamic icu_collator,icu_datetime,icu_list,icu_decimal,icu_plurals,experimental_components + dart run ffi/dart/tool/build_libs.dart bin/linux_riscv64 linux_riscv64 dynamic icu_collator,icu_datetime,icu_list,icu_decimal,icu_plurals,experimental_components + dart run ffi/dart/tool/build_libs.dart bin/linux_x64 linux_x64 dynamic icu_collator,icu_datetime,icu_list,icu_decimal,icu_plurals,experimental_components cargo run -p icu_datagen -- --locales full --keys all --format blob --out bin/full.postcard @@ -99,11 +99,11 @@ jobs: cd ffi/dart dart pub get cd ../.. - dart run ffi/dart/tool/build_libs.dart bin/ios_arm ios_arm dynamic default_components,experimental_components - dart run ffi/dart/tool/build_libs.dart bin/ios_arm64 ios_arm64 dynamic default_components,experimental_components - dart run ffi/dart/tool/build_libs.dart bin/ios_x64 ios_x64 dynamic default_components,experimental_components - dart run ffi/dart/tool/build_libs.dart bin/macos_arm64 macos_arm64 dynamic default_components,experimental_components - dart run ffi/dart/tool/build_libs.dart bin/macos_x64 macos_x64 dynamic default_components,experimental_components + dart run ffi/dart/tool/build_libs.dart bin/ios_arm ios_arm dynamic icu_collator,icu_datetime,icu_list,icu_decimal,icu_plurals,experimental_components + dart run ffi/dart/tool/build_libs.dart bin/ios_arm64 ios_arm64 dynamic icu_collator,icu_datetime,icu_list,icu_decimal,icu_plurals,experimental_components + dart run ffi/dart/tool/build_libs.dart bin/ios_x64 ios_x64 dynamic icu_collator,icu_datetime,icu_list,icu_decimal,icu_plurals,experimental_components + dart run ffi/dart/tool/build_libs.dart bin/macos_arm64 macos_arm64 dynamic icu_collator,icu_datetime,icu_list,icu_decimal,icu_plurals,experimental_components + dart run ffi/dart/tool/build_libs.dart bin/macos_x64 macos_x64 dynamic icu_collator,icu_datetime,icu_list,icu_decimal,icu_plurals,experimental_components cd provider/datagen # avoid global feature resolution rustup target add aarch64-apple-darwin @@ -125,9 +125,9 @@ jobs: cd ffi/dart dart pub get cd ../.. - dart run ffi/dart/tool/build_libs.dart bin/windows_arm64 windows_arm64 dynamic default_components,experimental_components - dart run ffi/dart/tool/build_libs.dart bin/windows_ia32 windows_ia32 dynamic default_components,experimental_components - dart run ffi/dart/tool/build_libs.dart bin/windows_x64 windows_x64 dynamic default_components,experimental_components + dart run ffi/dart/tool/build_libs.dart bin/windows_arm64 windows_arm64 dynamic icu_collator,icu_datetime,icu_list,icu_decimal,icu_plurals,experimental_components + dart run ffi/dart/tool/build_libs.dart bin/windows_ia32 windows_ia32 dynamic icu_collator,icu_datetime,icu_list,icu_decimal,icu_plurals,experimental_components + dart run ffi/dart/tool/build_libs.dart bin/windows_x64 windows_x64 dynamic icu_collator,icu_datetime,icu_list,icu_decimal,icu_plurals,experimental_components cd provider/datagen # avoid global feature resolution rustup target add aarch64-pc-windows-msvc diff --git a/pkgs/intl4x/hook/build.dart b/pkgs/intl4x/hook/build.dart index 8c13e0e9..5b838380 100644 --- a/pkgs/intl4x/hook/build.dart +++ b/pkgs/intl4x/hook/build.dart @@ -189,7 +189,7 @@ Future buildLib(BuildConfig config, String workingDirectory) async { final tempDir = await Directory.systemTemp.createTemp(); final stdFeatures = [ - 'default_components', + 'icu_collator,icu_datetime,icu_list,icu_decimal,icu_plurals', 'compiled_data', 'buffer_provider', 'logging', @@ -197,7 +197,7 @@ Future buildLib(BuildConfig config, String workingDirectory) async { 'experimental_components', ]; final noStdFeatures = [ - 'default_components', + 'icu_collator,icu_datetime,icu_list,icu_decimal,icu_plurals', 'compiled_data', 'buffer_provider', 'libc-alloc',