Closed glehmann closed 6 months ago
hey @joepio , I see in #34 that your using cross and earthly with much more success than I do. Would you have a configuration that you could share as an example, or a link to the Earthfile of your project if the sources are public?
@joepio thanks a lot, I've been able to make it work with your example :-)
for the reference, the problem disappeared when I switched from the alpine
to the slim
(debian) variant of the rust
image.
That was not all though, I had to clean the target/release
directory before each run — somehow some stuff generated during the build was making the next builds fail: https://github.com/glehmann/yage/blob/8446fe3722fb782e6f0aa2b8dfcbd3d00617e3bc/Earthfile#L43
Also I found quite useful to:
BUILD
to let earthly properly deal with the image name on my local computer: https://github.com/glehmann/yage/blob/8446fe3722fb782e6f0aa2b8dfcbd3d00617e3bc/Earthfile#L78earthly -P --platform linux/s590x +docker
: https://github.com/glehmann/yage/blob/8446fe3722fb782e6f0aa2b8dfcbd3d00617e3bc/Earthfile#L24WITH DOCKER --pull
in order to avoid redownloading it many time while working on the build locally: https://github.com/glehmann/yage/blob/8446fe3722fb782e6f0aa2b8dfcbd3d00617e3bc/Earthfile#L40that's my take on using cross and earthly together. I hope it will be useful for others :-)
Hi guys, thanks for pushing on this! I will go through your examples and update the documentation accordingly
Hi guys, I was able to improve a little @glehmann solution. This is what I did:
$TARGETPLATFORM
. https://github.com/earthly/lib/pull/45It's taking more time than expected for me to ship this though the library in a clean way and without losing parallelization, but I didn't want to hold it any longer.
Please let me know your thoughts!
rust+CROSS
works great, thanks :+1:
I've seen cross mentioned in the documentation, so I thought it could be easy to run it. Not that much so far :-)
Here is what I tried to do:
but
cross
fails with this error:Is there a example with cross available somewhere?