Skip to content

Commit

Permalink
Child Process Messenger v3
Browse files Browse the repository at this point in the history
  • Loading branch information
WyriHaximus committed Apr 18, 2021
1 parent 1ba0c53 commit fe17990
Show file tree
Hide file tree
Showing 13 changed files with 249 additions and 289 deletions.
38 changes: 13 additions & 25 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ jobs:
strategy:
fail-fast: false
matrix:
composer: [install, "update", "update --prefer-lowest"]
php: ${{ fromJson(needs.supported-versions-matrix.outputs.version) }}
steps:
- name: Checkout
Expand All @@ -33,23 +32,20 @@ jobs:
- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Get composer action hash
id: composer-action-hash
run: printf "::set-output name=hash::%s" $(echo -n "${{ matrix.composer }}" | sha512sum)
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-${{ steps.composer-action-hash.outputs.hash }}
key: ${{ runner.os }}-${{ matrix.php }}-composer-${{ hashFiles('**/composer.*') }}
restore-keys: ${{ runner.os }}-${{ matrix.php }}-composer-${{ hashFiles('**/composer.*') }}
- name: Install Composer dependencies
run: |
composer config --unset platform.php
composer update --lock
composer ${{ matrix.composer }} --no-progress --no-interaction --no-suggest --optimize-autoloader --ansi
rm composer.lock
composer install --no-progress --no-interaction --optimize-autoloader --ansi
- name: Test
run: |
./vendor/bin/phpunit --coverage-text
./vendor/bin/phpunit --coverage-text --debug
benchmark:
name: Run Benchmark on PHP ${{ matrix.php }}
runs-on: ubuntu-latest
Expand All @@ -58,7 +54,6 @@ jobs:
strategy:
fail-fast: false
matrix:
composer: [install, "update", "update --prefer-lowest"]
php: ${{ fromJson(needs.supported-versions-matrix.outputs.version) }}
steps:
- name: Checkout
Expand All @@ -71,20 +66,17 @@ jobs:
- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Get composer action hash
id: composer-action-hash
run: printf "::set-output name=hash::%s" $(echo -n "${{ matrix.composer }}" | sha512sum)
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-${{ steps.composer-action-hash.outputs.hash }}
key: ${{ runner.os }}-${{ matrix.php }}-composer-${{ hashFiles('**/composer.*') }}
restore-keys: ${{ runner.os }}-${{ matrix.php }}-composer-${{ hashFiles('**/composer.*') }}
- name: Install Composer dependencies
run: |
composer config --unset platform.php
composer update --lock
composer ${{ matrix.composer }} --no-progress --no-interaction --no-suggest --optimize-autoloader --ansi
rm composer.lock
composer install --no-progress --no-interaction --optimize-autoloader --ansi
- name: Benchmark
run: |
php benchmark/memory.php
Expand All @@ -96,7 +88,6 @@ jobs:
strategy:
fail-fast: false
matrix:
composer: [install, "update", "update --prefer-lowest"]
php: ${{ fromJson(needs.supported-versions-matrix.outputs.version) }}
steps:
- name: Checkout
Expand All @@ -109,20 +100,17 @@ jobs:
- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Get composer action hash
id: composer-action-hash
run: printf "::set-output name=hash::%s" $(echo -n "${{ matrix.composer }}" | sha512sum)
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-${{ steps.composer-action-hash.outputs.hash }}
key: ${{ runner.os }}-${{ matrix.php }}-composer-${{ hashFiles('**/composer.*') }}
restore-keys: ${{ runner.os }}-${{ matrix.php }}-composer-${{ hashFiles('**/composer.*') }}
- name: Install Composer dependencies
run: |
composer config --unset platform.php
composer update --lock
composer ${{ matrix.composer }} --no-progress --no-interaction --no-suggest --optimize-autoloader --ansi
rm composer.lock
composer install --no-progress --no-interaction --optimize-autoloader --ansi
- name: Example
run: |
php examples/return-class-messaging/ping.php
10 changes: 5 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
"php": "^8.0 || ^7.0 || ^5.4",
"evenement/evenement": "^3.0 || ^2.0",
"react/event-loop": "^1.1",
"wyrihaximus/cpu-core-detector": "^1.0.2",
"wyrihaximus/file-descriptors": "^1.0 || ^0.1",
"wyrihaximus/react-child-process-messenger": "^2.10",
"wyrihaximus/ticking-promise": "^1.5"
"wyrihaximus/cpu-core-detector": "^2 || ^1.0.2",
"wyrihaximus/file-descriptors": "^2 || ^1.0 || ^0.1",
"wyrihaximus/react-child-process-messenger": "^3 || ^2.10.1",
"wyrihaximus/ticking-promise": "^2 || ^1.5"
},
"require-dev": {
"clue/block-react": "^1.3",
"phake/phake": "^2.2.1",
"phpunit/phpunit": "^4.8.35||^5.0",
"phpunit/phpunit": "^4.8.35||^5.0||^9.5",
"squizlabs/php_codesniffer": "^3.3.2",
"vectorface/dunit": "~2.0"
},
Expand Down
Loading

0 comments on commit fe17990

Please sign in to comment.