Skip to content

v0.8.3

v0.8.3 #148

Workflow file for this run

name: Build PHP
on:
push:
release:
types: [published]
jobs:
build-and-publish:
permissions:
contents: write
packages: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
- name: Install dependencies
run: |
sudo pecl channel-update pecl.php.net
sudo pecl install protobuf
- name: Build grpc from source
run: |
git clone --recurse-submodules -b v1.62.0 --depth 1 --shallow-submodules https://github.com/grpc/grpc
RDIR=$(pwd)
cd grpc
git submodule update --init
EXTRA_DEFINES=GRPC_POSIX_FORK_ALLOW_PTHREAD_ATFORK make
grpc_root="$(pwd)"
cd src/php/ext/grpc
phpize
GRPC_LIB_SUBDIR=libs/opt ./configure --enable-grpc="${grpc_root}"
make
sudo make install
cd $RDIR/grpc
mkdir -p cmake
cd cmake
cmake ..
make protoc grpc_php_plugin
- name: Build
run: |
export GRPC_EXT_PATH=$(pwd)/grpc/cmake/
export PROTOC=$(pwd)/grpc/cmake/third_party/protobuf/protoc
bash build-php.sh
- name: Upload PHP artifacts
uses: actions/upload-artifact@v2
with:
name: build-php
path: build/php
- name: Prepare asset for upload
run: |
tar -czf build/openagents_grpc_proto-PHP.tar.gz -C build/php/ .
- name: Upload release asset
if: github.event_name == 'release'
uses: softprops/action-gh-release@v1
with:
files: build/openagents_grpc_proto-PHP.tar.gz