Skip to content

Commit c14aea7

Browse files
committed
Fix travis builds
The problem was that travis itself was killing our build process because we were trying to run 8 requirejs processes at once, leading us to run out of memory (only 3GB available on travis). This adds a command line to specify concurrency and updates travis to do at most 2 (one for each core).
1 parent 5dc208b commit c14aea7

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ script:
2222

2323
- echo 'makeZipFile' && echo -en 'travis_fold:start:script.makeZipFile\\r'
2424
- npm run clean
25-
- npm run makeZipFile
25+
- npm run makeZipFile -- --concurrency 2
2626
- npm pack
2727
- echo -en 'travis_fold:end:script.makeZipFile\\r'
2828

gulpfile.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,10 @@ var noDevelopmentGallery = taskName === 'release' || taskName === 'makeZipFile';
4646
var buildingRelease = noDevelopmentGallery;
4747
var minifyShaders = taskName === 'minify' || taskName === 'minifyRelease' || taskName === 'release' || taskName === 'makeZipFile' || taskName === 'buildApps';
4848

49-
//travis reports 32 cores but only has 3GB of memory, which causes the VM to run out. Limit to 8 cores instead.
50-
var concurrency = Math.min(os.cpus().length, 8);
49+
var concurrency = yargs.argv.concurrency;
50+
if (!concurrency) {
51+
concurrency = os.cpus().length;
52+
}
5153

5254
//Since combine and minify run in parallel already, split concurrency in half when building both.
5355
//This can go away when gulp 4 comes out because it allows for synchronous tasks.

0 commit comments

Comments
 (0)