Make WordPress Core

Opened 9 years ago

Closed 9 years ago

Last modified 8 years ago

#36291 closed enhancement (fixed)

Travis CI: Improve job performance by caching `node_modules` folder

Reported by: netweb's profile netweb Owned by: netweb's profile netweb
Milestone: 4.5 Priority: normal
Severity: normal Version:
Component: Build/Test Tools Keywords: has-patch commit
Focuses: Cc:

Description

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
      
  • Following build above the node_modules cache:
    • 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 92.21 seconds to install the NPM modules and after caching was added this was reduced by ~80 seconds to 11.60 seconds

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

Attachments (1)

36291.diff (274 bytes) - added by netweb 9 years ago.

Download all attachments as: .zip

Change History (9)

@netweb
9 years ago

#1 @netweb
9 years ago

  • Owner set to netweb
  • Status changed from new to assigned

This ticket was mentioned in Slack in #core by mike. View the logs.


9 years ago

#3 @ocean90
9 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 37058:

Travis CI: Allow to cache the node_modules directory.

This should speed up the installation of npm dependencies.

Props netweb.
Fixes #36291.

#4 @ocean90
8 years ago

In 40280:

Build/Test Tools: Allow Travis CI to cache the node_modules directory.

Merge of [37058] and [36490] to the 4.4 branch.

See #36291, #36490.

#5 @ocean90
8 years ago

In 40281:

Build/Test Tools: Allow Travis CI to cache the node_modules directory.

Merge of [37058] and [36490] to the 4.3 branch.

See #36291, #36490.

#6 @ocean90
8 years ago

In 40282:

Build/Test Tools: Update .travis.yml to include latest improvements from trunk.

  • Explicitly use PHPUnit 5.7 for the PHP 7 builds on Travis.
  • On Travis CI install and use the node version which is specified in package.json.
  • Add some more debugging to Travis and bring the format of the Xdebug fix inline with branches.
  • Get Travis builds working on HHVM again.
  • In addition, brings the Slack notification settings up to date and allows Travis CI to cache the node_modules directory.

Merge of [40255], [40257-40259], [40269], and [40271] to the 4.2 branch.

See #35105, #40100, #30755, #36291, #36490.

#7 @ocean90
8 years ago

In 40286:

Build/Test Tools: Update .travis.yml to include latest improvements from trunk.

  • On Travis CI install and use node version 0.10.48 to ensure correct node-sass builds.
  • Explicitly use PHPUnit 5.7 for the PHP 7 builds on Travis.
  • Add some more debugging to Travis and bring the format of the Xdebug fix inline with branches.
  • Get Travis builds working on HHVM again.
  • In addition, brings the Slack notification settings up to date and allows Travis CI to cache the node_modules directory.

Merge of [40255], [40257],[40259], [40269], and [40271] to the 4.1 branch.

See #35105, #40100, #30755, #36291, #36490.

#8 @ocean90
8 years ago

In 40288:

Build/Test Tools: Update .travis.yml to include latest improvements from trunk.

  • On Travis CI install and use node version 0.10.48 to ensure correct node-sass builds.
  • Explicitly use PHPUnit 5.7 for the PHP 7 builds on Travis.
  • Add some more debugging to Travis and bring the format of the Xdebug fix inline with branches.
  • Get Travis builds working on HHVM again.
  • In addition, brings the Slack notification settings up to date and allows Travis CI to cache the node_modules directory.

Merge of [40255], [40257],[40259], [40269], and [40271] to the 4.0 branch.

See #35105, #40100, #30755, #36291, #36490.

Note: See TracTickets for help on using tickets.