|
|
|
@ -17,7 +17,7 @@ jobs: |
|
|
|
|
steps: |
|
|
|
|
- name: Install bazel |
|
|
|
|
run: | |
|
|
|
|
sudo apt update && sudo apt install bazel |
|
|
|
|
apt-get install bazel |
|
|
|
|
- name: Install git |
|
|
|
|
run: | |
|
|
|
|
apt-get update -q |
|
|
|
@ -26,24 +26,15 @@ jobs: |
|
|
|
|
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: Generate package.xml |
|
|
|
|
run: | |
|
|
|
|
bazel build $GITHUB_WORKSPACE/php/ext/google/protobuf:generate_package_xml |
|
|
|
|
cp $GITHUB_WORKSPACE/bazel-bin/php/ext/google/protobuf/package.xml $GITHUB_WORKSPACE/php/ext/google/protobuf/package.xml |
|
|
|
|
- name: Create package |
|
|
|
|
run: | |
|
|
|
|
cd /tmp |
|
|
|
|
rm -rf protobuf-*.tgz |
|
|
|
|
pecl package "$GITHUB_WORKSPACE/php/ext/google/protobuf/package.xml" |
|
|
|
|
rm -rf bazel-bin/php/protobuf-*.tgz |
|
|
|
|
cd $GITHUB_WORKSPACE |
|
|
|
|
bazel build php:release |
|
|
|
|
- name: Compile extension |
|
|
|
|
run: | |
|
|
|
|
cd /tmp |
|
|
|
|
MAKE="make -j$(nproc)" pecl install protobuf-*.tgz |
|
|
|
|
MAKE="make -j$(nproc)" pecl install bazel-bin/php/protobuf-*.tgz |
|
|
|
|
- name: Enable extension |
|
|
|
|
run: docker-php-ext-enable protobuf |
|
|
|
|
- name: Inspect extension |
|
|
|
|