Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce CI setup time with binary releases #11

Open
epage opened this issue Jun 13, 2017 · 8 comments
Open

Reduce CI setup time with binary releases #11

epage opened this issue Jun 13, 2017 · 8 comments

Comments

@epage
Copy link

epage commented Jun 13, 2017

Instead of cargo install cargo-travis, it'd be helpful to have pre-compiled releases.

For example, you can do the following to install rustfmt:
curl -LSfs https://japaric.github.io/trust/install.sh | sh -s -- --force --crate rustfmt --git japaric/rustfmt-bin --tag v0.6.3-20161120

@roblabla
Copy link
Owner

roblabla commented Jul 2, 2017

Yup. I'll probably start using trust down the line for CI testing and setting up binary releases.

@iwburns
Copy link

iwburns commented Jul 11, 2017

While I know this doesn't completely solve your problem, I'm currently using this to speed things up:
which cargo-coverage && which cargo-coveralls || cargo install cargo-travis.

EDIT: this may also depend upon you having cache: cargo set as well, but I'm not 100% sure.

@Geal
Copy link

Geal commented Dec 14, 2017

Hey,
I use more or less the same command, but kcov still gets built: https://travis-ci.org/sozu-proxy/sozu/jobs/316438026#L1159
Is it linked to #6? How can I help?
(not trying to pressure you to fix this quickly, I'd like a faster build, but I can live without it)

@roblabla
Copy link
Owner

Right now, kcov gets built at every build, inside CWD/kcov/build/src/kcov. This is problematic for two reasons: It causes #6 (CWD is different for each member of the workspace), and that folder is not cached.

According to the travis docs, when using cache: cargo, $HOME/.cargo and $TRAVIS_BUILD_DIR/target get cached.

I think the proper fix would be to build kcov into $TRAVIS_BUILD_DIR/target/kcov or something, giving it a global location (Fixing #6) and allowing it to get cached (fixing your issue).

The procedure to locate and/or build kcov is in the build_kcov function. Ideally, we should make the script run in the target folder, which we could simply pass as an argument to that function, obtaining that function from the Workspace instance here

@epage
Copy link
Author

epage commented Dec 14, 2017

Regarding workarounds

which cargo-coverage && which cargo-coveralls || cargo install cargo-travis

I eventually went with this but it was a pain for upgrades.

For cargo-when, I went with

if [[ `cargo-when --version` != *$WHEN ]] ; then travis_wait cargo install cargo-when --force --vers $WHEN; fi

(See https://github.com/cobalt-org/liquid-rust/blob/master/.travis.yml#L32)

I'd love to go with that but I didn't find an easily parseable version for cargo-travisreport the version

@roblabla
Copy link
Owner

Adding a --version flag for cargo-travis should be fairly simple. I can do that ASAP.

@roblabla
Copy link
Owner

@epage latest version prints "cargo-travis 0.0.7" when you run cargo-coverage -V. You can get just the version with a cargo coverage -V | cut -d' ' -f2

@epage
Copy link
Author

epage commented Dec 15, 2017

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants