asciinema / asciinema-server

Platform for hosting and sharing terminal session recordings
https://docs.asciinema.org/manual/server/
Apache License 2.0
2.29k stars 263 forks source link

Use Cargo Sparse protocol in Docker build #439

Closed jippi closed 5 months ago

jippi commented 5 months ago

Cargo 1.68 and newer introduced "sparse" protocol which significantly reduces memory usage (and improves build time!) - see https://blog.rust-lang.org/inside-rust/2023/01/30/cargo-sparse-protocol.html

Had to bump Alpine to 3.18 to pick up a more recent Cargo release (1.76.0)

hexpm/elixir do not sure Alpine 3.19 with current erlang+elixir combination

Should fix the CI error 137 on current main

#26 [linux/arm64 builder  5/18] RUN cd native/vt_nif && cargo build -r
#26 2.171     Updating crates.io index
#26 ERROR: process "/dev/.buildkit_qemu_emulator /bin/sh -c cd native/vt_nif && cargo build -r" did not complete successfully: exit code: 137
ku1ik commented 5 months ago

Awesome, thank you!

ku1ik commented 5 months ago

Just noticed that Alpine 3.18 has Rust 1.71.1, not 1.76, but it did the trick since it's >= 1.68: https://github.com/asciinema/asciinema-server/actions/runs/8866724397 :tada:

jippi commented 5 months ago

Fantastic 🎉