I've been working on Commerce Kickstart lately and trying to boost build speed. One thing that I've tested is caching $HOME/.composer/cache and $HOME/.drush/cache.

Due to concurrency the first few don't have a cache, but after first build completes all others can share cache.

Here's a build I'll reference: https://travis-ci.org/mglaman/commerce_kickstart/builds/72297631

Build 124.2:

  • Composer install for Behat: 49.77s
  • Drush make (Core): 3.33s
  • Drush make (contrib): 108.68s

Build 124.9 (cached)

  • Composer install for Behat: 24.04s
  • Drush make (Core): 2.03s
  • Drush make (contrib): 81.63s

Those numbers average pretty well across cached/non-cached builds Overall it's about a minute saved, which at 21 builds is a good chunk of time!

Patch inc

Comments

mglaman’s picture

Status: Active » Needs review
StatusFileSize
new440 bytes

Patch!

dsnopek’s picture

Thanks! That's actually less than I would have thought would have been saved. Although, the times on Commerce Kickstart are much lower than Panopoly in general, so maybe we'll save much more. :-) For testing purposes, can you make a patch that sets 'sudo: false' and comments out the Chrome tests? Then we can try running it and see exactly how good it does!

mglaman’s picture

StatusFileSize
new1.14 KB

Like this?

dsnopek’s picture

StatusFileSize
new1.35 KB

Thanks! Here's the Travis build:

https://travis-ci.org/dsnopek/panopoly

I modified the patch a little bit so we weren't specifying 'sudo' twice. That patch is attached.

dsnopek’s picture

There were lots of failures (which I think will get fixed in #2532134: Migrate to new Travis infrastructure eventually) but it's definitely very fast! Watching some of the later builds, it breezes through the drush make and composer bits. Unfortunately, we don't have any timing in our script to see exact numbers.

dsnopek’s picture

Status: Needs review » Fixed

Now that #2532134: Migrate to new Travis infrastructure has landed, I've re-rolled and merged this as well! Thanks, @mglaman!

  • dsnopek committed abd6486 on 7.x-1.x authored by mglaman
    Issue #2538634 by mglaman, dsnopek: Cache Drush and Composer on Travis...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.