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 560d584
Show file tree
Hide file tree
Showing 13 changed files with 248 additions and 286 deletions.
34 changes: 12 additions & 22 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,13 @@ jobs:
- id: supported-versions-matrix
uses: WyriHaximus/github-action-composer-php-versions-in-range@v1
test:
name: Run Tests on PHP ${{ matrix.php }}
name: Run Tests on PHP ${{ matrix.php }} with "${{ matrix.composer }}" composer flags
runs-on: ubuntu-latest
needs:
- supported-versions-matrix
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,25 +32,22 @@ 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.lock') }}
restore-keys: ${{ runner.os }}-${{ matrix.php }}-composer-${{ hashFiles('**/composer.lock') }}
- 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 }}
name: Run Benchmark on PHP ${{ matrix.php }} with "${{ matrix.composer }}" composer flags
runs-on: ubuntu-latest
needs:
- supported-versions-matrix
Expand All @@ -71,15 +67,12 @@ 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.lock') }}
restore-keys: ${{ runner.os }}-${{ matrix.php }}-composer-${{ hashFiles('**/composer.lock') }}
- name: Install Composer dependencies
run: |
composer config --unset platform.php
Expand All @@ -89,7 +82,7 @@ jobs:
run: |
php benchmark/memory.php
example:
name: Run Examples on PHP ${{ matrix.php }}
name: Run Examples on PHP ${{ matrix.php }} with "${{ matrix.composer }}" composer flags
runs-on: ubuntu-latest
needs:
- supported-versions-matrix
Expand All @@ -109,15 +102,12 @@ 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.lock') }}
restore-keys: ${{ runner.os }}-${{ matrix.php }}-composer-${{ hashFiles('**/composer.lock') }}
- name: Install Composer dependencies
run: |
composer config --unset platform.php
Expand Down
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 560d584

Please sign in to comment.