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: reduce the number of travis builders #2306

Closed
wants to merge 4 commits into from
Closed

travis: reduce the number of travis builders #2306

wants to merge 4 commits into from

Conversation

tamird
Copy link
Contributor

@tamird tamird commented May 16, 2017

This collapses all the "platform dependent" tests into a single travis
builder in an effort to reduce overall CI times. These builds currently
take a combined 21-23 minutes, but each one has to compile the library,
so combining them should yield some time savings (5-10 minutes).

Unfortunately the other builders don't duplicate work, so combining
them is unlikely to provide benefit.

@yiwu-arbug
Copy link
Contributor

@tamird let's wait for the travis build and see how it goes.

@tamird
Copy link
Contributor Author

tamird commented May 16, 2017

@yiwu-arbug of course.

By the way, it looks like you guys are currently aggressively maintaining two branches: master, and 5.4.fb. This is really unfortunate, because it adds to the already extremely congested Travis CI situation in this repo.

Could you turn off Travis CI on the non-master branches? It currently takes over a day to get a Travis build.

See https://travis-ci.org/facebook/rocksdb/builds (at the time of writing):

screen shot 2017-05-16 at 15 22 02

@yiwu-arbug
Copy link
Contributor

@tamird 5.4.fb etc. are release branches. We need travis build there. We can probably turn off travis for other branches, but they are also useful in case people want to run ac-hoc travis job.

@tamird
Copy link
Contributor Author

tamird commented May 16, 2017

I understand that they're useful in general, but something needs to be done - the build takes over 4 hours on average and the congestion causes huge delays.

Perhaps you could do the cherry-picks to the release branches once a day, instead of eagerly whenever anything merges to master?

@yiwu-arbug
Copy link
Contributor

We only cherry-pick what's needed into release branches. The thing is travis don't have enough resources and we don't have a better alternative to it..

@tamird
Copy link
Contributor Author

tamird commented May 16, 2017

Right, I understand that, but if you batched your cherry-picks at the end of the day, you would substantially reduce the congestion during daylight hours when people are trying to get work done.

This would prevent merge-on-red situations like the one caused by #2269, which has required at least 3 follow-up PRs now.

@facebook-github-bot
Copy link
Contributor

@tamird updated the pull request - view changes

@facebook-github-bot
Copy link
Contributor

@tamird updated the pull request - view changes

@facebook-github-bot
Copy link
Contributor

@tamird updated the pull request - view changes

@facebook-github-bot
Copy link
Contributor

@tamird updated the pull request - view changes

@facebook-github-bot
Copy link
Contributor

@tamird updated the pull request - view changes

@facebook-github-bot
Copy link
Contributor

@tamird updated the pull request - view changes

tamird added 3 commits May 25, 2017 11:08
This collapses all the "platform dependent" tests into a single travis
builder in an effort to reduce overall CI times. These builds currently
take a combined 21-23 minutes, but each one has to compile the library,
so combining them should yield some time savings (5-10 minutes).

Unfortunately the other builders don't duplicate work, so combining
them is unlikely to provide benefit.
The osx build already exercises clang, so there's no need to also test
clang on Linux. This should save about 30% of CI time.

Testing with GCC 6 is nice, but not needed, and saves a further 30% of
CI time.

Finally, this commit arranges for ccache to actually be used in CI,
which it previously was not on osx.
@tamird
Copy link
Contributor Author

tamird commented May 25, 2017

Heads up that this is green, and the build took 1h49m compared to the usual 3h29m:

screen shot 2017-05-25 at 11 06 26

There's a merge conflict with #2127 that I'm fixing now, but this should be good to go.

@facebook-github-bot
Copy link
Contributor

@tamird updated the pull request - view changes

@tamird
Copy link
Contributor Author

tamird commented May 26, 2017

@yiwu-arbug can you take a look, please?

@@ -4,9 +4,6 @@ language: cpp
os:
- linux
- osx
compiler:
- clang
Copy link
Contributor

Choose a reason for hiding this comment

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

We want to keep clang build. How does it affect total time per your experiment?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note that the osx build already tests clang - what's the benefit of also testing it on linux?

I'd expect this to increase compilation time by ~50% (i.e. eliminate 33% savings) since it will roughly double the number of linux workers.

Copy link
Contributor

Choose a reason for hiding this comment

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

platform_dependent is not building all tests, so there can be compile error catch by clang but not gcc. Hope this case can be covered.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, you mean that TEST_GROUP=1 and TEST_GROUP=2 don't run on OSX? I can enable those.

Copy link
Contributor

Choose a reason for hiding this comment

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

Or simply building the tests without running them.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, is there a make target that does that?

Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure. You can do make all though.

Copy link
Contributor

Choose a reason for hiding this comment

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

@tamird seems TEST_GROUP 1&2 is taking an hour to run. Mind remove them and add make all for osx?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done!

@yiwu-arbug
Copy link
Contributor

LGTM. @siying any comment?

@siying
Copy link
Contributor

siying commented May 26, 2017 via email

@facebook-github-bot
Copy link
Contributor

@tamird updated the pull request - view changes

@facebook-github-bot
Copy link
Contributor

@tamird updated the pull request - view changes

Previously, these tests were compiled with clang and run in a separate
linux build. Now that we're only testing default compilers on each OS,
we need to build these tests on osx to make sure there aren't any
compiler-specific mistakes hiding in them.
@facebook-github-bot
Copy link
Contributor

@tamird updated the pull request - view changes

@tamird
Copy link
Contributor Author

tamird commented May 27, 2017

Green again!

@facebook-github-bot
Copy link
Contributor

@yiwu-arbug has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@yiwu-arbug
Copy link
Contributor

Merging. Thank you for your contribution!

@tamird
Copy link
Contributor Author

tamird commented May 30, 2017 via email

@tamird tamird deleted the reduce-travis-machines branch May 30, 2017 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants