8000 Parallelized travis builds by Seldaek · Pull Request #8312 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

Parallelized travis builds #8312

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

Closed
wants to merge 1 commit into from
Closed

Conversation

Seldaek
Copy link
Member
@Seldaek Seldaek commented Jun 19, 2013

Sort of WIP, I need to see how travis behaves when building the PR. If successful it might replace #7708

@@ -14,3 +14,5 @@ before_script:
- echo '' > ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini
- sh -c 'if [ $(php -r "echo PHP_MINOR_VERSION;") -le 4 ]; then echo "extension = apc.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi;'
- COMPOSER_ROOT_VERSION=dev-master composer --prefer-source --dev install

script: vendor/bin/cphpunit -v src/Symfony/*/* -e src/Symfony/Component/Process -e src/Symfony/Component/Console && phpunit src/Symfony/Component/Process && phpunit src/Symfony/Component/Console
Copy link
Member

Choose a reason for hiding this comment

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

you should add 3 scripts (using a YAML array) instead of usign &&. This way, the Process tests will still run even when the other have failed (the build will be successful if all scripts are successful).
Having the full testsuite results even when the first part failed is better

Copy link
Member

Choose a reason for hiding this comment

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

src/Symfony/*/* will not match file_exists($arg) && is_dir($arg) || substr($arg, -8) === 'Test.php'

@fabpot
Copy link
Member
fabpot commented Jun 23, 2013

The Travis output shows a lot of "Failed to parse suite .+ stats from" strings.

@fabpot
Copy link
Member
fabpot commented Sep 25, 2013

Closing in favor of #9018

@fabpot fabpot closed this Sep 25, 2013
fabpot added a commit that referenced this pull request Sep 25, 2013
This PR was submitted for the master branch but it was merged into the 2.2 branch instead (closes #9018).

Discussion
----------

Parallelized travis builds

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Yet another approach to running all tests in parallel (see #7708 and #8312).

This one uses [GNU Parallel](http://www.gnu.org/software/parallel/) which by default [will run one job per available CPU](http://www.gnu.org/software/parallel/man.html#jobs_n).

Comparison of random builds (recent build times on my travis account):

| PHP version| [master](https://travis-ci.org/jakzal/symfony/builds/11300678)             |  [parallel](https://travis-ci.org/jakzal/symfony/builds/11300689)
| ------------- | --- | ---
| 5.3.3| 6 min 11 sec | 3 min 45 sec
| 5.3| 7 min 26 sec | 4 min 10 sec
| 5.4| 6 min 31 sec | 3 min 31 sec
| 5.5| 6 min 37 sec | 3 min 45 sec

On my laptop it takes 1.5min to run a whole suite parallelised (compared to over 4min when run as usual).

Commits
-------

de8d1b5 Run all tests in parallel.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0