Some more updates to PHP testing infrastructure (#8576)
* WIP. * Added build config for all of the tests. * Use ../src/protoc if it is available, for cases where Bazel isn't available. * Added test_php.sh. * Fix for the broken macOS tests. * Move all jobs to use php80 instead of lots of separate jobs. * Only pass -t flag if we are running in a terminal. * Updated php_all job to use new Docker stuff.pull/8290/head
parent
a84686c662
commit
45e9707871
9 changed files with 73 additions and 48 deletions
@ -1,18 +1,17 @@ |
||||
#!/bin/bash |
||||
# |
||||
# This is the top-level script we give to Kokoro as the entry point for |
||||
# running the "pull request" project: |
||||
# |
||||
# This script selects a specific Dockerfile (for building a Docker image) and |
||||
# a script to run inside that image. Then we delegate to the general |
||||
# build_and_run_docker.sh script. |
||||
# This is the entry point for kicking off a Kokoro job. This path is referenced |
||||
# from the .cfg files in this directory. |
||||
|
||||
set -ex |
||||
|
||||
cd $(dirname $0) |
||||
|
||||
# Change to repo root |
||||
cd $(dirname $0)/../../.. |
||||
# Most of our tests use a debug build of PHP, but we do one build against an opt |
||||
# php just in case that surfaces anything unexpected. |
||||
../test_php.sh gcr.io/protobuf-build/php/linux:8.0.5-14a06550010c0649bf69b6c9b803c1ca609bbb6d |
||||
|
||||
export DOCKERHUB_ORGANIZATION=protobuftesting |
||||
export DOCKERFILE_DIR=kokoro/linux/dockerfile/test/php80 |
||||
export DOCKER_RUN_SCRIPT=kokoro/linux/pull_request_in_docker.sh |
||||
export OUTPUT_DIR=testoutput |
||||
export TEST_SET="php8.0_all" |
||||
./kokoro/linux/build_and_run_docker.sh |
||||
../test_php.sh gcr.io/protobuf-build/php/linux:7.0.33-dbg-14a06550010c0649bf69b6c9b803c1ca609bbb6d |
||||
../test_php.sh gcr.io/protobuf-build/php/linux:7.3.28-dbg-14a06550010c0649bf69b6c9b803c1ca609bbb6d |
||||
../test_php.sh gcr.io/protobuf-build/php/linux:7.4.18-dbg-14a06550010c0649bf69b6c9b803c1ca609bbb6d |
||||
../test_php.sh gcr.io/protobuf-build/php/linux:8.0.5-dbg-14a06550010c0649bf69b6c9b803c1ca609bbb6d |
||||
|
@ -1,18 +1,17 @@ |
||||
#!/bin/bash |
||||
# |
||||
# This is the top-level script we give to Kokoro as the entry point for |
||||
# running the "pull request" project: |
||||
# |
||||
# This script selects a specific Dockerfile (for building a Docker image) and |
||||
# a script to run inside that image. Then we delegate to the general |
||||
# build_and_run_docker.sh script. |
||||
# This is the entry point for kicking off a Kokoro job. This path is referenced |
||||
# from the .cfg files in this directory. |
||||
|
||||
set -ex |
||||
|
||||
cd $(dirname $0) |
||||
|
||||
# Change to repo root |
||||
cd $(dirname $0)/../../.. |
||||
# Most of our tests use a debug build of PHP, but we do one build against an opt |
||||
# php just in case that surfaces anything unexpected. |
||||
../test_php.sh gcr.io/protobuf-build/php/linux:8.0.5-14a06550010c0649bf69b6c9b803c1ca609bbb6d |
||||
|
||||
export DOCKERHUB_ORGANIZATION=protobuftesting |
||||
export DOCKERFILE_DIR=kokoro/linux/dockerfile/test/php |
||||
export DOCKER_RUN_SCRIPT=kokoro/linux/pull_request_in_docker.sh |
||||
export OUTPUT_DIR=testoutput |
||||
export TEST_SET="php_all" |
||||
./kokoro/linux/build_and_run_docker.sh |
||||
../test_php.sh gcr.io/protobuf-build/php/linux:7.0.33-dbg-14a06550010c0649bf69b6c9b803c1ca609bbb6d |
||||
../test_php.sh gcr.io/protobuf-build/php/linux:7.3.28-dbg-14a06550010c0649bf69b6c9b803c1ca609bbb6d |
||||
../test_php.sh gcr.io/protobuf-build/php/linux:7.4.18-dbg-14a06550010c0649bf69b6c9b803c1ca609bbb6d |
||||
../test_php.sh gcr.io/protobuf-build/php/linux:8.0.5-dbg-14a06550010c0649bf69b6c9b803c1ca609bbb6d |
||||
|
@ -0,0 +1,6 @@ |
||||
#!/bin/bash |
||||
|
||||
set -ex |
||||
|
||||
test -t 1 && USE_TTY="-it" |
||||
docker run ${USE_TTY} -v$(realpath $(dirname $0)/../..):/workspace $1 "composer test && composer test_c" |
@ -1,6 +1,20 @@ |
||||
|
||||
cd $(dirname $0) |
||||
|
||||
if [[ -f ext/google/protobuf/third_party/wyhash/wyhash.h && -z $(find ../third_party/wyhash -newer ext/google/protobuf/third_party) ]]; then |
||||
# Generated protos are already present and up to date, so we can skip protoc. |
||||
# |
||||
# Protoc is very fast, but sometimes it is not available (like if we haven't |
||||
# built it in Docker). Skipping it helps us proceed in this case. |
||||
echo "wyhash is up to date, skipping." |
||||
exit 0 |
||||
fi |
||||
|
||||
# wyhash has to live in the base third_party directory. |
||||
# We copy it into the ext/google/protobuf directory for the build |
||||
# (and for the release to PECL). |
||||
mkdir -p ../ext/google/protobuf/third_party/wyhash |
||||
cp ../../third_party/wyhash/* ../ext/google/protobuf/third_party/wyhash |
||||
rm -rf ext/google/protobuf/third_party |
||||
mkdir -p ext/google/protobuf/third_party/wyhash |
||||
cp ../third_party/wyhash/* ext/google/protobuf/third_party/wyhash |
||||
|
||||
echo "Copied wyhash from ../third_party -> ext/google/protobuf/third_party" |
||||
|
Loading…
Reference in new issue