Fix Rust Releases - #556
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adjusts the Rust C-API build/test setup to address macOS dynamic linking issues and to stop producing a staticlib artifact during releases.
Changes:
- Configure the C-API crate to build only as a
cdylib(nostaticlib). - Add a macOS-specific post-link step in the C-API test runner to rewrite an absolute dylib install name to use
@rpath. - Update the local
build-capitask command used to generate the C-API distribution.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| pyproject.toml | Updates the build-capi task command for producing the C-API dist. |
| crates/ekore_capi/tests/run_tests.sh | Adds a macOS-specific install-name rewrite to make test binaries find the dylib via @rpath. |
| crates/ekore_capi/Cargo.toml | Removes staticlib from the crate’s crate-type list to stop generating static libraries. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Doubt: Should Rust, C-API, and Python API tests be run on all OS and Architecture combinations which we will use when publishing? Suggestion: Please try changing the permission of |
|
There was one more issue, if you see the artifacts of |
A lot of researchers do use macOS locally and all clusters are linux so the minimal set would be mac-arm and linux-x64 |
|
I tried changing |
@scarlehoff eko (and so the token I think) is owned by the "N3PDF" user on PyPI - to which I have no longer access, since it needs 2FA now (I have only the password). I hope you still have access? 🙈 if so, can you please take care of this? |
|
Concerning the location of the CAPI files: is this triggered by skipping "Publish release" https://github.com/NNPDF/eko/actions/runs/29902592251/job/89195933659 and will get fixed once we have all artifacts (which were failing before)? |
|
Since we are fixing #537 here: can I please add one more unrelated thing? After having said that, I'm comparing https://nnpdf.github.io/pineappl/docs/installation.html#building-the-capi-from-source to https://docs.rs/ekore_capi/0.15.5/ekore_capi/#building--consuming . I think in PineAPPL pointing out how to install Rust or how to install I suggest to do the following:
|
|
one more glitch from #537: the links here eko/crates/ekore_capi/src/lib.rs Line 1 in d41da2f and here eko/crates/ekore_capi/src/lib.rs Line 7 in d41da2f are effectively the same, but different in practice - I suggest to use always the former. The second version is also used below eko/crates/ekore_capi/src/lib.rs Line 62 in d41da2f |
|
Add one more glitch from #550 (sorry for spamming this with unrelated stuff 🙈 ): Line 63 in d41da2f needs an additional let tables = document.getElementsByClassName("item-table");
for (let el of tables) replaceAbbrev(el);to make the abbreviations also work, e.g., also on the start page function list (etc.) |
Closes #555
In this PR we,
staticlibgeneration.ekoversioning dynamic, hence changing the.whlname.