Protocol Buffers - Google's data interchange format (grpc依赖)
https://developers.google.com/protocol-buffers/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
1.2 KiB
44 lines
1.2 KiB
3 years ago
|
name: PHP extension
|
||
|
|
||
|
on:
|
||
|
- push
|
||
|
- pull_request
|
||
|
|
||
|
jobs:
|
||
|
build-php:
|
||
|
name: Build PHP extension
|
||
|
runs-on: ubuntu-latest
|
||
|
container: ${{ matrix.php-image }}
|
||
|
strategy:
|
||
|
matrix:
|
||
|
php-image:
|
||
|
- php:7.4-cli
|
||
|
- php:8.1-cli
|
||
|
steps:
|
||
|
- name: Install git
|
||
|
run: |
|
||
|
apt-get update -q
|
||
|
apt-get install -qy --no-install-recommends git
|
||
|
- name: Checkout
|
||
|
uses: actions/checkout@v3
|
||
|
with:
|
||
|
submodules: recursive
|
||
|
- name: Prepare source code
|
||
|
run: |
|
||
|
rm -rf "$GITHUB_WORKSPACE/php/ext/google/protobuf/third_party"
|
||
|
cp -r "$GITHUB_WORKSPACE/third_party" "$GITHUB_WORKSPACE/php/ext/google/protobuf"
|
||
|
cp "$GITHUB_WORKSPACE/LICENSE" "$GITHUB_WORKSPACE/php/ext/google/protobuf"
|
||
|
- name: Create package
|
||
|
run: |
|
||
|
cd /tmp
|
||
|
rm -rf protobuf-*.tgz
|
||
|
pecl package "$GITHUB_WORKSPACE/php/ext/google/protobuf/package.xml"
|
||
|
- name: Compile extension
|
||
|
run: |
|
||
|
cd /tmp
|
||
|
MAKE="make -j$(nproc)" pecl install protobuf-*.tgz
|
||
|
- name: Enable extension
|
||
|
run: docker-php-ext-enable protobuf
|
||
|
- name: Inspect extension
|
||
|
run: php --ri protobuf
|