emk / rust-musl-builder

Docker images for compiling static Rust binaries using musl-libc and musl-gcc, with static versions of useful C libraries. Supports openssl and diesel crates.
Apache License 2.0
1.54k stars 193 forks source link

[fix] link zlib statically, with better test #42

Closed mriehl closed 6 years ago

mriehl commented 6 years ago

See #41 #38

Fixes #37

This is basically #38 with the tests encoded using cargo new semantics (no docker volume for the project)

mriehl commented 6 years ago

Here's the travis job: https://travis-ci.org/mriehl/rust-musl-builder/jobs/358272959 I hope I didn't break the travis config while refactoring, standing by..

mriehl commented 6 years ago

https://travis-ci.org/mriehl/rust-musl-builder/builds/358272958 still green

mriehl commented 6 years ago

Note that I tested the "file check" locally too. This was missing as pointed out by @bomgar because if the file doesn't exist, ldd also fails (with the same exit code). There's a bit of duplication in the file path, but using a variable is such a fuckery in the multiline string (especially since I wanted to split it into path components because the test is slow as hell so getting tree like output is critical imho)

bomgar commented 6 years ago

@emk isn't this exactly what you wanted?

emk commented 6 years ago

Merged after overhauling the tests. Thank you!