★ wanayoo — archive 1999 https://github.com/nodejs/node/pull/27182Nouvelle recherche | Portail wanayoo
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: optimize total Travis run time #27182

Merged
merged 1 commit into from Apr 12, 2019
Merged

Conversation

Copy link
Member

@refack refack commented Apr 10, 2019

  • skip compilation by using cache
  • split testing into two jobs
  • DRY with YAML anchors

Refs: #27158

Eliminates the stages; they are unnecessary for a typical CI run, and extend the run time by at least 3.5 minutes.
Instead of eliminating the compile stage it now caches the binary so the test stage doesn't need to bootstrap the compiler and doesn't need to recompile.

/CC @nodejs/testing @nodejs/build-files @nodejs/python

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines

@nodejs-github-bot
Copy link
Contributor

@nodejs-github-bot nodejs-github-bot commented Apr 10, 2019

@nodejs-github-bot nodejs-github-bot added build test tools labels Apr 10, 2019
@refack refack self-assigned this Apr 10, 2019
@refack refack force-pushed the optimize-travis-time branch 3 times, most recently from 1d940ba to f3b8644 Compare Apr 10, 2019
@refack
Copy link
Member Author

@refack refack commented Apr 10, 2019

This configuration can potentially finish in 6 + 5 minutes 🚀

P.S. Success image

Copy link
Member

@richardlau richardlau left a comment

(Ab)using the ccache to transfer binaries between compile and test jobs ✔️💡.

.travis.yml Outdated Show resolved Hide resolved
.travis.yml Show resolved Hide resolved
.travis.yml Outdated Show resolved Hide resolved
@richardlau
Copy link
Member

@richardlau richardlau commented Apr 10, 2019

Try to cut down the total time for a Travis CI sanity test.

Eliminates the stages; they are unnecessary for a typical CI run, and extend the run time by at least 3.5 minutes.
For PRs that change V8, the first successful run of "Compile V8" will hydrate the cache, so subsequent runs should complete in < 50 minutes

Maybe update the OP? Stages haven't been eliminated.

@refack refack force-pushed the optimize-travis-time branch 3 times, most recently from 9d4dae1 to 92eb382 Compare Apr 11, 2019
@refack
Copy link
Member Author

@refack refack commented Apr 11, 2019

Travis run now covers addons as well. minimal time approx 4(compile) + 5.5(test) minutes.

@refack refack added the review wanted label Apr 12, 2019
@refack
Copy link
Member Author

@refack refack commented Apr 12, 2019

.travis.yml Outdated Show resolved Hide resolved
@refack
Copy link
Member Author

@refack refack commented Apr 12, 2019

Current master:
image

With just just parallel for JS coverage (was an in intermediate step)
image

With default:
image

So I'd call this a win.

@richardlau
Copy link
Member

@richardlau richardlau commented Apr 12, 2019

Current master:
image

With just just parallel for JS coverage (was an in intermediate step)
image

With default:
image

So I'd call this a win.

🤔
https://travis-ci.com/nodejs/node/jobs/192593470 ran 2615 tests.

https://travis-ci.com/nodejs/node/jobs/192591927 ran 2500 tests.
https://travis-ci.com/nodejs/node/jobs/192591928 ran 111 tests.
2500 + 111 = 2611 tests... Any idea what accounts for the discrepency?

@richardlau
Copy link
Member

@richardlau richardlau commented Apr 12, 2019

🤔
https://travis-ci.com/nodejs/node/jobs/192593470 ran 2615 tests.

https://travis-ci.com/nodejs/node/jobs/192591927 ran 2500 tests.
https://travis-ci.com/nodejs/node/jobs/192591928 ran 111 tests.
2500 + 111 = 2611 tests... Any idea what accounts for the discrepency?

Ah it's doctool.

node/Makefile

Lines 502 to 506 in 25df3c1

test-ci: | clear-stalled build-addons build-js-native-api-tests build-node-api-tests doc-only
out/Release/cctest --gtest_output=tap:cctest.tap
$(PYTHON) tools/test.py $(PARALLEL_ARGS) -p tap --logfile test.tap \
--mode=$(BUILDTYPE_LOWER) --flaky-tests=$(FLAKY_TESTS) \
$(TEST_CI_ARGS) $(CI_JS_SUITES) $(CI_NATIVE_SUITES) $(CI_DOC)

node/Makefile

Lines 472 to 474 in 25df3c1

CI_NATIVE_SUITES ?= addons js-native-api node-api
CI_JS_SUITES ?= default
CI_DOC := doctool

* skip compilation by using cache
* split testing into two jobs
* DRY with YAML anchors

PR-URL: nodejs#27182
Refs: nodejs#27158
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
@refack refack merged commit 8cf3af1 into nodejs:master Apr 12, 2019
1 of 2 checks passed
@refack refack deleted the optimize-travis-time branch Apr 12, 2019
@refack refack removed their assignment Apr 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build review wanted test tools
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants