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

Speed up travis build #226

Closed
niccokunzmann opened this issue Dec 5, 2016 · 32 comments
Closed

Speed up travis build #226

niccokunzmann opened this issue Dec 5, 2016 · 32 comments

Comments

@niccokunzmann
Copy link
Member

niccokunzmann commented Dec 5, 2016

Travis can cache certain directories and has cache defaults for several languages.
It may be, we can speed up the testing process.

Hints: The result could be about 5 lines long but the question is how to find the right lines.

@abishekvashok
Copy link
Member

Yes it could reduce the speed considerably we just need to specify cache:bundler simple and beautiful.

@niccokunzmann
Copy link
Member Author

For docker, there could also be a cache so the image is not puled every time.

@abishekvashok
Copy link
Member

abishekvashok commented Dec 6, 2016

I think it is enabled for default.

@abishekvashok
Copy link
Member

@niccokunzmann we could also run the jobs in parallel like splitting them up.

@niccokunzmann
Copy link
Member Author

Good idea: then, we need to make sure that

  • the output is nice: pipe the parallel stuff to a file and view it on exit
  • error if the parallel part fails

@abishekvashok
Copy link
Member

I think if any of the jobs fail, Travis returns exit code 1 that means exit. And about piping we could achieve it easily. @niccokunzmann

@m1guelpf
Copy link
Member

m1guelpf commented Dec 8, 2016

@niccokunzmann @Abhi2424shek Any updates on this?
Now that we have autocheck, speeding up build is very neccesary, to get faster responses to the user.

@niccokunzmann
Copy link
Member Author

Please keep in mind that you can merge pull-requests even if the tests still run or did not succeed. It is more important to get the people on board than to have some tests satisfied. If you require green tests over happy contributors, you need to write it into contributing.md.

@abishekvashok
Copy link
Member

@niccokunzmann I prefer happy contributors and good code, so we will need to do something and not sit like dull men.

@abishekvashok
Copy link
Member

abishekvashok commented Dec 10, 2016

Since this issue has been looming large, @niccokunzmann I think we should create a python script that will be executed by travis to fix the failing tests, like adding new line at EOF and other stuff which the tests fail of, what do you say.

@m1guelpf
Copy link
Member

@Abhi2424shek +1 for that

@niccokunzmann
Copy link
Member Author

Maybe, we can change the parameters for coala

@jayvdb
Copy link
Member

jayvdb commented Dec 10, 2016

coala --apply-patches

@jayvdb
Copy link
Member

jayvdb commented Dec 10, 2016

btw, Docker caching isnt supported by Travis (but there are ugly workarounds) : travis-ci/travis-ci#5358

@m1guelpf
Copy link
Member

@jayvdb if Travis apply patches, then we need to setup git to push changes back...

@abishekvashok
Copy link
Member

@niccokunzmann we could let coala apply the patches why dont we have a try plus we will rum travis tests parallel and cache travis, wont doing these close up this PR if all those worked :)

@niccokunzmann
Copy link
Member Author

Sure, you can give it a try.

@jayvdb
Copy link
Member

jayvdb commented Dec 10, 2016

@jayvdb if Travis apply patches, then we need to setup git to push changes back...

Yup, that can be done, but it isnt relevant to this issue about speeding up the travis build.

We can avoid the Docker if coala/coala-bears#1000 is fixed.

@abishekvashok
Copy link
Member

I've added travis cache #415 @niccokunzmann @jayvdb @m1guelpf now travis time consumption will start to decrease.

@abishekvashok
Copy link
Member

@niccokunzmann we could now implement running the jobs in parallel

@m1guelpf
Copy link
Member

@Abhi2424shek We can't, as the Travis tasks need an order.
(for example, We can't push to Percy without building jellkyl first)

@abishekvashok
Copy link
Member

@m1guelpf I got a solution for that, We could run a job first and execute the next jobs parallel thorught the Travis metrix, but there's a slight bug which I am facing...
I would give in a PR soon.

@jayvdb
Copy link
Member

jayvdb commented Dec 24, 2016

We can avoid the Docker if coala/coala-bears#1000 is fixed.

Subtask coala/coala-bears#1044 is a GCI task https://codein.withgoogle.com/tasks/6276537751961600/

@abishekvashok
Copy link
Member

I think this is the maximum here!

@jayvdb
Copy link
Member

jayvdb commented Dec 26, 2016

I can see many ways to speed it up :P
Is there a GCI task about speeding it up?

@robbyoconnor
Copy link
Contributor

robbyoconnor commented Dec 26, 2016

Not currently -- too lazy to make one...if you wanna do it -- be my guest @jayvdb -- I'll reopen it

We COULD cache the docker image for coala -- that's an option...

@robbyoconnor robbyoconnor reopened this Dec 26, 2016
@abishekvashok
Copy link
Member

abishekvashok commented Dec 26, 2016

We have a seperate issue for it @robbyoconnor

@jayvdb
Copy link
Member

jayvdb commented Jan 11, 2017

no, caching the docker image is not helpful (it is too big to be useful cached) and #603 is about caching the coala metadata (good idea, unrelated), are not the only ways to improve the travis build speed.

One of the largest chunks of time is the bundle install, and there are other ways to improve it.

Please re-open. We have generic "fix an issue" tasks which can be used to optimise the CI for this issue.

@abishekvashok
Copy link
Member

Here you go @jayvdb

@abishekvashok abishekvashok reopened this Jan 11, 2017
@m1guelpf
Copy link
Member

m1guelpf commented Feb 1, 2017

@niccokunzmann @Abhi2424shek @jayvdb @robbyoconnor is this still needed not that CodeIn has finished?

@jayvdb
Copy link
Member

jayvdb commented Feb 1, 2017

indeed, it can be closed.

@m1guelpf m1guelpf closed this as completed Feb 1, 2017
@robbyoconnor
Copy link
Contributor

I don't think we can speed up the build anymore... The bottleneck is docker...everything else runs fast.

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

No branches or pull requests

5 participants