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.
57 lines
755 B
57 lines
755 B
#!/bin/bash |
|
|
|
set -eux |
|
|
|
# Change to repo root |
|
cd $(dirname $0)/../../.. |
|
|
|
use_php() { |
|
VERSION=$1 |
|
export PATH=/usr/local/php-${VERSION}/bin:$PATH |
|
} |
|
|
|
build_php() { |
|
use_php $1 |
|
pushd php |
|
rm -rf vendor |
|
php -v |
|
php -m |
|
composer update |
|
composer test |
|
popd |
|
} |
|
|
|
test_php_c() { |
|
pushd php |
|
rm -rf vendor |
|
php -v |
|
php -m |
|
composer update |
|
composer test_c |
|
popd |
|
} |
|
|
|
build_php_c() { |
|
use_php $1 |
|
test_php_c |
|
} |
|
|
|
mkdir -p build |
|
pushd build |
|
cmake .. -DCMAKE_CXX_STANDARD=14 |
|
cmake --build . -- -j20 |
|
ctest --verbose --parallel 20 |
|
export PROTOC=$(pwd)/protoc |
|
popd |
|
|
|
git config --global --add safe.directory "*" |
|
|
|
build_php 7.4 |
|
build_php 8.0 |
|
build_php_c 7.4 |
|
build_php_c 8.0 |
|
build_php_c 7.4-zts |
|
build_php_c 8.0-zts |
|
|
|
# Cleanup after CMake build |
|
rm -rf build
|
|
|