[wp-trac] [WordPress Trac] #36291: Travis CI: Improve job performance by caching `node_modules` folder

WordPress Trac noreply at wordpress.org
Tue Mar 22 06:20:35 UTC 2016


#36291: Travis CI: Improve job performance by caching `node_modules` folder
------------------------------+------------------------------
 Reporter:  netweb            |      Owner:
     Type:  enhancement       |     Status:  new
 Priority:  normal            |  Milestone:  4.5
Component:  Build/Test Tools  |    Version:
 Severity:  normal            |   Keywords:  has-patch commit
  Focuses:                    |
------------------------------+------------------------------
 Example build https://travis-ci.org/ntwb/wordpress/jobs/117636801

 * https://travis-ci.org/ntwb/wordpress/jobs/117636801#L132
  *
 {{{
 Setting up build cache
 $ export CASHER_DIR=$HOME/.casher
 $ Installing caching utilities

 attempting to download cache archive
 fetching master/cache--php-5.2.tgz
 fetching master/cache--php-5.2.tbz
 could not download cache
 adding /home/travis/build/ntwb/wordpress/node_modules to cache
 }}}

 * https://travis-ci.org/ntwb/wordpress/jobs/117636801#L1323
  *
 {{{
 store build cache
 }}}

 * Following build above the `node_modules` cache:
  * [[Image(https://cldup.com/2j5i9QgEKi.png)]]

 Follow up build https://travis-ci.org/ntwb/wordpress/jobs/117639151

 * https://travis-ci.org/ntwb/wordpress/jobs/117639151#L132
  *
 {{{
 Setting up build cache
 $ export CASHER_DIR=$HOME/.casher
 $ Installing caching utilities

 attempting to download cache archive
 fetching master/cache--php-5.2.tgz
 found cache

 adding /home/travis/build/ntwb/wordpress/node_modules to cache
 }}}

 Summary:

 Before caching `node_modules` it took `npm install` [https://travis-
 ci.org/ntwb/wordpress/jobs/117636801#L212 92.21 seconds] to install the
 NPM modules and after caching was added this was reduced by ~80 seconds to
 [https://travis-ci.org/ntwb/wordpress/jobs/117639151#L211 11.60 seconds]

 See also: https://docs.travis-ci.com/user/caching/

--
Ticket URL: <https://core.trac.wordpress.org/ticket/36291>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list