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
Collaborator

@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 Dec 5, 2019
@cfromknecht cfromknecht marked this pull request as ready for review Dec 5, 2019
@cfromknecht cfromknecht requested review from halseth and wpaulino Dec 5, 2019
Copy link
Collaborator

@wpaulino wpaulino left a comment

Very cool!

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

@joostjager joostjager left a comment

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

@joostjager
Copy link
Collaborator

@joostjager joostjager commented Dec 5, 2019

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 cfromknecht removed the request for review from halseth Dec 5, 2019
@cfromknecht
Copy link
Collaborator Author

@cfromknecht cfromknecht commented Dec 5, 2019

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

@cfromknecht
Copy link
Collaborator Author

@cfromknecht cfromknecht commented Dec 5, 2019

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
2 checks passed
@cfromknecht cfromknecht deleted the stage-travis branch Dec 5, 2019
@cfromknecht cfromknecht added this to the 0.9.0 milestone Dec 5, 2019
@cfromknecht cfromknecht added this to WIP in v0.9.0-beta via automation Dec 5, 2019
@cfromknecht cfromknecht removed this from WIP in v0.9.0-beta Dec 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants