2016-02-19 04:10:23 +00:00
|
|
|
#!/bin/bash
|
2016-03-04 22:21:18 +00:00
|
|
|
#
|
2018-07-13 23:55:32 +00:00
|
|
|
# Build and runs tests for the protobuf project. We use this script to run
|
|
|
|
# tests on kokoro (Ubuntu and MacOS). It can run locally as well but you
|
|
|
|
# will need to make sure the required compilers/tools are available.
|
2016-02-19 17:11:38 +00:00
|
|
|
|
2015-07-15 18:05:10 +00:00
|
|
|
# For when some other test needs the C++ main build, including protoc and
|
|
|
|
# libprotobuf.
|
2019-08-01 00:49:26 +00:00
|
|
|
LAST_RELEASED=3.9.0
|
|
|
|
|
2015-07-15 18:05:10 +00:00
|
|
|
internal_build_cpp() {
|
2016-02-19 04:10:23 +00:00
|
|
|
if [ -f src/protoc ]; then
|
|
|
|
# Already built.
|
|
|
|
return
|
|
|
|
fi
|
|
|
|
|
2018-03-26 20:54:32 +00:00
|
|
|
# Initialize any submodules.
|
|
|
|
git submodule update --init --recursive
|
|
|
|
|
2015-05-13 23:43:48 +00:00
|
|
|
./autogen.sh
|
2018-10-05 00:25:10 +00:00
|
|
|
./configure CXXFLAGS="-fPIC -std=c++11" # -fPIC is needed for python cpp test.
|
|
|
|
# See python/setup.py for more details
|
2019-03-06 20:04:17 +00:00
|
|
|
make -j$(nproc)
|
2015-07-15 18:05:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
build_cpp() {
|
|
|
|
internal_build_cpp
|
2019-03-06 20:04:17 +00:00
|
|
|
make check -j$(nproc) || (cat src/test-suite.log; false)
|
2016-09-30 00:07:47 +00:00
|
|
|
cd conformance && make test_cpp && cd ..
|
2016-04-29 16:52:20 +00:00
|
|
|
|
2016-12-08 21:19:58 +00:00
|
|
|
# The benchmark code depends on cmake, so test if it is installed before
|
|
|
|
# trying to do the build.
|
|
|
|
if [[ $(type cmake 2>/dev/null) ]]; then
|
|
|
|
# Verify benchmarking code can build successfully.
|
2017-12-13 22:34:52 +00:00
|
|
|
cd benchmarks && make cpp-benchmark && cd ..
|
2016-12-08 21:19:58 +00:00
|
|
|
else
|
|
|
|
echo ""
|
|
|
|
echo "WARNING: Skipping validation of the bench marking code, cmake isn't installed."
|
|
|
|
echo ""
|
|
|
|
fi
|
2015-05-13 23:43:48 +00:00
|
|
|
}
|
|
|
|
|
2019-01-23 18:02:51 +00:00
|
|
|
build_cpp_tcmalloc() {
|
|
|
|
internal_build_cpp
|
|
|
|
./configure LIBS=-ltcmalloc && make clean && make \
|
|
|
|
PTHREAD_CFLAGS='-pthread -DGOOGLE_PROTOBUF_HEAP_CHECK_DRACONIAN' \
|
|
|
|
check
|
|
|
|
cd src
|
2019-01-25 18:28:52 +00:00
|
|
|
PPROF_PATH=/usr/bin/google-pprof HEAPCHECK=strict ./protobuf-test
|
2019-01-23 18:02:51 +00:00
|
|
|
}
|
|
|
|
|
2015-05-13 23:43:48 +00:00
|
|
|
build_cpp_distcheck() {
|
2019-03-11 21:39:49 +00:00
|
|
|
grep -q -- "-Og" src/Makefile.am &&
|
|
|
|
echo "The -Og flag is incompatible with Clang versions older than 4.0." &&
|
|
|
|
exit 1
|
|
|
|
|
2018-03-26 20:54:32 +00:00
|
|
|
# Initialize any submodules.
|
|
|
|
git submodule update --init --recursive
|
2015-05-13 23:43:48 +00:00
|
|
|
./autogen.sh
|
|
|
|
./configure
|
2016-07-20 00:20:31 +00:00
|
|
|
make dist
|
|
|
|
|
|
|
|
# List all files that should be included in the distribution package.
|
2017-08-23 18:35:48 +00:00
|
|
|
git ls-files | grep "^\(java\|python\|objectivec\|csharp\|js\|ruby\|php\|cmake\|examples\|src/google/protobuf/.*\.proto\)" |\
|
2021-04-20 16:36:06 +00:00
|
|
|
grep -v ".gitignore" | grep -v "java/lite/proguard.pgcfg" |\
|
2020-03-07 00:37:15 +00:00
|
|
|
grep -v "python/compatibility_tests" | grep -v "python/docs" | grep -v "python/.repo-metadata.json" |\
|
2020-08-31 17:40:57 +00:00
|
|
|
grep -v "python/protobuf_distutils" | grep -v "csharp/compatibility_tests" > dist.lst
|
2016-07-20 00:20:31 +00:00
|
|
|
# Unzip the dist tar file.
|
|
|
|
DIST=`ls *.tar.gz`
|
|
|
|
tar -xf $DIST
|
|
|
|
cd ${DIST//.tar.gz}
|
|
|
|
# Check if every file exists in the dist tar file.
|
|
|
|
FILES_MISSING=""
|
|
|
|
for FILE in $(<../dist.lst); do
|
2018-08-10 04:21:01 +00:00
|
|
|
[ -f "$FILE" ] || {
|
2016-07-20 00:20:31 +00:00
|
|
|
echo "$FILE is not found!"
|
|
|
|
FILES_MISSING="$FILE $FILES_MISSING"
|
2018-08-10 04:21:01 +00:00
|
|
|
}
|
2016-07-20 00:20:31 +00:00
|
|
|
done
|
|
|
|
cd ..
|
|
|
|
if [ ! -z "$FILES_MISSING" ]; then
|
|
|
|
echo "Missing files in EXTRA_DIST: $FILES_MISSING"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Do the regular dist-check for C++.
|
2019-03-06 20:04:17 +00:00
|
|
|
make distcheck -j$(nproc)
|
2015-05-13 23:43:48 +00:00
|
|
|
}
|
|
|
|
|
2019-03-07 22:34:28 +00:00
|
|
|
build_dist_install() {
|
2021-09-29 20:41:33 +00:00
|
|
|
# Create a symlink pointing to python2 and put it at the beginning of $PATH.
|
|
|
|
# This is necessary because the googletest build system involves a Python
|
|
|
|
# script that is not compatible with Python 3. More recent googletest
|
|
|
|
# versions have fixed this, but they have also removed the autotools build
|
|
|
|
# system support that we rely on. This is a temporary workaround to keep the
|
|
|
|
# googletest build working when the default python binary is Python 3.
|
|
|
|
mkdir tmp || true
|
|
|
|
pushd tmp
|
|
|
|
ln -s /usr/bin/python2 ./python
|
|
|
|
popd
|
|
|
|
PATH=$PWD/tmp:$PATH
|
|
|
|
|
2019-03-07 22:34:28 +00:00
|
|
|
# Initialize any submodules.
|
|
|
|
git submodule update --init --recursive
|
|
|
|
./autogen.sh
|
|
|
|
./configure
|
|
|
|
make dist
|
|
|
|
|
|
|
|
# Unzip the dist tar file and install it.
|
|
|
|
DIST=`ls *.tar.gz`
|
|
|
|
tar -xf $DIST
|
|
|
|
pushd ${DIST//.tar.gz}
|
|
|
|
./configure && make check -j4 && make install
|
|
|
|
|
|
|
|
export LD_LIBRARY_PATH=/usr/local/lib
|
|
|
|
|
|
|
|
# Try to install Java
|
|
|
|
pushd java
|
2022-02-09 02:31:50 +00:00
|
|
|
use_java jdk11
|
2019-03-07 22:34:28 +00:00
|
|
|
$MVN install
|
|
|
|
popd
|
|
|
|
|
|
|
|
# Try to install Python
|
2022-02-09 02:31:50 +00:00
|
|
|
python3 -m venv venv
|
2019-03-07 22:34:28 +00:00
|
|
|
source venv/bin/activate
|
|
|
|
pushd python
|
2021-09-23 22:08:32 +00:00
|
|
|
python3 setup.py clean build sdist
|
|
|
|
pip3 install dist/protobuf-*.tar.gz
|
2019-03-07 22:34:28 +00:00
|
|
|
popd
|
|
|
|
deactivate
|
|
|
|
rm -rf python/venv
|
|
|
|
}
|
|
|
|
|
2015-05-19 00:34:02 +00:00
|
|
|
build_csharp() {
|
2017-10-25 07:03:50 +00:00
|
|
|
# Required for conformance tests and to regenerate protos.
|
2015-08-04 09:01:40 +00:00
|
|
|
internal_build_cpp
|
2016-02-22 23:39:29 +00:00
|
|
|
NUGET=/usr/local/bin/nuget.exe
|
2015-08-04 09:01:40 +00:00
|
|
|
|
2019-03-12 08:48:10 +00:00
|
|
|
# Disable some unwanted dotnet options
|
|
|
|
export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true
|
|
|
|
export DOTNET_CLI_TELEMETRY_OPTOUT=true
|
|
|
|
|
|
|
|
# TODO(jtattermusch): is this still needed with "first time experience"
|
|
|
|
# disabled?
|
2016-07-14 21:01:47 +00:00
|
|
|
# Perform "dotnet new" once to get the setup preprocessing out of the
|
|
|
|
# way. That spews a lot of output (including backspaces) into logs
|
|
|
|
# otherwise, and can cause problems. It doesn't matter if this step
|
|
|
|
# is performed multiple times; it's cheap after the first time anyway.
|
2017-05-04 07:51:46 +00:00
|
|
|
# (It also doesn't matter if it's unnecessary, which it will be on some
|
|
|
|
# systems. It's necessary on Jenkins in order to avoid unprintable
|
|
|
|
# characters appearing in the JUnit output.)
|
2016-07-14 21:01:47 +00:00
|
|
|
mkdir dotnettmp
|
|
|
|
(cd dotnettmp; dotnet new > /dev/null)
|
|
|
|
rm -rf dotnettmp
|
|
|
|
|
2017-10-25 07:03:50 +00:00
|
|
|
# Check that the protos haven't broken C# codegen.
|
|
|
|
# TODO(jonskeet): Fail if regenerating creates any changes.
|
|
|
|
csharp/generate_protos.sh
|
2018-05-23 23:43:30 +00:00
|
|
|
|
2015-05-19 00:34:02 +00:00
|
|
|
csharp/buildall.sh
|
2015-12-31 00:03:49 +00:00
|
|
|
cd conformance && make test_csharp && cd ..
|
2017-02-10 00:49:52 +00:00
|
|
|
|
|
|
|
# Run csharp compatibility test between 3.0.0 and the current version.
|
|
|
|
csharp/compatibility_tests/v3.0.0/test.sh 3.0.0
|
2019-07-25 21:31:00 +00:00
|
|
|
|
|
|
|
# Run csharp compatibility test between last released and the current version.
|
|
|
|
csharp/compatibility_tests/v3.0.0/test.sh $LAST_RELEASED
|
2015-05-19 00:34:02 +00:00
|
|
|
}
|
|
|
|
|
2015-11-20 23:32:53 +00:00
|
|
|
build_golang() {
|
|
|
|
# Go build needs `protoc`.
|
|
|
|
internal_build_cpp
|
|
|
|
# Add protoc to the path so that the examples build finds it.
|
|
|
|
export PATH="`pwd`/src:$PATH"
|
|
|
|
|
|
|
|
export GOPATH="$HOME/gocode"
|
2018-08-23 22:35:52 +00:00
|
|
|
mkdir -p "$GOPATH/src/github.com/protocolbuffers"
|
2020-05-12 20:02:09 +00:00
|
|
|
mkdir -p "$GOPATH/src/github.com/golang"
|
2018-08-22 18:55:30 +00:00
|
|
|
rm -f "$GOPATH/src/github.com/protocolbuffers/protobuf"
|
2020-05-12 20:02:09 +00:00
|
|
|
rm -f "$GOPATH/src/github.com/golang/protobuf"
|
2018-08-22 18:55:30 +00:00
|
|
|
ln -s "`pwd`" "$GOPATH/src/github.com/protocolbuffers/protobuf"
|
2015-11-20 23:32:53 +00:00
|
|
|
export PATH="$GOPATH/bin:$PATH"
|
2020-05-12 20:02:09 +00:00
|
|
|
(cd $GOPATH/src/github.com/golang && git clone https://github.com/golang/protobuf.git && cd protobuf && git checkout v1.3.5)
|
|
|
|
go install github.com/golang/protobuf/protoc-gen-go
|
2015-11-20 23:32:53 +00:00
|
|
|
|
2017-09-12 19:00:20 +00:00
|
|
|
cd examples && PROTO_PATH="-I../src -I." make gotest && cd ..
|
2015-11-20 23:32:53 +00:00
|
|
|
}
|
|
|
|
|
2015-05-13 23:43:48 +00:00
|
|
|
use_java() {
|
|
|
|
version=$1
|
|
|
|
case "$version" in
|
2022-02-09 02:31:50 +00:00
|
|
|
jdk11)
|
|
|
|
export PATH=/usr/lib/jvm/java-11-openjdk-amd64/bin:$PATH
|
|
|
|
export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64
|
|
|
|
;;
|
2019-06-26 19:28:49 +00:00
|
|
|
jdk8)
|
|
|
|
export PATH=/usr/lib/jvm/java-8-openjdk-amd64/bin:$PATH
|
|
|
|
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
|
|
|
|
;;
|
2015-05-13 23:43:48 +00:00
|
|
|
jdk7)
|
|
|
|
export PATH=/usr/lib/jvm/java-7-openjdk-amd64/bin:$PATH
|
2016-07-21 18:37:46 +00:00
|
|
|
export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64
|
2015-05-13 23:43:48 +00:00
|
|
|
;;
|
|
|
|
oracle7)
|
|
|
|
export PATH=/usr/lib/jvm/java-7-oracle/bin:$PATH
|
2016-07-21 18:37:46 +00:00
|
|
|
export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64
|
2015-05-13 23:43:48 +00:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2018-07-13 23:55:32 +00:00
|
|
|
MAVEN_LOCAL_REPOSITORY=/var/maven_local_repository
|
2021-12-14 23:40:36 +00:00
|
|
|
MVN="$MVN -e --quiet -Dhttps.protocols=TLSv1.2 -Dmaven.repo.local=$MAVEN_LOCAL_REPOSITORY"
|
2016-03-04 00:02:55 +00:00
|
|
|
|
2015-05-13 23:43:48 +00:00
|
|
|
which java
|
|
|
|
java -version
|
2016-07-21 18:37:46 +00:00
|
|
|
$MVN -version
|
2015-05-13 23:43:48 +00:00
|
|
|
}
|
|
|
|
|
2020-01-08 18:18:20 +00:00
|
|
|
# --batch-mode suppresses download progress output that spams the logs.
|
2016-02-20 20:17:10 +00:00
|
|
|
MVN="mvn --batch-mode"
|
2016-02-20 20:03:39 +00:00
|
|
|
|
2021-10-06 17:06:27 +00:00
|
|
|
internal_build_java() {
|
2016-03-01 23:37:17 +00:00
|
|
|
version=$1
|
|
|
|
dir=java_$version
|
2015-12-21 19:08:18 +00:00
|
|
|
# Java build needs `protoc`.
|
|
|
|
internal_build_cpp
|
2016-03-01 23:37:17 +00:00
|
|
|
cp -r java $dir
|
2021-05-11 19:07:45 +00:00
|
|
|
cd $dir && $MVN clean
|
2021-10-06 17:06:27 +00:00
|
|
|
# Skip tests here - callers will decide what tests they want to run
|
2022-03-04 17:03:36 +00:00
|
|
|
$MVN install -Dmaven.test.skip=true
|
2021-10-06 17:06:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
build_java() {
|
2021-10-06 20:40:09 +00:00
|
|
|
version=$1
|
|
|
|
internal_build_java $version
|
2021-05-11 19:07:45 +00:00
|
|
|
# Skip the Kotlin tests on Oracle 7
|
|
|
|
if [ "$version" == "oracle7" ]; then
|
|
|
|
$MVN test -pl bom,lite,core,util
|
|
|
|
else
|
|
|
|
$MVN test
|
|
|
|
fi
|
2015-12-21 19:08:18 +00:00
|
|
|
cd ../..
|
|
|
|
}
|
|
|
|
|
2016-03-01 23:37:17 +00:00
|
|
|
# The conformance tests are hard-coded to work with the $ROOT/java directory.
|
|
|
|
# So this can't run in parallel with two different sets of tests.
|
2015-12-21 19:08:18 +00:00
|
|
|
build_java_with_conformance_tests() {
|
2015-05-13 23:43:48 +00:00
|
|
|
# Java build needs `protoc`.
|
2015-07-15 18:05:10 +00:00
|
|
|
internal_build_cpp
|
2019-10-22 17:42:35 +00:00
|
|
|
# This local installation avoids the problem caused by a new version not yet in Maven Central
|
|
|
|
cd java/bom && $MVN install
|
|
|
|
cd ../..
|
2021-06-24 18:21:49 +00:00
|
|
|
cd java/core && $MVN test && $MVN install
|
|
|
|
cd ../lite && $MVN test && $MVN install
|
2021-06-24 22:06:55 +00:00
|
|
|
cd ../util && $MVN test && $MVN install && $MVN package assembly:single
|
2021-06-24 18:21:49 +00:00
|
|
|
if [ "$version" == "jdk8" ]; then
|
|
|
|
cd ../kotlin && $MVN test && $MVN install
|
|
|
|
cd ../kotlin-lite && $MVN test && $MVN install
|
|
|
|
fi
|
2015-12-21 11:25:59 +00:00
|
|
|
cd ../..
|
2015-05-13 23:43:48 +00:00
|
|
|
cd conformance && make test_java && cd ..
|
|
|
|
}
|
|
|
|
|
|
|
|
build_java_jdk7() {
|
|
|
|
use_java jdk7
|
2015-12-21 19:08:18 +00:00
|
|
|
build_java_with_conformance_tests
|
2015-05-13 23:43:48 +00:00
|
|
|
}
|
|
|
|
build_java_oracle7() {
|
|
|
|
use_java oracle7
|
2016-03-01 23:37:17 +00:00
|
|
|
build_java oracle7
|
2015-05-13 23:43:48 +00:00
|
|
|
}
|
2019-06-26 19:28:49 +00:00
|
|
|
build_java_linkage_monitor() {
|
2019-07-01 21:03:04 +00:00
|
|
|
# Linkage Monitor checks compatibility with other Google libraries
|
|
|
|
# https://github.com/GoogleCloudPlatform/cloud-opensource-java/tree/master/linkage-monitor
|
|
|
|
|
2022-02-09 02:31:50 +00:00
|
|
|
use_java jdk11
|
2019-07-01 21:03:04 +00:00
|
|
|
internal_build_cpp
|
|
|
|
|
|
|
|
# Linkage Monitor uses $HOME/.m2 local repository
|
|
|
|
MVN="mvn -e -B -Dhttps.protocols=TLSv1.2"
|
|
|
|
cd java
|
|
|
|
# Installs the snapshot version locally
|
|
|
|
$MVN install -Dmaven.test.skip=true
|
|
|
|
|
|
|
|
# Linkage Monitor uses the snapshot versions installed in $HOME/.m2 to verify compatibility
|
|
|
|
JAR=linkage-monitor-latest-all-deps.jar
|
|
|
|
curl -v -O "https://storage.googleapis.com/cloud-opensource-java-linkage-monitor/${JAR}"
|
|
|
|
# Fails if there's new linkage errors compared with baseline
|
|
|
|
java -jar $JAR com.google.cloud:libraries-bom
|
2019-06-26 19:28:49 +00:00
|
|
|
}
|
2015-05-13 23:43:48 +00:00
|
|
|
|
2016-05-24 15:27:33 +00:00
|
|
|
build_objectivec_ios() {
|
2015-11-09 19:21:51 +00:00
|
|
|
# Reused the build script that takes care of configuring and ensuring things
|
2016-05-24 15:27:33 +00:00
|
|
|
# are up to date. The OS X test runs the objc conformance test, so skip it
|
|
|
|
# here.
|
2015-11-17 15:18:49 +00:00
|
|
|
objectivec/DevTools/full_mac_build.sh \
|
2019-01-07 21:42:22 +00:00
|
|
|
--core-only --skip-xcode-osx --skip-xcode-tvos --skip-objc-conformance "$@"
|
2015-11-09 19:21:51 +00:00
|
|
|
}
|
|
|
|
|
2016-05-24 15:27:33 +00:00
|
|
|
build_objectivec_ios_debug() {
|
|
|
|
build_objectivec_ios --skip-xcode-release
|
2015-06-10 21:21:23 +00:00
|
|
|
}
|
|
|
|
|
2016-05-24 15:27:33 +00:00
|
|
|
build_objectivec_ios_release() {
|
|
|
|
build_objectivec_ios --skip-xcode-debug
|
2015-06-10 21:21:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
build_objectivec_osx() {
|
2016-05-24 15:27:33 +00:00
|
|
|
# Reused the build script that takes care of configuring and ensuring things
|
|
|
|
# are up to date.
|
|
|
|
objectivec/DevTools/full_mac_build.sh \
|
2019-01-07 21:42:22 +00:00
|
|
|
--core-only --skip-xcode-ios --skip-xcode-tvos
|
|
|
|
}
|
|
|
|
|
|
|
|
build_objectivec_tvos() {
|
|
|
|
# Reused the build script that takes care of configuring and ensuring things
|
|
|
|
# are up to date. The OS X test runs the objc conformance test, so skip it
|
|
|
|
# here.
|
|
|
|
objectivec/DevTools/full_mac_build.sh \
|
|
|
|
--core-only --skip-xcode-ios --skip-xcode-osx --skip-objc-conformance "$@"
|
|
|
|
}
|
|
|
|
|
|
|
|
build_objectivec_tvos_debug() {
|
|
|
|
build_objectivec_tvos --skip-xcode-release
|
|
|
|
}
|
|
|
|
|
|
|
|
build_objectivec_tvos_release() {
|
|
|
|
build_objectivec_tvos --skip-xcode-debug
|
2015-06-10 21:21:23 +00:00
|
|
|
}
|
2015-08-20 22:19:56 +00:00
|
|
|
|
2016-06-14 18:26:01 +00:00
|
|
|
build_objectivec_cocoapods_integration() {
|
|
|
|
objectivec/Tests/CocoaPods/run_tests.sh
|
|
|
|
}
|
|
|
|
|
2015-05-13 23:43:48 +00:00
|
|
|
build_python() {
|
2015-07-15 18:05:10 +00:00
|
|
|
internal_build_cpp
|
2015-05-13 23:43:48 +00:00
|
|
|
cd python
|
2022-02-09 02:31:50 +00:00
|
|
|
tox --skip-missing-interpreters
|
2015-05-13 23:43:48 +00:00
|
|
|
cd ..
|
|
|
|
}
|
|
|
|
|
2018-12-19 02:07:24 +00:00
|
|
|
build_python_version() {
|
|
|
|
internal_build_cpp
|
|
|
|
cd python
|
|
|
|
envlist=$1
|
2022-02-09 02:31:50 +00:00
|
|
|
tox -e $envlist
|
2018-12-19 02:07:24 +00:00
|
|
|
cd ..
|
|
|
|
}
|
|
|
|
|
|
|
|
build_python37() {
|
|
|
|
build_python_version py37-python
|
|
|
|
}
|
|
|
|
|
2019-12-13 23:49:18 +00:00
|
|
|
build_python38() {
|
|
|
|
build_python_version py38-python
|
|
|
|
}
|
|
|
|
|
2020-12-04 21:16:47 +00:00
|
|
|
build_python39() {
|
2020-12-16 00:08:56 +00:00
|
|
|
build_python_version py39-python
|
2020-12-04 21:16:47 +00:00
|
|
|
}
|
|
|
|
|
2021-10-15 17:24:49 +00:00
|
|
|
build_python310() {
|
|
|
|
build_python_version py310-python
|
|
|
|
}
|
|
|
|
|
2015-05-13 23:43:48 +00:00
|
|
|
build_python_cpp() {
|
2015-07-15 18:05:10 +00:00
|
|
|
internal_build_cpp
|
2016-09-30 00:07:47 +00:00
|
|
|
export LD_LIBRARY_PATH=../src/.libs # for Linux
|
|
|
|
export DYLD_LIBRARY_PATH=../src/.libs # for OS X
|
2015-05-13 23:43:48 +00:00
|
|
|
cd python
|
2022-02-09 02:31:50 +00:00
|
|
|
tox --skip-missing-interpreters
|
2015-05-13 23:43:48 +00:00
|
|
|
cd ..
|
|
|
|
}
|
|
|
|
|
2018-12-19 02:07:24 +00:00
|
|
|
build_python_cpp_version() {
|
|
|
|
internal_build_cpp
|
|
|
|
export LD_LIBRARY_PATH=../src/.libs # for Linux
|
|
|
|
export DYLD_LIBRARY_PATH=../src/.libs # for OS X
|
|
|
|
cd python
|
|
|
|
envlist=$1
|
|
|
|
tox -e $envlist
|
|
|
|
cd ..
|
|
|
|
}
|
|
|
|
|
|
|
|
build_python37_cpp() {
|
|
|
|
build_python_cpp_version py37-cpp
|
|
|
|
}
|
|
|
|
|
2019-12-13 23:49:18 +00:00
|
|
|
build_python38_cpp() {
|
|
|
|
build_python_cpp_version py38-cpp
|
|
|
|
}
|
|
|
|
|
2020-12-04 21:16:47 +00:00
|
|
|
build_python39_cpp() {
|
2020-12-16 00:08:56 +00:00
|
|
|
build_python_cpp_version py39-cpp
|
2020-12-04 21:16:47 +00:00
|
|
|
}
|
|
|
|
|
2021-10-15 17:24:49 +00:00
|
|
|
build_python310_cpp() {
|
|
|
|
build_python_cpp_version py310-cpp
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2018-07-02 22:11:36 +00:00
|
|
|
build_ruby23() {
|
|
|
|
internal_build_cpp # For conformance tests.
|
2018-10-18 18:16:55 +00:00
|
|
|
cd ruby && bash travis-test.sh ruby-2.3.8 && cd ..
|
2018-07-02 22:11:36 +00:00
|
|
|
}
|
|
|
|
build_ruby24() {
|
|
|
|
internal_build_cpp # For conformance tests.
|
|
|
|
cd ruby && bash travis-test.sh ruby-2.4 && cd ..
|
|
|
|
}
|
|
|
|
build_ruby25() {
|
|
|
|
internal_build_cpp # For conformance tests.
|
2018-10-18 18:16:55 +00:00
|
|
|
cd ruby && bash travis-test.sh ruby-2.5.1 && cd ..
|
2018-07-02 22:11:36 +00:00
|
|
|
}
|
2019-01-03 22:25:50 +00:00
|
|
|
build_ruby26() {
|
|
|
|
internal_build_cpp # For conformance tests.
|
|
|
|
cd ruby && bash travis-test.sh ruby-2.6.0 && cd ..
|
2015-05-13 23:43:48 +00:00
|
|
|
}
|
2020-04-17 17:20:38 +00:00
|
|
|
build_ruby27() {
|
|
|
|
internal_build_cpp # For conformance tests.
|
|
|
|
cd ruby && bash travis-test.sh ruby-2.7.0 && cd ..
|
|
|
|
}
|
Ported Ruby extension to upb_msg (#8184)
* WIP.
* WIP.
* WIP.
* WIP.
* WIP.
* WIP.
* Added some missing files.
* WIP.
* WIP.
* Updated upb.
* Extension loads, but crashes immediately.
* Gets through the test suite without SEGV!
Still a lot of bugs to fix, but it is a major step!
214 tests, 378 assertions, 37 failures, 147 errors, 0 pendings, 0 omissions, 0 notifications
14.0187% passed
* Test and build for Ruby 3.0
* Fixed a few more bugs, efficient #inspect is almost done.
214 tests, 134243 assertions, 30 failures, 144 errors, 0 pendings, 0 omissions, 0 notifications
18.6916% passed
* Fixed message hash initialization and encode depth checking.
214 tests, 124651 assertions, 53 failures, 70 errors, 0 pendings, 0 omissions, 0 notifications
42.5234% passed
* A bunch of fixes to failing tests, now 70% passing.
214 tests, 202091 assertions, 41 failures, 23 errors, 0 pendings, 0 omissions, 0 notifications
70.0935% passed
* More than 80% of tests are passing now.
214 tests, 322331 assertions, 30 failures, 9 errors, 0 pendings, 0 omissions, 0 notifications
81.7757% passed
Unfortunately there is also a sporadic bug/segfault hanging around
that appears to be GC-related.
* Add linux/ruby30 and macos/ruby30
* Use rvm master for 3.0.0-preview2
* Over 90% of tests are passing!
214 tests, 349898 assertions, 15 failures, 1 errors, 0 pendings, 0 omissions, 0 notifications
92.5234% passed
* Passes all tests!
214 tests, 369388 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed
* A bunch of cleanup.
1. Removed a bunch of internal-only symbols from headers.
2. Required a frozen check to get a non-const pointer to a map or array.
3. De-duplicated the code to get a type argument for Map/RepeatedField.
* Removed a bunch more stuff from protobuf.h. There is an intermittent assert failure.
Intermittent failure:
ruby: ../../../../ext/google/protobuf_c/protobuf.c:263: ObjectCache_Add: Assertion `rb_funcall(obj_cache2, (__builtin_constant_p("[]") ? __extension__ ({ static ID rb_intern_id_cache; if (!rb_intern_id_cache) rb_intern_id_cache = rb_intern2((("[]")
), (long)strlen(("[]"))); (ID) rb_intern_id_cache; }) : rb_intern("[]")), 1, key_rb) == val' failed
* Removed a few more things from protobuf.h.
* Ruby 3.0.0-preview2 to 3.0.0
* Require rake-compiler-dock >= 1.1.0
* More progress, fighting with the object cache.
* Passes on all Ruby versions!
* Updated and clarified comment regarding WeakMap.
* Fixed the wyhash compile.
* Fixed conformance tests for Ruby.
Conformance results now look like:
RUBYLIB=../ruby/lib:. ./conformance-test-runner --enforce_recommended --failure_list failure_list_ruby.txt --text_format_failure_list text_format_failure_list_ruby.txt ./conformance_ruby.rb
CONFORMANCE TEST BEGIN ====================================
CONFORMANCE SUITE PASSED: 1955 successes, 0 skipped, 58 expected failures, 0 unexpected failures.
CONFORMANCE TEST BEGIN ====================================
CONFORMANCE SUITE PASSED: 0 successes, 111 skipped, 8 expected failures, 0 unexpected failures.
Fixes include:
- Changed Ruby compiler to no longer reject proto2 maps.
- Changed Ruby compiler to emit a warning when proto2 extensions are
present instead of rejecting the .proto file completely.
- Fixed conformance tests to allow proto2 and look up message by name
instead of hardcoding a specific list of messages.
- Fixed conformance test to support the "ignore unknown" option for
JSON.
- Fixed conformance test to properly report serialization errors.
* Removed debug printf and fixed #inspect for floats.
* Fixed compatibility test to have proper semantics for #to_json.
* Updated Makefile.am with new file list.
* Don't try to copy wyhash when inside Docker.
* Fixed bug where we would forget that a sub-object is frozen in Ruby >=2.7.
* Avoid exporting unneeded symbols and refactored a bit of code.
* Some more refactoring.
* Simplified and added more comments.
* Some more comments and simplification. Added a missing license block.
Co-authored-by: Masaki Hara <hara@wantedly.com>
2021-01-13 20:16:25 +00:00
|
|
|
build_ruby30() {
|
|
|
|
internal_build_cpp # For conformance tests.
|
2021-08-01 19:07:15 +00:00
|
|
|
cd ruby && bash travis-test.sh ruby-3.0.2 && cd ..
|
Ported Ruby extension to upb_msg (#8184)
* WIP.
* WIP.
* WIP.
* WIP.
* WIP.
* WIP.
* Added some missing files.
* WIP.
* WIP.
* Updated upb.
* Extension loads, but crashes immediately.
* Gets through the test suite without SEGV!
Still a lot of bugs to fix, but it is a major step!
214 tests, 378 assertions, 37 failures, 147 errors, 0 pendings, 0 omissions, 0 notifications
14.0187% passed
* Test and build for Ruby 3.0
* Fixed a few more bugs, efficient #inspect is almost done.
214 tests, 134243 assertions, 30 failures, 144 errors, 0 pendings, 0 omissions, 0 notifications
18.6916% passed
* Fixed message hash initialization and encode depth checking.
214 tests, 124651 assertions, 53 failures, 70 errors, 0 pendings, 0 omissions, 0 notifications
42.5234% passed
* A bunch of fixes to failing tests, now 70% passing.
214 tests, 202091 assertions, 41 failures, 23 errors, 0 pendings, 0 omissions, 0 notifications
70.0935% passed
* More than 80% of tests are passing now.
214 tests, 322331 assertions, 30 failures, 9 errors, 0 pendings, 0 omissions, 0 notifications
81.7757% passed
Unfortunately there is also a sporadic bug/segfault hanging around
that appears to be GC-related.
* Add linux/ruby30 and macos/ruby30
* Use rvm master for 3.0.0-preview2
* Over 90% of tests are passing!
214 tests, 349898 assertions, 15 failures, 1 errors, 0 pendings, 0 omissions, 0 notifications
92.5234% passed
* Passes all tests!
214 tests, 369388 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed
* A bunch of cleanup.
1. Removed a bunch of internal-only symbols from headers.
2. Required a frozen check to get a non-const pointer to a map or array.
3. De-duplicated the code to get a type argument for Map/RepeatedField.
* Removed a bunch more stuff from protobuf.h. There is an intermittent assert failure.
Intermittent failure:
ruby: ../../../../ext/google/protobuf_c/protobuf.c:263: ObjectCache_Add: Assertion `rb_funcall(obj_cache2, (__builtin_constant_p("[]") ? __extension__ ({ static ID rb_intern_id_cache; if (!rb_intern_id_cache) rb_intern_id_cache = rb_intern2((("[]")
), (long)strlen(("[]"))); (ID) rb_intern_id_cache; }) : rb_intern("[]")), 1, key_rb) == val' failed
* Removed a few more things from protobuf.h.
* Ruby 3.0.0-preview2 to 3.0.0
* Require rake-compiler-dock >= 1.1.0
* More progress, fighting with the object cache.
* Passes on all Ruby versions!
* Updated and clarified comment regarding WeakMap.
* Fixed the wyhash compile.
* Fixed conformance tests for Ruby.
Conformance results now look like:
RUBYLIB=../ruby/lib:. ./conformance-test-runner --enforce_recommended --failure_list failure_list_ruby.txt --text_format_failure_list text_format_failure_list_ruby.txt ./conformance_ruby.rb
CONFORMANCE TEST BEGIN ====================================
CONFORMANCE SUITE PASSED: 1955 successes, 0 skipped, 58 expected failures, 0 unexpected failures.
CONFORMANCE TEST BEGIN ====================================
CONFORMANCE SUITE PASSED: 0 successes, 111 skipped, 8 expected failures, 0 unexpected failures.
Fixes include:
- Changed Ruby compiler to no longer reject proto2 maps.
- Changed Ruby compiler to emit a warning when proto2 extensions are
present instead of rejecting the .proto file completely.
- Fixed conformance tests to allow proto2 and look up message by name
instead of hardcoding a specific list of messages.
- Fixed conformance test to support the "ignore unknown" option for
JSON.
- Fixed conformance test to properly report serialization errors.
* Removed debug printf and fixed #inspect for floats.
* Fixed compatibility test to have proper semantics for #to_json.
* Updated Makefile.am with new file list.
* Don't try to copy wyhash when inside Docker.
* Fixed bug where we would forget that a sub-object is frozen in Ruby >=2.7.
* Avoid exporting unneeded symbols and refactored a bit of code.
* Some more refactoring.
* Simplified and added more comments.
* Some more comments and simplification. Added a missing license block.
Co-authored-by: Masaki Hara <hara@wantedly.com>
2021-01-13 20:16:25 +00:00
|
|
|
}
|
2015-05-13 23:43:48 +00:00
|
|
|
|
2021-10-07 22:45:38 +00:00
|
|
|
build_jruby92() {
|
2021-10-06 17:06:27 +00:00
|
|
|
internal_build_cpp # For conformance tests.
|
|
|
|
internal_build_java jdk8 && cd .. # For Maven protobuf jar with local changes
|
2022-02-25 14:11:12 +00:00
|
|
|
cd ruby && bash travis-test.sh jruby-9.2.20.1 && cd ..
|
2021-10-07 22:45:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
build_jruby93() {
|
|
|
|
internal_build_cpp # For conformance tests.
|
|
|
|
internal_build_java jdk8 && cd .. # For Maven protobuf jar with local changes
|
2022-02-25 14:11:12 +00:00
|
|
|
cd ruby && bash travis-test.sh jruby-9.3.3.0 && cd ..
|
2020-09-16 15:00:29 +00:00
|
|
|
}
|
|
|
|
|
2015-12-21 23:18:17 +00:00
|
|
|
build_javascript() {
|
|
|
|
internal_build_cpp
|
2020-05-13 23:16:27 +00:00
|
|
|
NODE_VERSION=node-v12.16.3-darwin-x64
|
|
|
|
NODE_TGZ="$NODE_VERSION.tar.gz"
|
|
|
|
pushd /tmp
|
|
|
|
curl -OL https://nodejs.org/dist/v12.16.3/$NODE_TGZ
|
|
|
|
tar zxvf $NODE_TGZ
|
|
|
|
export PATH=$PATH:`pwd`/$NODE_VERSION/bin
|
|
|
|
popd
|
2015-12-28 14:43:42 +00:00
|
|
|
cd js && npm install && npm test && cd ..
|
2016-06-08 19:38:15 +00:00
|
|
|
cd conformance && make test_nodejs && cd ..
|
2015-12-21 23:18:17 +00:00
|
|
|
}
|
|
|
|
|
2016-09-30 19:07:33 +00:00
|
|
|
use_php() {
|
|
|
|
VERSION=$1
|
2018-12-18 18:57:03 +00:00
|
|
|
export PATH=/usr/local/php-${VERSION}/bin:$PATH
|
2020-06-09 22:40:29 +00:00
|
|
|
internal_build_cpp
|
2016-09-30 19:07:33 +00:00
|
|
|
}
|
|
|
|
|
2021-05-04 17:19:22 +00:00
|
|
|
build_php() {
|
|
|
|
use_php $1
|
2021-02-04 17:50:28 +00:00
|
|
|
pushd php
|
|
|
|
rm -rf vendor
|
2022-01-27 04:45:20 +00:00
|
|
|
php -v
|
|
|
|
php -m
|
2021-02-04 17:50:28 +00:00
|
|
|
composer update
|
|
|
|
composer test
|
|
|
|
popd
|
|
|
|
(cd conformance && make test_php)
|
|
|
|
}
|
|
|
|
|
2021-05-04 17:19:22 +00:00
|
|
|
test_php_c() {
|
2016-12-08 22:39:20 +00:00
|
|
|
pushd php
|
2016-09-30 00:07:47 +00:00
|
|
|
rm -rf vendor
|
2022-01-27 04:45:20 +00:00
|
|
|
php -v
|
|
|
|
php -m
|
2018-12-18 18:57:03 +00:00
|
|
|
composer update
|
2021-05-04 17:19:22 +00:00
|
|
|
composer test_c
|
2019-03-13 04:30:06 +00:00
|
|
|
popd
|
2021-05-04 17:19:22 +00:00
|
|
|
(cd conformance && make test_php_c)
|
2019-03-13 04:30:06 +00:00
|
|
|
}
|
|
|
|
|
2021-05-04 17:19:22 +00:00
|
|
|
build_php_c() {
|
|
|
|
use_php $1
|
|
|
|
test_php_c
|
2017-04-19 23:23:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
build_php7.0_mac() {
|
2020-06-09 22:40:29 +00:00
|
|
|
internal_build_cpp
|
2017-04-19 23:23:51 +00:00
|
|
|
# Install PHP
|
|
|
|
curl -s https://php-osx.liip.ch/install.sh | bash -s 7.0
|
2020-05-13 22:36:21 +00:00
|
|
|
PHP_FOLDER=`find /usr/local -type d -name "php5-7.0*"` # The folder name may change upon time
|
|
|
|
test ! -z "$PHP_FOLDER"
|
2017-04-19 23:23:51 +00:00
|
|
|
export PATH="$PHP_FOLDER/bin:$PATH"
|
|
|
|
|
2021-05-04 17:19:22 +00:00
|
|
|
# Install Composer
|
|
|
|
wget https://getcomposer.org/download/2.0.13/composer.phar --progress=dot:mega -O /usr/local/bin/composer
|
|
|
|
chmod a+x /usr/local/bin/composer
|
|
|
|
|
2020-01-30 20:45:47 +00:00
|
|
|
# Install valgrind
|
|
|
|
echo "#! /bin/bash" > valgrind
|
|
|
|
chmod ug+x valgrind
|
|
|
|
sudo mv valgrind /usr/local/bin/valgrind
|
|
|
|
|
|
|
|
# Test
|
2021-05-04 17:19:22 +00:00
|
|
|
test_php_c
|
2020-01-30 20:45:47 +00:00
|
|
|
}
|
|
|
|
|
2020-05-13 22:36:21 +00:00
|
|
|
build_php7.3_mac() {
|
2020-06-09 22:40:29 +00:00
|
|
|
internal_build_cpp
|
2020-01-30 20:45:47 +00:00
|
|
|
# Install PHP
|
2020-05-13 22:36:21 +00:00
|
|
|
# We can't test PHP 7.4 with these binaries yet:
|
|
|
|
# https://github.com/liip/php-osx/issues/276
|
|
|
|
curl -s https://php-osx.liip.ch/install.sh | bash -s 7.3
|
|
|
|
PHP_FOLDER=`find /usr/local -type d -name "php5-7.3*"` # The folder name may change upon time
|
|
|
|
test ! -z "$PHP_FOLDER"
|
2020-01-30 20:45:47 +00:00
|
|
|
export PATH="$PHP_FOLDER/bin:$PATH"
|
|
|
|
|
2021-05-04 17:19:22 +00:00
|
|
|
# Install Composer
|
|
|
|
wget https://getcomposer.org/download/2.0.13/composer.phar --progress=dot:mega -O /usr/local/bin/composer
|
|
|
|
chmod a+x /usr/local/bin/composer
|
|
|
|
|
2017-04-19 23:23:51 +00:00
|
|
|
# Install valgrind
|
|
|
|
echo "#! /bin/bash" > valgrind
|
|
|
|
chmod ug+x valgrind
|
|
|
|
sudo mv valgrind /usr/local/bin/valgrind
|
|
|
|
|
|
|
|
# Test
|
2021-05-04 17:19:22 +00:00
|
|
|
test_php_c
|
2016-10-03 21:59:58 +00:00
|
|
|
}
|
|
|
|
|
2017-05-05 18:14:11 +00:00
|
|
|
build_php_compatibility() {
|
|
|
|
internal_build_cpp
|
2019-08-01 00:49:26 +00:00
|
|
|
php/tests/compatibility_test.sh $LAST_RELEASED
|
2017-05-05 18:14:11 +00:00
|
|
|
}
|
|
|
|
|
2019-12-12 21:59:51 +00:00
|
|
|
build_php_multirequest() {
|
|
|
|
use_php 7.4
|
2020-05-29 02:24:08 +00:00
|
|
|
php/tests/multirequest.sh
|
2019-12-12 21:59:51 +00:00
|
|
|
}
|
|
|
|
|
2020-08-12 02:30:46 +00:00
|
|
|
build_php8.0_all() {
|
2021-05-04 17:19:22 +00:00
|
|
|
build_php 8.0
|
2022-01-27 04:45:20 +00:00
|
|
|
build_php 8.1
|
2021-05-04 17:19:22 +00:00
|
|
|
build_php_c 8.0
|
2022-01-27 04:45:20 +00:00
|
|
|
build_php_c 8.1
|
2020-08-12 02:30:46 +00:00
|
|
|
}
|
|
|
|
|
2017-05-05 18:14:11 +00:00
|
|
|
build_php_all_32() {
|
2021-05-04 17:19:22 +00:00
|
|
|
build_php 7.0
|
|
|
|
build_php 7.1
|
|
|
|
build_php 7.4
|
|
|
|
build_php_c 7.0
|
|
|
|
build_php_c 7.1
|
|
|
|
build_php_c 7.4
|
|
|
|
build_php_c 7.1-zts
|
|
|
|
build_php_c 7.2-zts
|
|
|
|
build_php_c 7.5-zts
|
2016-10-26 00:27:05 +00:00
|
|
|
}
|
|
|
|
|
2017-05-05 18:14:11 +00:00
|
|
|
build_php_all() {
|
2021-05-04 17:19:22 +00:00
|
|
|
build_php_all_32
|
2019-12-12 21:59:51 +00:00
|
|
|
build_php_multirequest
|
2017-05-05 18:14:11 +00:00
|
|
|
build_php_compatibility
|
|
|
|
}
|
|
|
|
|
2018-12-19 00:20:23 +00:00
|
|
|
build_benchmark() {
|
2018-12-21 01:15:51 +00:00
|
|
|
use_php 7.2
|
2018-12-19 00:20:23 +00:00
|
|
|
cd kokoro/linux/benchmark && ./run.sh
|
|
|
|
}
|
|
|
|
|
2016-02-19 04:10:23 +00:00
|
|
|
# -------- main --------
|
|
|
|
|
|
|
|
if [ "$#" -ne 1 ]; then
|
|
|
|
echo "
|
|
|
|
Usage: $0 { cpp |
|
2016-07-20 00:20:31 +00:00
|
|
|
cpp_distcheck |
|
2016-02-19 04:10:23 +00:00
|
|
|
csharp |
|
|
|
|
java_jdk7 |
|
|
|
|
java_oracle7 |
|
2019-06-26 19:28:49 +00:00
|
|
|
java_linkage_monitor |
|
2016-02-19 04:10:23 +00:00
|
|
|
objectivec_ios |
|
2016-05-24 15:27:33 +00:00
|
|
|
objectivec_ios_debug |
|
|
|
|
objectivec_ios_release |
|
2016-02-19 04:10:23 +00:00
|
|
|
objectivec_osx |
|
2019-01-07 21:42:22 +00:00
|
|
|
objectivec_tvos |
|
|
|
|
objectivec_tvos_debug |
|
|
|
|
objectivec_tvos_release |
|
2016-06-14 18:26:01 +00:00
|
|
|
objectivec_cocoapods_integration |
|
2016-02-19 04:10:23 +00:00
|
|
|
python |
|
|
|
|
python_cpp |
|
2017-01-23 23:11:00 +00:00
|
|
|
python_compatibility |
|
2018-10-12 19:36:33 +00:00
|
|
|
ruby23 |
|
|
|
|
ruby24 |
|
|
|
|
ruby25 |
|
2019-01-03 22:25:50 +00:00
|
|
|
ruby26 |
|
2020-04-24 16:50:27 +00:00
|
|
|
ruby27 |
|
Ported Ruby extension to upb_msg (#8184)
* WIP.
* WIP.
* WIP.
* WIP.
* WIP.
* WIP.
* Added some missing files.
* WIP.
* WIP.
* Updated upb.
* Extension loads, but crashes immediately.
* Gets through the test suite without SEGV!
Still a lot of bugs to fix, but it is a major step!
214 tests, 378 assertions, 37 failures, 147 errors, 0 pendings, 0 omissions, 0 notifications
14.0187% passed
* Test and build for Ruby 3.0
* Fixed a few more bugs, efficient #inspect is almost done.
214 tests, 134243 assertions, 30 failures, 144 errors, 0 pendings, 0 omissions, 0 notifications
18.6916% passed
* Fixed message hash initialization and encode depth checking.
214 tests, 124651 assertions, 53 failures, 70 errors, 0 pendings, 0 omissions, 0 notifications
42.5234% passed
* A bunch of fixes to failing tests, now 70% passing.
214 tests, 202091 assertions, 41 failures, 23 errors, 0 pendings, 0 omissions, 0 notifications
70.0935% passed
* More than 80% of tests are passing now.
214 tests, 322331 assertions, 30 failures, 9 errors, 0 pendings, 0 omissions, 0 notifications
81.7757% passed
Unfortunately there is also a sporadic bug/segfault hanging around
that appears to be GC-related.
* Add linux/ruby30 and macos/ruby30
* Use rvm master for 3.0.0-preview2
* Over 90% of tests are passing!
214 tests, 349898 assertions, 15 failures, 1 errors, 0 pendings, 0 omissions, 0 notifications
92.5234% passed
* Passes all tests!
214 tests, 369388 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed
* A bunch of cleanup.
1. Removed a bunch of internal-only symbols from headers.
2. Required a frozen check to get a non-const pointer to a map or array.
3. De-duplicated the code to get a type argument for Map/RepeatedField.
* Removed a bunch more stuff from protobuf.h. There is an intermittent assert failure.
Intermittent failure:
ruby: ../../../../ext/google/protobuf_c/protobuf.c:263: ObjectCache_Add: Assertion `rb_funcall(obj_cache2, (__builtin_constant_p("[]") ? __extension__ ({ static ID rb_intern_id_cache; if (!rb_intern_id_cache) rb_intern_id_cache = rb_intern2((("[]")
), (long)strlen(("[]"))); (ID) rb_intern_id_cache; }) : rb_intern("[]")), 1, key_rb) == val' failed
* Removed a few more things from protobuf.h.
* Ruby 3.0.0-preview2 to 3.0.0
* Require rake-compiler-dock >= 1.1.0
* More progress, fighting with the object cache.
* Passes on all Ruby versions!
* Updated and clarified comment regarding WeakMap.
* Fixed the wyhash compile.
* Fixed conformance tests for Ruby.
Conformance results now look like:
RUBYLIB=../ruby/lib:. ./conformance-test-runner --enforce_recommended --failure_list failure_list_ruby.txt --text_format_failure_list text_format_failure_list_ruby.txt ./conformance_ruby.rb
CONFORMANCE TEST BEGIN ====================================
CONFORMANCE SUITE PASSED: 1955 successes, 0 skipped, 58 expected failures, 0 unexpected failures.
CONFORMANCE TEST BEGIN ====================================
CONFORMANCE SUITE PASSED: 0 successes, 111 skipped, 8 expected failures, 0 unexpected failures.
Fixes include:
- Changed Ruby compiler to no longer reject proto2 maps.
- Changed Ruby compiler to emit a warning when proto2 extensions are
present instead of rejecting the .proto file completely.
- Fixed conformance tests to allow proto2 and look up message by name
instead of hardcoding a specific list of messages.
- Fixed conformance test to support the "ignore unknown" option for
JSON.
- Fixed conformance test to properly report serialization errors.
* Removed debug printf and fixed #inspect for floats.
* Fixed compatibility test to have proper semantics for #to_json.
* Updated Makefile.am with new file list.
* Don't try to copy wyhash when inside Docker.
* Fixed bug where we would forget that a sub-object is frozen in Ruby >=2.7.
* Avoid exporting unneeded symbols and refactored a bit of code.
* Some more refactoring.
* Simplified and added more comments.
* Some more comments and simplification. Added a missing license block.
Co-authored-by: Masaki Hara <hara@wantedly.com>
2021-01-13 20:16:25 +00:00
|
|
|
ruby30 |
|
2021-10-07 22:45:38 +00:00
|
|
|
jruby92 |
|
|
|
|
jruby93 |
|
2016-09-30 00:07:47 +00:00
|
|
|
ruby_all |
|
2018-12-19 00:20:23 +00:00
|
|
|
php_all |
|
2021-05-04 17:19:22 +00:00
|
|
|
php_all_32 |
|
|
|
|
php7.0_mac |
|
|
|
|
php7.3_mac |
|
2019-03-07 22:34:28 +00:00
|
|
|
dist_install |
|
2018-12-21 01:15:51 +00:00
|
|
|
benchmark)
|
2016-02-19 04:10:23 +00:00
|
|
|
"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
set -e # exit immediately on error
|
|
|
|
set -x # display all commands
|
2018-07-13 23:55:32 +00:00
|
|
|
cd $(dirname $0)
|
2016-02-19 04:10:23 +00:00
|
|
|
eval "build_$1"
|