Skip to content

Use make -j for parallel build#10506

Merged
nicolo-ribaudo merged 5 commits intobabel:masterfrom
JLHwung:parallel-build
Oct 2, 2019
Merged

Use make -j for parallel build#10506
nicolo-ribaudo merged 5 commits intobabel:masterfrom
JLHwung:parallel-build

Conversation

@JLHwung
Copy link
Copy Markdown
Contributor

@JLHwung JLHwung commented Sep 27, 2019

Q                       A
License MIT

This PR introduces general improvements to current build scripts. The following jobs have seen significant time reduce

Travis Job Control Experiment
lint 4min 57s 3min 14s
parser-flow-test 3min 38s 2min 28s
parser-test262-test 3min 48s 2min 51s

The following improvements are implemented:

  • Provide gulp build-babel-types for make lint, so that lint does not have to build all babel packages.
  • Remove merge-stream by refactoring buildBabel
  • Introduce make code-quality: an umbrella rule (with parallelism) of make lint && make flow.
  • Skip make build-standalone and make build-preset-env-standalone in lint, parser-flow-test and parser-test262-test jobs.
  • Parallelize make bootstrap-only and make bootstrap-flow as they requests different services and writes to different destinations.
  • Parallelize make bootstrap-only and make bootstrap-test262 for the same reason above
  • Parallelize make build-standalone and make build-preset-env-standalone as they writes to different destinations.
  • Replace nested make call to $(MAKE) variable

Note that now the lint job will run first since it is less expensive than unit testing.

Other thoughts: I did a rough measure on travis: it will take 2 min for machine setup + yarn install + lerna bootstrap, even with yarn cache. Could we merge lint, parser-flow-test and parser-test262-test into one job so that we can remove machine setup overhead?

@JLHwung JLHwung added the PR: Internal 🏠 A type of pull request used for our changelog categories label Sep 27, 2019
.travis.yml Outdated
# We test the latest version on circleci
- node_js: "11"
- node_js: "10"
# Move `windows` build to be the fourth since it is slow
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also node 6 is slow. What do you think about this order?

  • Lint
  • Node 11 (fast, for quick feedback)
  • Windows
  • Node 6
  • Node 8
  • Node 10
  • Flow
  • Test262

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can definitely give it a try. As long as Windows or Node 6 is not the last I think they would not make significant difference.

How many concurrent jobs do we have on circle ci? If we have two concurrent jobs we can move windows testing to circle ci.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

4 I think

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

outdated A closed issue/PR that is archived due to age. Recommended to make a new issue PR: Internal 🏠 A type of pull request used for our changelog categories

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants