Skip to content

Commit

Permalink
Add php build
Browse files Browse the repository at this point in the history
  • Loading branch information
riccardobl committed Apr 17, 2024
1 parent b5b666b commit 5c0350b
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 8 deletions.
23 changes: 17 additions & 6 deletions .github/workflows/build-php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,21 @@ jobs:


- name: Build
run: echo TODO
run: bash build-php.sh

# - name: Upload PHP artifacts
# uses: actions/upload-artifact@v2
# with:
# name: build-php
# path: build/php
- 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

5 changes: 3 additions & 2 deletions build-php.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
set -e
mkdir -p tmp
mkdir -p build/php
pecl install grpc
pecl install grpc || true
pecl install protobuf || true
protoc --proto_path=proto \
--php_out=build/php \
--grpc_out=build/phpp \
--grpc_out=build/php \
--plugin=protoc-gen-grpc=bins/opt/grpc_php_plugin \
--experimental_allow_proto3_optional \
proto/*.proto

0 comments on commit 5c0350b

Please sign in to comment.