diff --git a/.github/workflows/php-ext.yml b/.github/workflows/php-ext.yml index 6128c2b4af..0d8c75a9fc 100644 --- a/.github/workflows/php-ext.yml +++ b/.github/workflows/php-ext.yml @@ -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 diff --git a/php/BUILD.bazel b/php/BUILD.bazel index c68abe4ab5..585fa547b3 100644 --- a/php/BUILD.bazel +++ b/php/BUILD.bazel @@ -147,5 +147,5 @@ pkg_tar( "//php/ext/google/protobuf:release_files", "//php/ext/google/protobuf:generate_package_xml", ], - out = "protobuf-%s" % PROTOBUF_PHP_VERSION, + out = "protobuf-%s.tgz" % PROTOBUF_PHP_VERSION, ) diff --git a/php/ext/google/protobuf/BUILD.bazel b/php/ext/google/protobuf/BUILD.bazel index 1b0bc704c3..9b1d892aa8 100644 --- a/php/ext/google/protobuf/BUILD.bazel +++ b/php/ext/google/protobuf/BUILD.bazel @@ -48,7 +48,7 @@ pkg_tar( srcs = [ ":release_files", ], - out = "release_without_package", + out = "release_without_package.tgz", ) # Generate PECL package.xml