Skip to content

Add CI to build and publish compiled binaries#6826

Merged
robertbastian merged 11 commits intounicode-org:mainfrom
robertbastian:artifacts
Aug 13, 2025
Merged

Add CI to build and publish compiled binaries#6826
robertbastian merged 11 commits intounicode-org:mainfrom
robertbastian:artifacts

Conversation

@robertbastian
Copy link
Copy Markdown
Member

@robertbastian robertbastian commented Aug 8, 2025

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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.

@robertbastian robertbastian force-pushed the artifacts branch 3 times, most recently from 00cab07 to 8f20b88 Compare August 8, 2025 12:58
@robertbastian robertbastian requested a review from mosuem August 11, 2025 13:16
@robertbastian robertbastian marked this pull request as ready for review August 11, 2025 13:16
@robertbastian robertbastian requested a review from a team as a code owner August 11, 2025 13:16
@robertbastian robertbastian requested a review from younies August 11, 2025 13:17
@robertbastian robertbastian requested a review from sffc August 12, 2025 15:27
@sffc
Copy link
Copy Markdown
Member

sffc commented Aug 13, 2025

/gemini review

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question: Have you tested this action, since it only runs on tags?

Copy link
Copy Markdown
Member Author

@robertbastian robertbastian Aug 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 }}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question: Why are you using a Dart script to build these, instead of a cargo make script or something?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Comment on lines +13 to +33
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',
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Observation: You have this list, or things derived from this list, in multiple places. Seems fragile?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question: Why can't you use lld for everything? Why do you need to install and point to custom linkers for each platform

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@sffc sffc changed the title Build artifacts Add CI to build and publish compiled binaries Aug 13, 2025
@robertbastian robertbastian requested a review from sffc August 13, 2025 11:22
@robertbastian robertbastian merged commit 0027ccb into unicode-org:main Aug 13, 2025
32 checks passed
@robertbastian robertbastian deleted the artifacts branch August 13, 2025 15:16
@sffc
Copy link
Copy Markdown
Member

sffc commented Aug 15, 2025

  • @robertbastian Can I ship the package on pub.dev as 2.0.0-dev0?
  • @sffc Yes, I think that is the correct number to use, and I think it's better to have a package out there, even if we decide to tweak it later with more features / slicing / etc.
  • @Manishearth LGTM. A bit worried about the stability stuff.
  • @sffc Let's confirm with @Moseum. We're meeting later today.
  • @robertbastian I think @Moseum is okay with this; he preferred 0.2 but is okay with 2.0.0-dev0.
  • @sffc I think releasing a prerelease artifact doesn't constitute a Technical Decision and therefore we can approve it here in the Working Group. But, FYI @zbraniecki.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants