ci: add riscv64 release binary via cross-rs#9228
ci: add riscv64 release binary via cross-rs#9228gounthar wants to merge 1 commit intojj-vcs:mainfrom
Conversation
|
please move the Closes line into the commit description to adhere to our commit style. |
dd16a95 to
f4bfc16
Compare
|
Done, moved the Closes line into the commit description. Thanks for the heads-up on the style. |
|
I believe release version of cross-rs (https://github.com/cross-rs/cross/releases/tag/v0.2.5) doesn't support some targets. |
f4bfc16 to
ba41a78
Compare
|
Good catch, thank you! I've updated to install cross from git at a pinned commit (f86fd03), following the same approach as sharkdp/bat#3533. I should have checked the released version's target support before submitting. |
ba41a78 to
71269a5
Compare
|
Thanks for the pointer. Moved the change to |
|
Thank you! Looks like it worked, but the binary itself is still dynamically linked: Perhaps this is something to do with musl riscv? Or cross-rs? I'm not sure why static linking wouldn't be the default here, but we should preserve this behavior here too (a good example of why I wanted to produce nightly binaries and not releases yet!) |
|
Thanks for checking. 😊 I should have verified the binary type before submitting. I just pushed a fix: it adds Sorry for the oversight. |
|
You can squash the second commit into the first one, as we generally don't add commits to address reviews. Thanks. |
Add riscv64gc-unknown-linux-musl to the binaries.yml matrix using cross-rs for cross-compilation on a standard ubuntu-24.04 runner. Installs cross from git at a pinned commit (f86fd03) since the released v0.2.5 does not include riscv64gc-unknown-linux-musl support. Uses cross in place of cargo for the riscv64 build; all other targets are unchanged. The cross-rs toolchain for this target does not default to static linking; set RUSTFLAGS=-C target-feature=+crt-static via a per-matrix rustflags field so the binary is fully statically linked, matching the x86_64-musl and aarch64-musl outputs. Closes jj-vcs#9183 Signed-off-by: Bruno Verachten <[email protected]>
6ed424e to
2438dd7
Compare
|
Done, squashed both commits into one. The static linking fix and the Closes line are now part of the original commit. Thanks for the guidance. 🙏 |
|
Would you mind pushing to your repo once more and getting a static binary out, just so we can do a double check? Thanks. |
| use_cross: true | ||
| rustflags: "-C target-feature=+crt-static" |
There was a problem hiding this comment.
nit: This probably should be in https://github.com/jj-vcs/jj/blob/main/.cargo/config-ci.toml.
|
Pushed the squashed commit (with |
|
Build passed; Could you download the artifact and verify |
Adds
riscv64gc-unknown-linux-muslto the release matrix using cross-rs for cross-compilation on a standardubuntu-24.04runner, as discussed in #9183.Changes:
linux-riscv64-muslto the build matrix withuse_cross: truecrossbefore the build step (only for riscv64)cross buildinstead ofcargo buildfor riscv64; all other targets are unchangedCloses #9183