Add CI to build and publish compiled binaries#6826
Add CI to build and publish compiled binaries#6826robertbastian merged 11 commits intounicode-org:mainfrom
Conversation
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments or fill out our survey to provide feedback. |
00cab07 to
8f20b88
Compare
This reverts commit 4686320.
8f20b88 to
60c1fc2
Compare
This reverts commit b4a65e0.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request refactors the build scripts to use Rust target triples (e.g., aarch64-apple-darwin) for identifying build artifacts, which is a good improvement for clarity and consistency. However, I've identified a couple of critical issues in the auto-generated hashes.dart file where incorrect Rust target strings are used as keys. These errors would break the fetching of pre-built binaries for Android ARM64 and macOS ARM64 platforms. I've also pointed out a minor area for code cleanup. Please address these points to ensure the build process works correctly for all users.
| name: ffi-${{matrix.os}}-${{ matrix.compiletype }}${{ matrix.compiletype == 'static' && matrix.include_data == true && '-with_data' || '' }}-libs | ||
| path: bin | ||
|
|
||
| release-ffi-libs: |
There was a problem hiding this comment.
Question: Have you tested this action, since it only runs on tags?
There was a problem hiding this comment.
I've run in up to the release step, see the commit history
| run: | | ||
| (cd ffi/dart && dart pub get) | ||
|
|
||
| dart ffi/dart/lib/src/hook_helpers/build_libs.dart --working_directory . --file bin/icu4x-2-${{ matrix.compiletype }}${{ env.FILENAME_SUFFIX }}-armv7-linux-androideabi --target armv7-linux-androideabi --compile_type ${{ matrix.compiletype }} --cargo_features ${{ env.FEATURES }} |
There was a problem hiding this comment.
Question: Why are you using a Dart script to build these, instead of a cargo make script or something?
There was a problem hiding this comment.
because we already have a dart build script. I plan to migrate this in the future (but we'll always need a Dart build script anyway)
| for (final rustTarget in [ | ||
| 'armv7-linux-androideabi', | ||
| 'aarch64-linux-android', | ||
| 'i686-linux-android', | ||
| 'riscv64-linux-android', | ||
| 'x86_64-linux-android', | ||
| 'aarch64-unknown-fuchsia', | ||
| 'x86_64-unknown-fuchsia', | ||
| 'aarch64-apple-ios', | ||
| 'x86_64-apple-ios', | ||
| 'armv7-unknown-linux-gnueabihf', | ||
| 'aarch64-unknown-linux-gnu', | ||
| 'i686-unknown-linux-gnu', | ||
| 'riscv32gc-unknown-linux-gnu', | ||
| 'riscv64gc-unknown-linux-gnu', | ||
| 'x86_64-unknown-linux-gnu', | ||
| 'aarch64-apple-darwin', | ||
| 'x86_64-apple-darwin', | ||
| 'aarch64-pc-windows-msvc', | ||
| 'i686-pc-windows-msvc', | ||
| 'x86_64-pc-windows-msvc', |
There was a problem hiding this comment.
Observation: You have this list, or things derived from this list, in multiple places. Seems fragile?
There was a problem hiding this comment.
the whole hash code needs to be cleaned up but I can only really work on it once we have published artifacts
| echo "riscv64-linux-android.linker=\"$ANDROID_NDK_LATEST_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/riscv64-linux-android35-clang\"" >> .cargo/config.toml | ||
| echo "aarch64-unknown-linux-gnu.linker=\"aarch64-linux-gnu-gcc\"" >> .cargo/config.toml | ||
| echo "armv7-unknown-linux-gnueabihf.linker=\"arm-linux-gnueabihf-gcc\"" >> .cargo/config.toml | ||
| echo "riscv64gc-unknown-linux-gnu.linker=\"riscv64-linux-gnu-gcc\"" >> .cargo/config.toml |
There was a problem hiding this comment.
Question: Why can't you use lld for everything? Why do you need to install and point to custom linkers for each platform
There was a problem hiding this comment.
this is existing code that currently lives in dart-lang/i18n, but previously already lived in ICU4X where you already reviewed it: https://github.com/unicode-org/icu4x/pull/4514/files#diff-d1bb081e6d04ced14e89691280b752ae6124cee2b13d0af35840b7bf3db32a07
|
#4689