-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(ci): dart-sdk
rust cross compile for Android target
#222
Conversation
|
|
YES this is FINALLY ready to go, PTAL @rasendubi @leoromanovsky |
dart-sdk
rust cross compile for Android target
- name: Override eppo_core for testing | ||
shell: bash | ||
run: | | ||
mkdir -p "${CARGO_HOME:-$HOME/.cargo}" | ||
echo "[patch.crates-io.eppo_core]" >> "${CARGO_HOME:-$HOME/.cargo}/config.toml" | ||
echo "path = '${{ github.workspace }}/eppo_core'" >> "${CARGO_HOME:-$HOME/.cargo}/config.toml" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this need to be removed or later after publishing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah I think for CI here we want to build against the current unreleased version of eppo_core, but for publishing (assuming that will be in a separate github workflow) we'll want to use the released version instead. So yeah I think this is fine as is, cc @rasendubi to keep me honest
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, yeah. good catch that we need to remove publish against released version of eppo_core
I've updated CI here: #229
* feat(dart): setup minimal example Copied flutter_rust_bridge minimal example[1] and beat it into working: - vendored simple_build.dart to remove dependency on an unpublished git-only package - updated packages because I couldn't get dart test to work otherwise - stripped flutter_rust_bridge internal options [1]: https://github.com/fzyzcjy/flutter_rust_bridge/tree/05247dd90a7fcb2512c5ede13cf00271b0eb548e/frb_example/dart_minimal * chore: add logs for stopping background runtime Dropping `BackgroundRuntime` cancels all tracked tasks. This may (and have) lead to hard to debug issues when configuration poller just stops working and `.wait_for_configuration()` unhelpfully returns `PollerThreadPanicked`. (I am a little embarrassed to say how long this simple issue took me to debug when it was paired with running in Dart environment.) * feat(dart): PoC implementation of SDK * feat(dart): boolean assignment, bandits, logging * feat(dart): rest of assignment methods * test(dart): sdk-test-data tests * feat(dart): enable wasm_js for getrandom on wasm platform * feat(core,dart): abstract over async runtimes to support Dart web * chore(dart): upgrade flutter_rust_bridge * chore(dart): integrate with changeset * fix: add .gitkeep for dart-sdk/lib/src/rust directory * fix(dart): use poll interval/jitter initialization parameters * chore(dart): add build&test CI setup * chore(dart): add hook/build.dart It looks like newer versions of dart look at hook/build.dart instead of build.dart in the root and this is the longer-term plan, too. * chore(dart): update lockfile * chore(dart): bump eppo_core version * chore(dart): pin to 3.6 (for testing) * chore(dart): properly install flutter_rust_bridge_codegen * chore(dart): add missing working-directory * chore(dart): install toolchain for wasm * chore(dart): fix lint errors * chore(dart): downgrade version to 0.1.0, prepare to publish * chore(dart): bump minimal sdk boundary to 3.6.0 This is required to use hook/build.dart. * chore(dart): lower meta boundary * fix(core): fix configuration poller running in wasm target * fix(dart): properly default base url * chore(dart): rename eppo_dart to eppo_sdk This is used as the name of js/wasm generated files. * fix(dart): enable logging in web * chore(dart): upload dart web files in ci * chore(dart): CI to publish dart sdk * docs(dart): add dart tag format to documentation * chore(dart): add license file * chore(dart): add missing id-token permissions for write * chore(dart): refresh pub.dev auth token? * chore(dart): release on tag, not release event 🤷 * chore(dart): silence publish dry-run error code * chore(android): Setup dart-sdk for android target (#220) * add plugin info * remove plugin details * vendor libs * remove corepack changes * add rust api files * add more generated code * add another missing file * catch reqwest panic * replace openssl with rustls-tls * update deps * remove native-tls and openssl * remove generated files * another file to remove * remove openssl-sys * newlines * revert this * keep vendored feature * try to fix python CI * set vars for linux gnu * install deps * another try * build with `cross` instead * fix cross commang * fix target platform triple * another try * revert action changes * another try - see PyO3/maturin-action#222 * once again * anotehr place * chore: add changeset for openssl->rustls change * chore(dart): build release artifacts for web This reduces wasm file from 12M down to 2M. * chore(ci): `dart-sdk` rust cross compile for Android target (#222) * chore(ci): dart-sdk rust cross compile for android target * eppo_dart instead of eppo_sdk * revert this * build patches * revert this * update file path for testing * another try * change working dir * CI tweaks * better logs * more fix attempts * aaaand another try * 10th time is the charm * check for path instead * check CI env var * passthrough env var * use the fork of maturin-action * yup * bump action version * fix step * fix ste * update action version, another shot at android fix * fix pytest * move file * add file * set rust root to current dir * fix cross build config * manually run codegen * install dart * reorder steps * another reorder * another try * go back to main maturin-action * remove custom build scripts * add android x86 * remove images cross config * go back to maturin-action v1 --------- Co-authored-by: Leo Romanovsky <leoromanovsky@users.noreply.github.com> Co-authored-by: Felipe Lima <felipe.lima@gmail.com>
Note: This is a stacked PR on #197
Description
cross-rs/cross
to cross-compile dart-sdk for android target in CImaturin-action
build.rs
in favor of standalone step (flutter_rust_bridge_codegen generate --config-file flutter_rust_bridge.yaml
)The flutter codegen build step caused numerous issues, most notably with docker paths when running
cross build
and with trying to installcargo-expand
during the build, which caused a deadlock. According to this it shouldn't be doing that, so that seemed like a bug to me.Additionally, we don't need dart codegen when cross-compiling the dart sdk for Android, so it makes sense to skip that.