-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Framework: Travis build performance #15159
Comments
We also should look into how to optimize for Travis the usage of |
I agree. I added a checklist item to the original comment. |
I've added a new section "Streamline Docker setup". Observing the Travis end-to-end tasks, it's clear that the Docker setup takes a substantial amount of time. Individual
I spent some time trying to sort this out: It seems like we shouldn't be expecting "Starting ..." to be occurring for every individual command, since the I wasn't able to make progress here, but perhaps someone with a bit more Docker-fu could advise? (cc @youknowriad) A few things I tried:
I also wondered: Can the |
I tried to remove More at: https://travis-ci.com/WordPress/gutenberg/jobs/201750063 Related changes: 53a4ea9 We could still seek for a solution which would mock those CSS files instead. |
@gziolo It's intended that those tests should automatically stub a file if one does not exist. It may not be working correctly. gutenberg/phpunit/class-extend-styles-test.php Lines 67 to 71 in cc6d90e
Also noting that there was some work in #14289 which could serve as prior art for trying to eliminate the need for NPM to be installed in the PHP tasks. |
I chatted briefly with @noisysocks about what options we might have for specifically improving the Docker setup. While I'd been inclined to at least explore some options around moving all of the WP-CLI setup into a single script file to be run in the container image, it may be worth further exploration to either pre-build or create a custom container image with all of the setup steps. Looking to discussions like in travis-ci/travis-ci#5358 , it's not clear how well this could be cached, though as in travis-ci/travis-ci#5358 (comment) there are some options to explore. Alternatively, we may consider to publish custom images to Docker Hub. The ideal outcome here would be that the |
I'll have a try at using a custom Docker image—it's something I've been experimenting with on and off. |
Noting that as of #18942, the
Especially if those types are built in a "clean" environment, it may take a non-trivial amount of time to complete. It would be nice if we could avoid this by some means. cc @sirreal |
Good point. Anecdotally, my machine takes >30s to do a cold build of types, and <1s for subsequent builds. Some ideas:
|
I think this can be closed since we're using Github actions now. |
Previously: #14289
This serves as a tracking ticket for various suggested improvements to Travis build performance. See various comments within #14289 for more detail.
postinstall
script frompackage.json
(Plugin: Remove postinstall step #14353)npm run build
twice, wastefully, because of the combination of thepostinstall
triggered by an initialnpm install
, and a subsequent explicit buildnpm install
is run in many separate jobs, butnpm run check-licenses
only really needs to be run at most one time, not in each jobnpm run build
. Previously it may have been needed to use the npm scripts fornpm run test-php
andnpm run test-unit-php-multisite
, but these resolve todocker-compose
commands anyways, so it seems reasonable enough to call them directlynpm run build
reset-e2e-tests.sh
orafterAll
tasks like deactivating plugins, etc.docker-compose run
commands where possible (example) (Framework: Consolidate Docker commands in site installation #15742)Starting gutenberg_mysql_1 ... done
)docker-compose
connectionssleep
or a mechanism to be made aware immediatelyThe text was updated successfully, but these errors were encountered: