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

travis: staged builds #3794

Merged
merged 1 commit into from
Dec 5, 2019
Merged

Conversation

cfromknecht
Copy link
Contributor

@cfromknecht cfromknecht commented Dec 5, 2019

This PR introduces staging to our travis pipeline. Currently all instances perform:

  • compilation of lnd
  • linting
  • compilation and installation of btcd binaries
  • installation of bitcoind binaries

In total this adds about 3 minutes to each of our 5 instances, resulting in roughly 12 minutes of redundant execution time. Additionally, if if a build fails to compile or lint we detect this 5 separate times, consuming precious instances from other builds.

We alleviate this by adding an initial Build phase, which runs a single instance performing the actions above. This has the benefit of quickly sanity checking the pr before moving on to the more expensive unit or integration test suites, and failing faster for common mistakes. It also warms up the build caches for the Test stage in one fell swoop.

For instance, if 5 people push changes at the same time, they can all get immediate feedback regarding compilation or linting issues, and potentially save hours waiting for other people's test to finish or fail before finding out they had a spelling error. This doesn't alleviate all possible issues, e.g. the 5 instances may already be consumed by test suites, but it does make a sizable step towards minimizing time-to-failure in common scenarios.

@cfromknecht cfromknecht force-pushed the stage-travis branch 10 times, most recently from d1d7f22 to 23961cc Compare December 5, 2019 17:37
@cfromknecht cfromknecht marked this pull request as ready for review December 5, 2019 17:38
Copy link
Contributor

@wpaulino wpaulino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very cool!

Makefile Show resolved Hide resolved
.travis.yml Show resolved Hide resolved
Copy link
Contributor

@joostjager joostjager left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm no connaisseur of travis config files, but the output definitely looks great!

@joostjager
Copy link
Contributor

Remove 'experiment' from commit msg

This PR introduces staging to our travis pipeline. Currently all
instances perform:

 - compilation of lnd
 - linting
 - compilation and installation of btcd binaries
 - installation of bitcoind binaries

In total this adds about 3 minutes to each of our 5 instances, resulting in
roughly 12 minutes of redundant execution time. Additionally, if if a build
fails to compile or lint we detect this 5 separate times, consuming precious
instances from other builds.

We alleviate this by adding an initial Build phase, which runs a single
instance performing the actions above. This has the benefit of quickly sanity
checking the pr before moving on to the more expensive unit or integration test
suites, and failing faster for common mistakes. It also warms up the build
caches for the Test stage in one fell swoop.

For instance, if 5 people push changes at the same time, they can all get
immediate feedback regarding compilation or linting issues, and potentially
save hours waiting for other people's test to finish or fail before finding out
they had a spelling error. This doesn't alleviate all possible issues, e.g. the
5 instances may already be consumed by test suites, but it does make a sizable
step towards minimizing time-to-failure in common scenarios.
@cfromknecht
Copy link
Contributor Author

moved pr body to commit message, will merge once the build finishes 🎉

@cfromknecht
Copy link
Contributor Author

I'm no connaisseur of travis config files, but the output definitely looks great!

Here's the link I consulted https://docs.travis-ci.com/user/build-stages/

@cfromknecht cfromknecht changed the title travis: staged builds experiment travis: staged builds Dec 5, 2019
@cfromknecht cfromknecht merged commit 8b3ee62 into lightningnetwork:master Dec 5, 2019
@cfromknecht cfromknecht deleted the stage-travis branch December 5, 2019 23:34
@cfromknecht cfromknecht added this to the 0.9.0 milestone Dec 5, 2019
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

Successfully merging this pull request may close these issues.

3 participants