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.
58 lines
1.7 KiB
58 lines
1.7 KiB
2 years ago
|
name: PHP Extension Tests
|
||
3 years ago
|
|
||
|
on:
|
||
2 years ago
|
workflow_call:
|
||
|
inputs:
|
||
|
safe-checkout:
|
||
|
required: true
|
||
|
description: "The SHA key for the commit we want to run over"
|
||
|
type: string
|
||
3 years ago
|
|
||
2 years ago
|
permissions:
|
||
|
contents: read # to fetch code (actions/checkout)
|
||
|
|
||
3 years ago
|
jobs:
|
||
|
build-php:
|
||
2 years ago
|
name: Build
|
||
3 years ago
|
runs-on: ubuntu-latest
|
||
|
container: ${{ matrix.php-image }}
|
||
|
strategy:
|
||
|
matrix:
|
||
|
php-image:
|
||
|
- php:7.4-cli
|
||
|
- php:8.1-cli
|
||
2 years ago
|
# TODO(b/266868629) Dockerize these instead of installing all the
|
||
|
# dependencies on each run.
|
||
3 years ago
|
steps:
|
||
2 years ago
|
- name: Install python3
|
||
2 years ago
|
run: |
|
||
2 years ago
|
apt-get update -q
|
||
2 years ago
|
apt-get install -qy python3
|
||
2 years ago
|
- name: Install bazel
|
||
|
run: |
|
||
2 years ago
|
apt-get install -qy wget
|
||
2 years ago
|
mkdir $HOME/bin
|
||
|
wget -O $HOME/bin/bazel https://github.com/bazelbuild/bazel/releases/download/5.3.2/bazel-5.3.2-linux-x86_64
|
||
|
chmod a+x $HOME/bin/bazel
|
||
3 years ago
|
- name: Install git
|
||
|
run: |
|
||
|
apt-get install -qy --no-install-recommends git
|
||
|
- name: Checkout
|
||
2 years ago
|
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
|
||
3 years ago
|
with:
|
||
2 years ago
|
ref: ${{ inputs.safe-checkout }}
|
||
3 years ago
|
submodules: recursive
|
||
|
- name: Create package
|
||
|
run: |
|
||
2 years ago
|
cd $GITHUB_WORKSPACE
|
||
2 years ago
|
rm -rf bazel-bin/php/protobuf-*.tgz
|
||
|
$HOME/bin/bazel build php:release
|
||
3 years ago
|
- name: Compile extension
|
||
|
run: |
|
||
|
cd /tmp
|
||
2 years ago
|
MAKE="make -j$(nproc)" pecl install $GITHUB_WORKSPACE/bazel-bin/php/protobuf-*.tgz
|
||
3 years ago
|
- name: Enable extension
|
||
|
run: docker-php-ext-enable protobuf
|
||
|
- name: Inspect extension
|
||
|
run: php --ri protobuf
|