Skip to content

Commit

Permalink
Generate static libraries (#871)
Browse files Browse the repository at this point in the history
* Rename hash tool

* Update artifacts script

* Fix typo

* Fix whitespace

* Rename file in readme

* Rename

* Don't update hash

* Add compiled_data only for dylibs
  • Loading branch information
mosuem authored Aug 20, 2024
1 parent 88efbbc commit cd14ae8
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 19 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/intl4x.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,12 @@ jobs:
- name: Display structure of downloaded files
run: ls -R

- run: |
- name: Run `dart pub get`
run: |
cd pkgs/intl4x
dart pub get
- run: |
- name: Run `dart test`
run: |
cd pkgs/intl4x
dart --enable-experiment=native-assets test
35 changes: 19 additions & 16 deletions .github/workflows/intl4x_artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ jobs:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
compiletype: [ dynamic, static ]
runs-on: ${{ matrix.os }}
env:
DATA: ${{ matrix.compiletype == 'dynamic' && ',compiled_data' || '' }}

steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
Expand Down Expand Up @@ -65,14 +68,14 @@ jobs:
cd ffi/dart
dart pub get
cd ../..
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,compiled_data
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,compiled_data
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,compiled_data
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,compiled_data
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,compiled_data
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,compiled_data
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,compiled_data
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,compiled_data
dart run ffi/dart/tool/build_libs.dart bin/android_arm_${{ matrix.compiletype }} android_arm ${{ matrix.compiletype }} icu_collator,icu_datetime,icu_list,icu_decimal,icu_plurals,experimental_components${{ env.DATA }}
dart run ffi/dart/tool/build_libs.dart bin/android_arm64_${{ matrix.compiletype }} android_arm64 ${{ matrix.compiletype }} icu_collator,icu_datetime,icu_list,icu_decimal,icu_plurals,experimental_components${{ env.DATA }}
dart run ffi/dart/tool/build_libs.dart bin/android_ia32_${{ matrix.compiletype }} android_ia32 ${{ matrix.compiletype }} icu_collator,icu_datetime,icu_list,icu_decimal,icu_plurals,experimental_components${{ env.DATA }}
dart run ffi/dart/tool/build_libs.dart bin/android_x64_${{ matrix.compiletype }} android_x64 ${{ matrix.compiletype }} icu_collator,icu_datetime,icu_list,icu_decimal,icu_plurals,experimental_components${{ env.DATA }}
dart run ffi/dart/tool/build_libs.dart bin/linux_arm_${{ matrix.compiletype }} linux_arm ${{ matrix.compiletype }} icu_collator,icu_datetime,icu_list,icu_decimal,icu_plurals,experimental_components${{ env.DATA }}
dart run ffi/dart/tool/build_libs.dart bin/linux_arm64_${{ matrix.compiletype }} linux_arm64 ${{ matrix.compiletype }} icu_collator,icu_datetime,icu_list,icu_decimal,icu_plurals,experimental_components${{ env.DATA }}
dart run ffi/dart/tool/build_libs.dart bin/linux_riscv64_${{ matrix.compiletype }} linux_riscv64 ${{ matrix.compiletype }} icu_collator,icu_datetime,icu_list,icu_decimal,icu_plurals,experimental_components${{ env.DATA }}
dart run ffi/dart/tool/build_libs.dart bin/linux_x64_${{ matrix.compiletype }} linux_x64 ${{ matrix.compiletype }} icu_collator,icu_datetime,icu_list,icu_decimal,icu_plurals,experimental_components${{ env.DATA }}
cargo run -p icu_datagen -- --locales full --keys all --format blob --out bin/full.postcard
Expand All @@ -99,11 +102,11 @@ jobs:
cd ffi/dart
dart pub get
cd ../..
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,compiled_data
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,compiled_data
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,compiled_data
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,compiled_data
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,compiled_data
dart run ffi/dart/tool/build_libs.dart bin/ios_arm_${{ matrix.compiletype }} ios_arm ${{ matrix.compiletype }} icu_collator,icu_datetime,icu_list,icu_decimal,icu_plurals,experimental_components${{ env.DATA }}
dart run ffi/dart/tool/build_libs.dart bin/ios_arm64_${{ matrix.compiletype }} ios_arm64 ${{ matrix.compiletype }} icu_collator,icu_datetime,icu_list,icu_decimal,icu_plurals,experimental_components${{ env.DATA }}
dart run ffi/dart/tool/build_libs.dart bin/ios_x64_${{ matrix.compiletype }} ios_x64 ${{ matrix.compiletype }} icu_collator,icu_datetime,icu_list,icu_decimal,icu_plurals,experimental_components${{ env.DATA }}
dart run ffi/dart/tool/build_libs.dart bin/macos_arm64_${{ matrix.compiletype }} macos_arm64 ${{ matrix.compiletype }} icu_collator,icu_datetime,icu_list,icu_decimal,icu_plurals,experimental_components${{ env.DATA }}
dart run ffi/dart/tool/build_libs.dart bin/macos_x64_${{ matrix.compiletype }} macos_x64 ${{ matrix.compiletype }} icu_collator,icu_datetime,icu_list,icu_decimal,icu_plurals,experimental_components${{ env.DATA }}
cd provider/datagen # avoid global feature resolution
rustup target add aarch64-apple-darwin
Expand All @@ -125,9 +128,9 @@ jobs:
cd ffi/dart
dart pub get
cd ../..
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,compiled_data
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,compiled_data
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,compiled_data
dart run ffi/dart/tool/build_libs.dart bin/windows_arm64_${{ matrix.compiletype }} windows_arm64 ${{ matrix.compiletype }} icu_collator,icu_datetime,icu_list,icu_decimal,icu_plurals,experimental_components${{ env.DATA }}
dart run ffi/dart/tool/build_libs.dart bin/windows_ia32_${{ matrix.compiletype }} windows_ia32 ${{ matrix.compiletype }} icu_collator,icu_datetime,icu_list,icu_decimal,icu_plurals,experimental_components${{ env.DATA }}
dart run ffi/dart/tool/build_libs.dart bin/windows_x64_${{ matrix.compiletype }} windows_x64 ${{ matrix.compiletype }} icu_collator,icu_datetime,icu_list,icu_decimal,icu_plurals,experimental_components${{ env.DATA }}
cd provider/datagen # avoid global feature resolution
rustup target add aarch64-pc-windows-msvc
Expand Down
2 changes: 1 addition & 1 deletion pkgs/intl4x/hook/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
1. Create PR.
2. Run `bash tools/regenerate_bindings.sh`, and fix resulting errors.
3. Update `const version` in `hook/version.dart` to tag.
4. Regenerate hashes using `cd pkgs/intl4x/; dart --enable-experiment=native-assets run tool/generate_hashes.dart`.
4. Regenerate hashes using `cd pkgs/intl4x/; dart --enable-experiment=native-assets run tool/regenerate_hashes.dart`.
5. Land PR.
File renamed without changes.

0 comments on commit cd14ae8

Please sign in to comment.