khmer icon indicating copy to clipboard operation
khmer copied to clipboard

Look into caching OS X Miniconda install on Travis CI

Open standage opened this issue 9 years ago • 15 comments
trafficstars

Travis CI allows you to cache components/directories created as part of your build. This won't improve the availability of OS X VMs, but once an OS X VM is available this should speed up the build significantly.

standage avatar Nov 15 '16 22:11 standage

Also, is there any reason to run extra tests/builds on OS X vs Linux? Since we always seem to be waiting on OS X VMs, perhaps we could move these to one of the Linux VMs?

standage avatar Nov 15 '16 22:11 standage

We spend about 3minutes on installing things on OSX.

The travis docs suggest not caching stuff which is dominated by "downloading stuff from the network" as the cache tarball comes over the network as well.

From a quick browse of the logs it seems we don't really compile much stuff, which suggests we are waiting on the network. I will take a look how complex it would get to cache the various different directories.

We use the OSX build as the reference for coverage and formatting. make test takes 155s. To compute the coverage we recompile things and re-execute the tests (120s). Can we combine these two steps?

(The availability of OSX nodes is pretty shocking, especially during California day time)

betatim avatar Nov 16 '16 09:11 betatim

Yeah, I think I was off base with my initial comment about caching. The Miniconda install is a relatively small contributor to the long runtime. I think it's mostly the multiple builds. Not sure why everything is recompiled from scratch to compute coverage, etc. Now I'm just wondering why OS X is used as reference, and whether it could save us some work-hours backlogging if we moved this to one of the Linux VMs.

standage avatar Nov 16 '16 17:11 standage

On Wed, Nov 16, 2016 at 09:38:27AM -0800, Daniel Standage wrote:

Yeah, I think I was off base with my initial comment about caching. The Miniconda install is a relatively small contributor to the long runtime. I think it's mostly the multiple builds. Not sure why everything is recompiled from scratch to compute coverage, etc. Now I'm just wondering why OS X is used as reference, and whether it could save us some work-hours backlogging if we moved this to one of the Linux VMs.

+1

ctb avatar Nov 16 '16 17:11 ctb

Now I'm just wondering why OS X is used as reference

More or less arbitrary. The reason that tipped it was that the version of make format on linux and on OSX disagree on what the correct format should be. So I guessed that most people use OSX locally -> make osx the reference. The way forward would be to figure out how to install the OSX/newer version of the formatting tool on debian (I spent some time on this when we moved to travis but gave up, my debian-fu was not strong enough).

betatim avatar Nov 16 '16 18:11 betatim

ping @betatim

standage avatar Feb 23 '17 06:02 standage

Still don't know howto get a newer version of astyle on trusty. What do people think about switching to clang-format? I prefer it as it is more modern and has the oumph of Google behind it in terms of keeping it working, etc.

betatim avatar Feb 23 '17 10:02 betatim

We need to rebuild to get coverage results because you need to compile with different arguments to augment the code to generate the coverage.

Overall I think waiting 5min or 10min for travis to do its thing isn't that big a deal and I'd be -0 on investing effort to speed things up on that time scale. What is more annoying is OSX which takes hours. I'm not sure I like the idea of making OSX optional because that will invariably lead to something in master being broken because stuff got merged without waiting for OSX. Which means waiting for OSX always...kinda catch 22. :-/

betatim avatar Feb 23 '17 10:02 betatim

What do people think about switching to clang-format

My experience with clang-format, though limited, has been positive. I have no experience with astyle. I'd say if it's an easy switch and makes our lives easier, it should be pretty easy to justify to our fearless leader.

standage avatar Feb 23 '17 18:02 standage

Before we go too much off topic discussing the finer points of what colour our source code formatter should be: the problem we wanted to solve is that travis takes too long right? I had hoped that we could get all the information that is needed to decide on the fate of a PR without waiting for the OSX build.

I found how to exclude a whole CI provider from codecov but because OSX and linux are both travis that doesn't help. The next level up would be to move our linux builds to AppVeyor and tell codecov not to wait for travis when calculating the coverage. Or we give up on OSX builds. Or reactivate jenkins for the OSX build. Don't really like either option to be honest. Ideas?

betatim avatar Feb 23 '17 21:02 betatim

I'm -1 on any big changes for the time being. Yes, the OS X Travis builds are the big pain point right now. It's not that the build itself takes too long, but often we have to wait 45min+ for the build to even start. My thought was that anything we could do to make the OS X build quicker, the better. But of course, we have to balance this against how much effort it will take and the time savings we gain. Since the time savings in the build will be minimal compared to the wait times, we shouldn't expend too much effort.

standage avatar Feb 23 '17 22:02 standage

I think I asked this before but: can we pay Travis for better service? ISTR it was expensive tho. Anyway, could be a solution.

ctb avatar Feb 24 '17 13:02 ctb

https://www.traviscistatus.com/ only shows you how backlogged they are for unpaid OSX instances, so hard to judge how backlogged they are for paid OSX instances. We could use the free trial on https://travis-ci.com/plans to see if it improves things?

betatim avatar Feb 24 '17 14:02 betatim

consistency over any particular style. +1.

ctb avatar Feb 26 '17 05:02 ctb

Closing this, originally it was about caching which we decided wasn't worth it and then started discussing paying for faster builds -> expensive. If we want to try the free trial I think @ctb should be the one to click the buttons.

betatim avatar Jun 09 '17 13:06 betatim