huonw / travis-cargo

A standalone script that manages running Rust's cargo and several other related features on Travis CI.
https://pypi.python.org/pypi/travis-cargo
Apache License 2.0
174 stars 27 forks source link

Consider porting to Rust #28

Open huonw opened 9 years ago

huonw commented 9 years ago

We now have cargo install, so distribution is as easy as pip, and, Rust is awesome.

Notes:

jonas-schievink commented 8 years ago

The 1.0 constraint makes this extremely hard, since many libraries don't support it (and even more only have CI on stable, so they can easily break).

In case someone manages to do this: Please make sure Travis doesn't compile dozens of crates for installing travis-cargo - The best thing to do would be to add a cache to the example .travis.yml, but that kind of plays badly with cargo install (see this comment)

euclio commented 8 years ago

I've written a proof-of-concept port at https://github.com/euclio/travis-cargo-rust.

The code is pretty much a direct port of the Python, so it isn't particularly rustic (lots of unwrap()s). If we think this is worthwhile, I can clean up the code and open a PR alongside the Python version.

euclio commented 8 years ago

Friendly ping @huonw

huonw commented 8 years ago

@euclio wow, nice work! Unfortunately, I don't have time right now to dig in, but hopefully I'll be able to find some soon.


Speaking to the air: another realisation I had was that we could just distribute binaries, e.g. as generated by https://github.com/japaric/rust-everywhere, avoiding entirely any version compatibility problems and the need to rely on cargo install (etc.): just download the single binary and chmod it +x. Getting the binaries out takes a little more set-up on travis-cargo's part, but seems like it would make like easier going forward.

euclio commented 8 years ago

Cool, great to hear about the rust-everywhere solution. I'm happy to get the ball rolling further on this once you get a chance to do an initial review (unfortunately I've been pretty busy myself). Would it help if I started a PR branch?

There are already a few things I'd like to change:

huonw commented 8 years ago

I took a look and it looks pretty good. I submitted https://github.com/euclio/travis-cargo-rust/pull/1 as a result.

roblabla commented 7 years ago

I took a different approach over at https://github.com/roblabla/cargo-travis , linking directly against the cargo crate.