You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by li...@apache.org on 2022/11/09 11:17:13 UTC
[rocketmq-clients] branch master updated: Setup PHP CI pipeline (#282)
This is an automated email from the ASF dual-hosted git repository.
lizhanhui pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/rocketmq-clients.git
The following commit(s) were added to refs/heads/master by this push:
new f263887 Setup PHP CI pipeline (#282)
f263887 is described below
commit f2638878cf800eec5eee19ab565b5b3ed7c121de
Author: Aaron Ai <ya...@gmail.com>
AuthorDate: Wed Nov 9 19:17:07 2022 +0800
Setup PHP CI pipeline (#282)
---
.github/workflows/build.yml | 11 +++++++++--
.github/workflows/php_build.yml | 24 ++++++++++++++++++++++++
php/composer.json | 17 ++++++++++-------
3 files changed, 43 insertions(+), 9 deletions(-)
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index ff5967f..87506fa 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -14,6 +14,7 @@ jobs:
cpp: ${{ steps.filter.outputs.cpp }}
golang: ${{ steps.filter.outputs.golang }}
csharp: ${{ steps.filter.outputs.csharp }}
+ php: ${{ steps.filter.outputs.php }}
steps:
- uses: actions/checkout@v2
- uses: dorny/paths-filter@v2
@@ -28,6 +29,8 @@ jobs:
- 'golang/**'
csharp:
- 'csharp/**'
+ php:
+ - 'php/**'
java-build:
needs: [paths-filter]
if: ${{ needs.paths-filter.outputs.java == 'true' }}
@@ -45,15 +48,19 @@ jobs:
needs: [paths-filter]
if: ${{ needs.paths-filter.outputs.golang == 'true' }}
uses: ./.github/workflows/golang_build.yml
+ php-build:
+ needs: [paths-filter]
+ if: ${{ needs.paths-filter.outputs.php == 'true' }}
+ uses: ./.github/workflows/php_build.yml
build-result:
runs-on: ubuntu-latest
- needs: [java-build, cpp-build, csharp-build, golang-build]
+ needs: [java-build, cpp-build, csharp-build, golang-build, php-build]
if: ${{ always() }}
steps:
- uses: actions/checkout@v2
- name: Collect build result
run: |
- if echo java-${{ needs.java-build.result }},cpp-${{ needs.cpp-build.result }},csharp-${{ needs.csharp-build.result }},golang-${{ needs.golang-build.result }} | grep -E 'cancelled|failure' -o > null
+ if echo java-${{ needs.java-build.result }},cpp-${{ needs.cpp-build.result }},csharp-${{ needs.csharp-build.result }},golang-${{ needs.golang-build.result }},php-${{ needs.php-build.result }} | grep -E 'cancelled|failure' -o > null
then
echo "There are failed/cancelled builds"
exit 1
diff --git a/.github/workflows/php_build.yml b/.github/workflows/php_build.yml
new file mode 100644
index 0000000..e4a774c
--- /dev/null
+++ b/.github/workflows/php_build.yml
@@ -0,0 +1,24 @@
+name: PHP Build
+on:
+ workflow_call:
+jobs:
+ build:
+ name: "${{ matrix.os }}, PHP-${{ matrix.php-version }}"
+ runs-on: ${{ matrix.os }}
+ strategy:
+ matrix:
+ php-version: ["7.4", "8.0", "8.1"]
+ os: [ubuntu-20.04, macos-11, windows-2022]
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+ - name: Setup PHP
+ uses: shivammathur/setup-php@v2
+ with:
+ php-version: ${{ matrix.php-version }}
+ - name: Validate composer.json
+ working-directory: ./php
+ run: composer validate
+ - name: Install Dependecies
+ working-directory: ./php
+ run: composer install
diff --git a/php/composer.json b/php/composer.json
index 3c4904b..c702f3e 100644
--- a/php/composer.json
+++ b/php/composer.json
@@ -1,13 +1,16 @@
{
- "require":{
+ "name": "rocketmq/rocketmq-php-sdk",
+ "description": "PHP SDK for Apache RocketMQ",
+ "license": "Apache-2.0",
+ "require": {
"google/protobuf": "^3.3",
"grpc/grpc": "^1.42",
- "hanson/foundation-sdk": "^4.0"
+ "hanson/foundation-sdk": "^5.0"
},
"autoload": {
- "psr-4": {
- "GPBMetadata\\": "grpc/GPBMetadata",
- "Apache\\Rocketmq\\V2\\": "grpc/Apache/Rocketmq/V2"
- }
+ "psr-4": {
+ "GPBMetadata\\": "grpc/GPBMetadata",
+ "Apache\\Rocketmq\\V2\\": "grpc/Apache/Rocketmq/V2"
+ }
}
-}
+}
\ No newline at end of file