Josh Haberman | 738393b | 2016-02-18 20:10:23 -0800 | [diff] [blame] | 1 | #!/bin/bash |
Josh Haberman | 67c727c | 2016-03-04 14:21:18 -0800 | [diff] [blame] | 2 | # |
Feng Xiao | 9de4e64 | 2018-07-13 16:55:32 -0700 | [diff] [blame] | 3 | # Build and runs tests for the protobuf project. We use this script to run |
| 4 | # tests on kokoro (Ubuntu and MacOS). It can run locally as well but you |
| 5 | # will need to make sure the required compilers/tools are available. |
Josh Haberman | 0f8c25d | 2016-02-19 09:11:38 -0800 | [diff] [blame] | 6 | |
Josh Haberman | 181c7f2 | 2015-07-15 11:05:10 -0700 | [diff] [blame] | 7 | # For when some other test needs the C++ main build, including protoc and |
| 8 | # libprotobuf. |
| 9 | internal_build_cpp() { |
Josh Haberman | 738393b | 2016-02-18 20:10:23 -0800 | [diff] [blame] | 10 | if [ -f src/protoc ]; then |
| 11 | # Already built. |
| 12 | return |
| 13 | fi |
| 14 | |
Carlos O'Ryan | 3c5442a | 2018-03-26 16:54:32 -0400 | [diff] [blame] | 15 | # Initialize any submodules. |
| 16 | git submodule update --init --recursive |
| 17 | |
Chris Fallin | 20e94b2 | 2015-05-13 16:43:48 -0700 | [diff] [blame] | 18 | ./autogen.sh |
Paul Yang | daba665 | 2016-10-07 16:09:26 -0700 | [diff] [blame] | 19 | ./configure CXXFLAGS="-fPIC" # -fPIC is needed for python cpp test. |
| 20 | # See python/setup.py for more details |
Feng Xiao | f0b8a57 | 2018-08-09 15:22:22 -0700 | [diff] [blame] | 21 | make -j4 |
Josh Haberman | 181c7f2 | 2015-07-15 11:05:10 -0700 | [diff] [blame] | 22 | } |
| 23 | |
| 24 | build_cpp() { |
| 25 | internal_build_cpp |
Feng Xiao | f0b8a57 | 2018-08-09 15:22:22 -0700 | [diff] [blame] | 26 | make check -j4 || (cat src/test-suite.log; false) |
Bo Yang | fd332d1 | 2016-09-30 00:07:47 +0000 | [diff] [blame] | 27 | cd conformance && make test_cpp && cd .. |
Josh Haberman | cb36bde | 2016-04-29 09:52:20 -0700 | [diff] [blame] | 28 | |
Thomas Van Lenten | bc9d077 | 2016-12-08 16:19:58 -0500 | [diff] [blame] | 29 | # The benchmark code depends on cmake, so test if it is installed before |
| 30 | # trying to do the build. |
Thomas Van Lenten | bc9d077 | 2016-12-08 16:19:58 -0500 | [diff] [blame] | 31 | if [[ $(type cmake 2>/dev/null) ]]; then |
| 32 | # Verify benchmarking code can build successfully. |
Yilun Chong | 34843ed | 2017-12-13 14:34:52 -0800 | [diff] [blame] | 33 | cd benchmarks && make cpp-benchmark && cd .. |
Thomas Van Lenten | bc9d077 | 2016-12-08 16:19:58 -0500 | [diff] [blame] | 34 | else |
| 35 | echo "" |
| 36 | echo "WARNING: Skipping validation of the bench marking code, cmake isn't installed." |
| 37 | echo "" |
| 38 | fi |
Chris Fallin | 20e94b2 | 2015-05-13 16:43:48 -0700 | [diff] [blame] | 39 | } |
| 40 | |
| 41 | build_cpp_distcheck() { |
Carlos O'Ryan | 3c5442a | 2018-03-26 16:54:32 -0400 | [diff] [blame] | 42 | # Initialize any submodules. |
| 43 | git submodule update --init --recursive |
Chris Fallin | 20e94b2 | 2015-05-13 16:43:48 -0700 | [diff] [blame] | 44 | ./autogen.sh |
| 45 | ./configure |
Feng Xiao | a4f68b1 | 2016-07-19 17:20:31 -0700 | [diff] [blame] | 46 | make dist |
| 47 | |
| 48 | # List all files that should be included in the distribution package. |
Jisi Liu | 55fdbe5 | 2017-08-23 11:35:48 -0700 | [diff] [blame] | 49 | git ls-files | grep "^\(java\|python\|objectivec\|csharp\|js\|ruby\|php\|cmake\|examples\|src/google/protobuf/.*\.proto\)" |\ |
Jie Luo | ea51149 | 2017-01-23 15:11:00 -0800 | [diff] [blame] | 50 | grep -v ".gitignore" | grep -v "java/compatibility_tests" |\ |
Jie Luo | 7288689 | 2017-02-09 16:49:52 -0800 | [diff] [blame] | 51 | grep -v "python/compatibility_tests" | grep -v "csharp/compatibility_tests" > dist.lst |
Feng Xiao | a4f68b1 | 2016-07-19 17:20:31 -0700 | [diff] [blame] | 52 | # Unzip the dist tar file. |
| 53 | DIST=`ls *.tar.gz` |
| 54 | tar -xf $DIST |
| 55 | cd ${DIST//.tar.gz} |
| 56 | # Check if every file exists in the dist tar file. |
| 57 | FILES_MISSING="" |
| 58 | for FILE in $(<../dist.lst); do |
Feng Xiao | acd5b05 | 2018-08-09 21:21:01 -0700 | [diff] [blame] | 59 | [ -f "$FILE" ] || { |
Feng Xiao | a4f68b1 | 2016-07-19 17:20:31 -0700 | [diff] [blame] | 60 | echo "$FILE is not found!" |
| 61 | FILES_MISSING="$FILE $FILES_MISSING" |
Feng Xiao | acd5b05 | 2018-08-09 21:21:01 -0700 | [diff] [blame] | 62 | } |
Feng Xiao | a4f68b1 | 2016-07-19 17:20:31 -0700 | [diff] [blame] | 63 | done |
| 64 | cd .. |
| 65 | if [ ! -z "$FILES_MISSING" ]; then |
| 66 | echo "Missing files in EXTRA_DIST: $FILES_MISSING" |
| 67 | exit 1 |
| 68 | fi |
| 69 | |
| 70 | # Do the regular dist-check for C++. |
Feng Xiao | f0b8a57 | 2018-08-09 15:22:22 -0700 | [diff] [blame] | 71 | make distcheck -j4 |
Chris Fallin | 20e94b2 | 2015-05-13 16:43:48 -0700 | [diff] [blame] | 72 | } |
| 73 | |
Jan Tattermusch | ddb36ef | 2015-05-18 17:34:02 -0700 | [diff] [blame] | 74 | build_csharp() { |
Jon Skeet | 9a9a66e | 2017-10-25 08:03:50 +0100 | [diff] [blame] | 75 | # Required for conformance tests and to regenerate protos. |
Jon Skeet | b6defa7 | 2015-08-04 10:01:40 +0100 | [diff] [blame] | 76 | internal_build_cpp |
Josh Haberman | ffc8118 | 2016-02-22 15:39:29 -0800 | [diff] [blame] | 77 | NUGET=/usr/local/bin/nuget.exe |
Jon Skeet | b6defa7 | 2015-08-04 10:01:40 +0100 | [diff] [blame] | 78 | |
Jon Skeet | 10a8fb4 | 2016-07-14 22:01:47 +0100 | [diff] [blame] | 79 | # Perform "dotnet new" once to get the setup preprocessing out of the |
| 80 | # way. That spews a lot of output (including backspaces) into logs |
| 81 | # otherwise, and can cause problems. It doesn't matter if this step |
| 82 | # is performed multiple times; it's cheap after the first time anyway. |
Jon Skeet | f26e8c2 | 2017-05-04 08:51:46 +0100 | [diff] [blame] | 83 | # (It also doesn't matter if it's unnecessary, which it will be on some |
| 84 | # systems. It's necessary on Jenkins in order to avoid unprintable |
| 85 | # characters appearing in the JUnit output.) |
Jon Skeet | 10a8fb4 | 2016-07-14 22:01:47 +0100 | [diff] [blame] | 86 | mkdir dotnettmp |
| 87 | (cd dotnettmp; dotnet new > /dev/null) |
| 88 | rm -rf dotnettmp |
| 89 | |
Jon Skeet | 9a9a66e | 2017-10-25 08:03:50 +0100 | [diff] [blame] | 90 | # Check that the protos haven't broken C# codegen. |
| 91 | # TODO(jonskeet): Fail if regenerating creates any changes. |
| 92 | csharp/generate_protos.sh |
Brent Shaffer | 6737954 | 2018-05-23 16:43:30 -0700 | [diff] [blame] | 93 | |
Jan Tattermusch | ddb36ef | 2015-05-18 17:34:02 -0700 | [diff] [blame] | 94 | csharp/buildall.sh |
Josh Haberman | e891c29 | 2015-12-30 16:03:49 -0800 | [diff] [blame] | 95 | cd conformance && make test_csharp && cd .. |
Jie Luo | 7288689 | 2017-02-09 16:49:52 -0800 | [diff] [blame] | 96 | |
| 97 | # Run csharp compatibility test between 3.0.0 and the current version. |
| 98 | csharp/compatibility_tests/v3.0.0/test.sh 3.0.0 |
Jan Tattermusch | ddb36ef | 2015-05-18 17:34:02 -0700 | [diff] [blame] | 99 | } |
| 100 | |
Tim Swast | 7e31c4d | 2015-11-20 15:32:53 -0800 | [diff] [blame] | 101 | build_golang() { |
| 102 | # Go build needs `protoc`. |
| 103 | internal_build_cpp |
| 104 | # Add protoc to the path so that the examples build finds it. |
| 105 | export PATH="`pwd`/src:$PATH" |
| 106 | |
Tim Swast | 7e31c4d | 2015-11-20 15:32:53 -0800 | [diff] [blame] | 107 | export GOPATH="$HOME/gocode" |
Feng Xiao | a0a17e2 | 2018-08-23 15:35:52 -0700 | [diff] [blame] | 108 | mkdir -p "$GOPATH/src/github.com/protocolbuffers" |
Feng Xiao | afe98de | 2018-08-22 11:55:30 -0700 | [diff] [blame] | 109 | rm -f "$GOPATH/src/github.com/protocolbuffers/protobuf" |
| 110 | ln -s "`pwd`" "$GOPATH/src/github.com/protocolbuffers/protobuf" |
Tim Swast | 7e31c4d | 2015-11-20 15:32:53 -0800 | [diff] [blame] | 111 | export PATH="$GOPATH/bin:$PATH" |
| 112 | go get github.com/golang/protobuf/protoc-gen-go |
| 113 | |
Feng Xiao | 8136ccb | 2017-09-12 12:00:20 -0700 | [diff] [blame] | 114 | cd examples && PROTO_PATH="-I../src -I." make gotest && cd .. |
Tim Swast | 7e31c4d | 2015-11-20 15:32:53 -0800 | [diff] [blame] | 115 | } |
| 116 | |
Chris Fallin | 20e94b2 | 2015-05-13 16:43:48 -0700 | [diff] [blame] | 117 | use_java() { |
Chris Fallin | 20e94b2 | 2015-05-13 16:43:48 -0700 | [diff] [blame] | 118 | version=$1 |
| 119 | case "$version" in |
Chris Fallin | 20e94b2 | 2015-05-13 16:43:48 -0700 | [diff] [blame] | 120 | jdk7) |
Chris Fallin | 20e94b2 | 2015-05-13 16:43:48 -0700 | [diff] [blame] | 121 | export PATH=/usr/lib/jvm/java-7-openjdk-amd64/bin:$PATH |
Feng Xiao | ad49ed7 | 2016-07-21 11:37:46 -0700 | [diff] [blame] | 122 | export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64 |
Chris Fallin | 20e94b2 | 2015-05-13 16:43:48 -0700 | [diff] [blame] | 123 | ;; |
| 124 | oracle7) |
Chris Fallin | 20e94b2 | 2015-05-13 16:43:48 -0700 | [diff] [blame] | 125 | export PATH=/usr/lib/jvm/java-7-oracle/bin:$PATH |
Feng Xiao | ad49ed7 | 2016-07-21 11:37:46 -0700 | [diff] [blame] | 126 | export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64 |
Chris Fallin | 20e94b2 | 2015-05-13 16:43:48 -0700 | [diff] [blame] | 127 | ;; |
| 128 | esac |
| 129 | |
Feng Xiao | 9de4e64 | 2018-07-13 16:55:32 -0700 | [diff] [blame] | 130 | MAVEN_LOCAL_REPOSITORY=/var/maven_local_repository |
Yilun Chong | 2b7ee38 | 2018-09-23 17:07:02 -0700 | [diff] [blame] | 131 | MVN="$MVN -e -X -Dhttps.protocols=TLSv1.2 -Dmaven.repo.local=$MAVEN_LOCAL_REPOSITORY" |
Josh Haberman | 1ee0fda | 2016-03-03 16:02:55 -0800 | [diff] [blame] | 132 | |
Chris Fallin | 20e94b2 | 2015-05-13 16:43:48 -0700 | [diff] [blame] | 133 | which java |
| 134 | java -version |
Feng Xiao | ad49ed7 | 2016-07-21 11:37:46 -0700 | [diff] [blame] | 135 | $MVN -version |
Chris Fallin | 20e94b2 | 2015-05-13 16:43:48 -0700 | [diff] [blame] | 136 | } |
| 137 | |
Josh Haberman | d08c39c | 2016-02-20 12:03:39 -0800 | [diff] [blame] | 138 | # --batch-mode supresses download progress output that spams the logs. |
Josh Haberman | b28b3f6 | 2016-02-20 12:17:10 -0800 | [diff] [blame] | 139 | MVN="mvn --batch-mode" |
Josh Haberman | d08c39c | 2016-02-20 12:03:39 -0800 | [diff] [blame] | 140 | |
Chris Fallin | 20e94b2 | 2015-05-13 16:43:48 -0700 | [diff] [blame] | 141 | build_java() { |
Josh Haberman | 2f3f1de | 2016-03-01 15:37:17 -0800 | [diff] [blame] | 142 | version=$1 |
| 143 | dir=java_$version |
Chris Fallin | 20e94b2 | 2015-05-13 16:43:48 -0700 | [diff] [blame] | 144 | # Java build needs `protoc`. |
Josh Haberman | 181c7f2 | 2015-07-15 11:05:10 -0700 | [diff] [blame] | 145 | internal_build_cpp |
Josh Haberman | 2f3f1de | 2016-03-01 15:37:17 -0800 | [diff] [blame] | 146 | cp -r java $dir |
| 147 | cd $dir && $MVN clean && $MVN test |
Feng Xiao | 9e5fb55 | 2015-12-21 11:08:18 -0800 | [diff] [blame] | 148 | cd ../.. |
| 149 | } |
| 150 | |
Josh Haberman | 2f3f1de | 2016-03-01 15:37:17 -0800 | [diff] [blame] | 151 | # The conformance tests are hard-coded to work with the $ROOT/java directory. |
| 152 | # So this can't run in parallel with two different sets of tests. |
Feng Xiao | 9e5fb55 | 2015-12-21 11:08:18 -0800 | [diff] [blame] | 153 | build_java_with_conformance_tests() { |
| 154 | # Java build needs `protoc`. |
| 155 | internal_build_cpp |
Josh Haberman | d08c39c | 2016-02-20 12:03:39 -0800 | [diff] [blame] | 156 | cd java && $MVN test && $MVN install |
Josh Haberman | 2f3f1de | 2016-03-01 15:37:17 -0800 | [diff] [blame] | 157 | cd util && $MVN package assembly:single |
Feng Xiao | af81dcf | 2015-12-21 03:25:59 -0800 | [diff] [blame] | 158 | cd ../.. |
Chris Fallin | 20e94b2 | 2015-05-13 16:43:48 -0700 | [diff] [blame] | 159 | cd conformance && make test_java && cd .. |
| 160 | } |
| 161 | |
Chris Fallin | 20e94b2 | 2015-05-13 16:43:48 -0700 | [diff] [blame] | 162 | build_java_jdk7() { |
| 163 | use_java jdk7 |
Feng Xiao | 9e5fb55 | 2015-12-21 11:08:18 -0800 | [diff] [blame] | 164 | build_java_with_conformance_tests |
Chris Fallin | 20e94b2 | 2015-05-13 16:43:48 -0700 | [diff] [blame] | 165 | } |
| 166 | build_java_oracle7() { |
| 167 | use_java oracle7 |
Josh Haberman | 2f3f1de | 2016-03-01 15:37:17 -0800 | [diff] [blame] | 168 | build_java oracle7 |
Chris Fallin | 20e94b2 | 2015-05-13 16:43:48 -0700 | [diff] [blame] | 169 | } |
Feng Xiao | baa4023 | 2016-07-29 14:11:21 -0700 | [diff] [blame] | 170 | build_java_compatibility() { |
| 171 | use_java jdk7 |
| 172 | internal_build_cpp |
| 173 | # Use the unit-tests extraced from 2.5.0 to test the compatibilty between |
| 174 | # 3.0.0-beta-4 and the current version. |
| 175 | cd java/compatibility_tests/v2.5.0 |
| 176 | ./test.sh 3.0.0-beta-4 |
| 177 | } |
Chris Fallin | 20e94b2 | 2015-05-13 16:43:48 -0700 | [diff] [blame] | 178 | |
Thomas Van Lenten | 9642b82 | 2015-06-10 17:21:23 -0400 | [diff] [blame] | 179 | build_objectivec_ios() { |
Thomas Van Lenten | 368a2f4 | 2016-05-24 11:27:33 -0400 | [diff] [blame] | 180 | # Reused the build script that takes care of configuring and ensuring things |
| 181 | # are up to date. The OS X test runs the objc conformance test, so skip it |
| 182 | # here. |
| 183 | # Note: travis has xctool installed, and we've looked at using it in the past |
| 184 | # but it has ended up proving unreliable (bugs), an they are removing build |
| 185 | # support in favor of xcbuild (or just xcodebuild). |
| 186 | objectivec/DevTools/full_mac_build.sh \ |
| 187 | --core-only --skip-xcode-osx --skip-objc-conformance "$@" |
| 188 | } |
| 189 | |
| 190 | build_objectivec_ios_debug() { |
| 191 | build_objectivec_ios --skip-xcode-release |
| 192 | } |
| 193 | |
| 194 | build_objectivec_ios_release() { |
| 195 | build_objectivec_ios --skip-xcode-debug |
Thomas Van Lenten | 9642b82 | 2015-06-10 17:21:23 -0400 | [diff] [blame] | 196 | } |
| 197 | |
| 198 | build_objectivec_osx() { |
Thomas Van Lenten | 368a2f4 | 2016-05-24 11:27:33 -0400 | [diff] [blame] | 199 | # Reused the build script that takes care of configuring and ensuring things |
| 200 | # are up to date. |
| 201 | objectivec/DevTools/full_mac_build.sh \ |
| 202 | --core-only --skip-xcode-ios |
Thomas Van Lenten | 9642b82 | 2015-06-10 17:21:23 -0400 | [diff] [blame] | 203 | } |
Dan O'Reilly | 5de2a81 | 2015-08-20 18:19:56 -0400 | [diff] [blame] | 204 | |
Sergio Campamá | f0c1492 | 2016-06-14 11:26:01 -0700 | [diff] [blame] | 205 | build_objectivec_cocoapods_integration() { |
Sergio Campamá | f0c1492 | 2016-06-14 11:26:01 -0700 | [diff] [blame] | 206 | # Update pod to the latest version. |
| 207 | gem install cocoapods --no-ri --no-rdoc |
| 208 | objectivec/Tests/CocoaPods/run_tests.sh |
| 209 | } |
| 210 | |
Chris Fallin | 20e94b2 | 2015-05-13 16:43:48 -0700 | [diff] [blame] | 211 | build_python() { |
Josh Haberman | 181c7f2 | 2015-07-15 11:05:10 -0700 | [diff] [blame] | 212 | internal_build_cpp |
Chris Fallin | 20e94b2 | 2015-05-13 16:43:48 -0700 | [diff] [blame] | 213 | cd python |
Dan O'Reilly | 76f8a3f | 2015-08-21 18:51:47 -0400 | [diff] [blame] | 214 | if [ $(uname -s) == "Linux" ]; then |
Jie Luo | 610e433 | 2017-08-22 16:23:21 -0700 | [diff] [blame] | 215 | envlist=py\{27,33,34,35,36\}-python |
Dan O'Reilly | 76f8a3f | 2015-08-21 18:51:47 -0400 | [diff] [blame] | 216 | else |
| 217 | envlist=py27-python |
| 218 | fi |
| 219 | tox -e $envlist |
Chris Fallin | 20e94b2 | 2015-05-13 16:43:48 -0700 | [diff] [blame] | 220 | cd .. |
| 221 | } |
| 222 | |
| 223 | build_python_cpp() { |
Josh Haberman | 181c7f2 | 2015-07-15 11:05:10 -0700 | [diff] [blame] | 224 | internal_build_cpp |
Bo Yang | fd332d1 | 2016-09-30 00:07:47 +0000 | [diff] [blame] | 225 | export LD_LIBRARY_PATH=../src/.libs # for Linux |
| 226 | export DYLD_LIBRARY_PATH=../src/.libs # for OS X |
Chris Fallin | 20e94b2 | 2015-05-13 16:43:48 -0700 | [diff] [blame] | 227 | cd python |
Dan O'Reilly | 76f8a3f | 2015-08-21 18:51:47 -0400 | [diff] [blame] | 228 | if [ $(uname -s) == "Linux" ]; then |
Jie Luo | 610e433 | 2017-08-22 16:23:21 -0700 | [diff] [blame] | 229 | envlist=py\{27,33,34,35,36\}-cpp |
Dan O'Reilly | 76f8a3f | 2015-08-21 18:51:47 -0400 | [diff] [blame] | 230 | else |
| 231 | envlist=py27-cpp |
| 232 | fi |
| 233 | tox -e $envlist |
Chris Fallin | 20e94b2 | 2015-05-13 16:43:48 -0700 | [diff] [blame] | 234 | cd .. |
| 235 | } |
| 236 | |
Jie Luo | ea51149 | 2017-01-23 15:11:00 -0800 | [diff] [blame] | 237 | build_python_compatibility() { |
| 238 | internal_build_cpp |
| 239 | # Use the unit-tests extraced from 2.5.0 to test the compatibilty. |
| 240 | cd python/compatibility_tests/v2.5.0 |
| 241 | # Test between 2.5.0 and the current version. |
| 242 | ./test.sh 2.5.0 |
| 243 | # Test between 3.0.0-beta-1 and the current version. |
| 244 | ./test.sh 3.0.0-beta-1 |
| 245 | } |
| 246 | |
Chris Fallin | 20e94b2 | 2015-05-13 16:43:48 -0700 | [diff] [blame] | 247 | build_ruby21() { |
Josh Haberman | 181c7f2 | 2015-07-15 11:05:10 -0700 | [diff] [blame] | 248 | internal_build_cpp # For conformance tests. |
Chris Fallin | 20e94b2 | 2015-05-13 16:43:48 -0700 | [diff] [blame] | 249 | cd ruby && bash travis-test.sh ruby-2.1 && cd .. |
| 250 | } |
| 251 | build_ruby22() { |
Josh Haberman | 181c7f2 | 2015-07-15 11:05:10 -0700 | [diff] [blame] | 252 | internal_build_cpp # For conformance tests. |
Chris Fallin | 20e94b2 | 2015-05-13 16:43:48 -0700 | [diff] [blame] | 253 | cd ruby && bash travis-test.sh ruby-2.2 && cd .. |
| 254 | } |
Paul Yang | 78ba021 | 2018-07-02 15:11:36 -0700 | [diff] [blame] | 255 | build_ruby23() { |
| 256 | internal_build_cpp # For conformance tests. |
| 257 | cd ruby && bash travis-test.sh ruby-2.3 && cd .. |
| 258 | } |
| 259 | build_ruby24() { |
| 260 | internal_build_cpp # For conformance tests. |
| 261 | cd ruby && bash travis-test.sh ruby-2.4 && cd .. |
| 262 | } |
| 263 | build_ruby25() { |
| 264 | internal_build_cpp # For conformance tests. |
| 265 | cd ruby && bash travis-test.sh ruby-2.5.0 && cd .. |
| 266 | } |
Feng Xiao | 20fbb35 | 2016-07-21 18:04:56 -0700 | [diff] [blame] | 267 | build_ruby_all() { |
| 268 | build_ruby21 |
| 269 | build_ruby22 |
Paul Yang | 78ba021 | 2018-07-02 15:11:36 -0700 | [diff] [blame] | 270 | build_ruby23 |
| 271 | build_ruby24 |
| 272 | build_ruby25 |
Chris Fallin | 20e94b2 | 2015-05-13 16:43:48 -0700 | [diff] [blame] | 273 | } |
| 274 | |
Josh Haberman | e9cf31e | 2015-12-21 15:18:17 -0800 | [diff] [blame] | 275 | build_javascript() { |
| 276 | internal_build_cpp |
Josh Haberman | 0d2d8bc | 2015-12-28 06:43:42 -0800 | [diff] [blame] | 277 | cd js && npm install && npm test && cd .. |
Josh Haberman | f873d32 | 2016-06-08 12:38:15 -0700 | [diff] [blame] | 278 | cd conformance && make test_nodejs && cd .. |
Josh Haberman | e9cf31e | 2015-12-21 15:18:17 -0800 | [diff] [blame] | 279 | } |
| 280 | |
Paul Yang | 46ae90d | 2016-12-08 11:16:49 -0800 | [diff] [blame] | 281 | generate_php_test_proto() { |
| 282 | internal_build_cpp |
| 283 | pushd php/tests |
| 284 | # Generate test file |
| 285 | rm -rf generated |
| 286 | mkdir generated |
Bo Yang | f46a01d | 2017-09-12 15:04:34 -0700 | [diff] [blame] | 287 | ../../src/protoc --php_out=generated \ |
michaelbausor | 6a51c03 | 2018-10-07 16:56:41 -0700 | [diff] [blame] | 288 | -I../../src -I. \ |
Brent Shaffer | 6737954 | 2018-05-23 16:43:30 -0700 | [diff] [blame] | 289 | proto/empty/echo.proto \ |
Bo Yang | f46a01d | 2017-09-12 15:04:34 -0700 | [diff] [blame] | 290 | proto/test.proto \ |
| 291 | proto/test_include.proto \ |
| 292 | proto/test_no_namespace.proto \ |
| 293 | proto/test_prefix.proto \ |
| 294 | proto/test_php_namespace.proto \ |
| 295 | proto/test_empty_php_namespace.proto \ |
| 296 | proto/test_reserved_enum_lower.proto \ |
| 297 | proto/test_reserved_enum_upper.proto \ |
| 298 | proto/test_reserved_enum_value_lower.proto \ |
| 299 | proto/test_reserved_enum_value_upper.proto \ |
| 300 | proto/test_reserved_message_lower.proto \ |
| 301 | proto/test_reserved_message_upper.proto \ |
| 302 | proto/test_service.proto \ |
| 303 | proto/test_service_namespace.proto \ |
michaelbausor | 6a51c03 | 2018-10-07 16:56:41 -0700 | [diff] [blame] | 304 | proto/test_wrapper_type_setters.proto \ |
Paul Yang | c15a326 | 2017-08-02 07:42:27 -0700 | [diff] [blame] | 305 | proto/test_descriptors.proto |
Paul Yang | 46ae90d | 2016-12-08 11:16:49 -0800 | [diff] [blame] | 306 | pushd ../../src |
Paul Yang | bcda919 | 2017-11-03 12:30:09 -0700 | [diff] [blame] | 307 | ./protoc --php_out=../php/tests/generated -I../php/tests -I. \ |
| 308 | ../php/tests/proto/test_import_descriptor_proto.proto |
Paul Yang | 46ae90d | 2016-12-08 11:16:49 -0800 | [diff] [blame] | 309 | popd |
| 310 | popd |
| 311 | } |
| 312 | |
Bo Yang | c8bd36e | 2016-09-30 19:07:33 +0000 | [diff] [blame] | 313 | use_php() { |
| 314 | VERSION=$1 |
| 315 | PHP=`which php` |
| 316 | PHP_CONFIG=`which php-config` |
| 317 | PHPIZE=`which phpize` |
Paul Yang | 190b527 | 2017-04-19 16:23:51 -0700 | [diff] [blame] | 318 | ln -sfn "/usr/local/php-${VERSION}/bin/php" $PHP |
| 319 | ln -sfn "/usr/local/php-${VERSION}/bin/php-config" $PHP_CONFIG |
| 320 | ln -sfn "/usr/local/php-${VERSION}/bin/phpize" $PHPIZE |
Paul Yang | 46ae90d | 2016-12-08 11:16:49 -0800 | [diff] [blame] | 321 | generate_php_test_proto |
Bo Yang | c8bd36e | 2016-09-30 19:07:33 +0000 | [diff] [blame] | 322 | } |
| 323 | |
Bo Yang | c96dd66 | 2016-10-04 17:32:08 +0000 | [diff] [blame] | 324 | use_php_zts() { |
| 325 | VERSION=$1 |
| 326 | PHP=`which php` |
| 327 | PHP_CONFIG=`which php-config` |
| 328 | PHPIZE=`which phpize` |
| 329 | ln -sfn "/usr/local/php-${VERSION}-zts/bin/php" $PHP |
| 330 | ln -sfn "/usr/local/php-${VERSION}-zts/bin/php-config" $PHP_CONFIG |
| 331 | ln -sfn "/usr/local/php-${VERSION}-zts/bin/phpize" $PHPIZE |
Paul Yang | 46ae90d | 2016-12-08 11:16:49 -0800 | [diff] [blame] | 332 | generate_php_test_proto |
Bo Yang | c96dd66 | 2016-10-04 17:32:08 +0000 | [diff] [blame] | 333 | } |
| 334 | |
Paul Yang | 51c5ff8 | 2016-10-25 17:27:05 -0700 | [diff] [blame] | 335 | use_php_bc() { |
| 336 | VERSION=$1 |
| 337 | PHP=`which php` |
| 338 | PHP_CONFIG=`which php-config` |
| 339 | PHPIZE=`which phpize` |
| 340 | ln -sfn "/usr/local/php-${VERSION}-bc/bin/php" $PHP |
| 341 | ln -sfn "/usr/local/php-${VERSION}-bc/bin/php-config" $PHP_CONFIG |
| 342 | ln -sfn "/usr/local/php-${VERSION}-bc/bin/phpize" $PHPIZE |
Paul Yang | 46ae90d | 2016-12-08 11:16:49 -0800 | [diff] [blame] | 343 | generate_php_test_proto |
Paul Yang | 51c5ff8 | 2016-10-25 17:27:05 -0700 | [diff] [blame] | 344 | } |
| 345 | |
Bo Yang | fd332d1 | 2016-09-30 00:07:47 +0000 | [diff] [blame] | 346 | build_php5.5() { |
Paul Yang | 190b527 | 2017-04-19 16:23:51 -0700 | [diff] [blame] | 347 | use_php 5.5 |
Paul Yang | dd8d5f5 | 2017-03-08 14:31:34 -0800 | [diff] [blame] | 348 | |
Paul Yang | e3e38b8 | 2016-12-08 14:39:20 -0800 | [diff] [blame] | 349 | pushd php |
Bo Yang | fd332d1 | 2016-09-30 00:07:47 +0000 | [diff] [blame] | 350 | rm -rf vendor |
| 351 | cp -r /usr/local/vendor-5.5 vendor |
Paul Yang | 190b527 | 2017-04-19 16:23:51 -0700 | [diff] [blame] | 352 | wget https://phar.phpunit.de/phpunit-4.8.0.phar -O /usr/bin/phpunit |
| 353 | phpunit |
Paul Yang | e3e38b8 | 2016-12-08 14:39:20 -0800 | [diff] [blame] | 354 | popd |
Paul Yang | 3975664 | 2017-02-01 12:47:58 -0800 | [diff] [blame] | 355 | pushd conformance |
Paul Yang | ecca6ea | 2017-06-30 12:14:09 -0700 | [diff] [blame] | 356 | make test_php |
Paul Yang | 3975664 | 2017-02-01 12:47:58 -0800 | [diff] [blame] | 357 | popd |
Bo Yang | fd332d1 | 2016-09-30 00:07:47 +0000 | [diff] [blame] | 358 | } |
| 359 | |
Bo Yang | 34cdaf4 | 2016-10-03 21:59:58 +0000 | [diff] [blame] | 360 | build_php5.5_c() { |
Paul Yang | 190b527 | 2017-04-19 16:23:51 -0700 | [diff] [blame] | 361 | use_php 5.5 |
| 362 | wget https://phar.phpunit.de/phpunit-4.8.0.phar -O /usr/bin/phpunit |
Paul Yang | ecca6ea | 2017-06-30 12:14:09 -0700 | [diff] [blame] | 363 | pushd php/tests |
Paul Yang | 51293f3 | 2018-01-25 11:31:05 -0800 | [diff] [blame] | 364 | /bin/bash ./test.sh 5.5 |
Paul Yang | 3975664 | 2017-02-01 12:47:58 -0800 | [diff] [blame] | 365 | popd |
Paul Yang | ecca6ea | 2017-06-30 12:14:09 -0700 | [diff] [blame] | 366 | # TODO(teboring): Add it back |
| 367 | # pushd conformance |
| 368 | # make test_php_c |
| 369 | # popd |
Bo Yang | 34cdaf4 | 2016-10-03 21:59:58 +0000 | [diff] [blame] | 370 | } |
Bo Yang | 34cdaf4 | 2016-10-03 21:59:58 +0000 | [diff] [blame] | 371 | |
Bo Yang | c96dd66 | 2016-10-04 17:32:08 +0000 | [diff] [blame] | 372 | build_php5.5_zts_c() { |
| 373 | use_php_zts 5.5 |
Paul Yang | 190b527 | 2017-04-19 16:23:51 -0700 | [diff] [blame] | 374 | wget https://phar.phpunit.de/phpunit-4.8.0.phar -O /usr/bin/phpunit |
Paul Yang | 51293f3 | 2018-01-25 11:31:05 -0800 | [diff] [blame] | 375 | cd php/tests && /bin/bash ./test.sh 5.5-zts && cd ../.. |
Paul Yang | ecca6ea | 2017-06-30 12:14:09 -0700 | [diff] [blame] | 376 | # TODO(teboring): Add it back |
| 377 | # pushd conformance |
| 378 | # make test_php_zts_c |
| 379 | # popd |
Paul Yang | df83907 | 2016-11-10 11:20:50 -0800 | [diff] [blame] | 380 | } |
| 381 | |
Bo Yang | fd332d1 | 2016-09-30 00:07:47 +0000 | [diff] [blame] | 382 | build_php5.6() { |
Bo Yang | c8bd36e | 2016-09-30 19:07:33 +0000 | [diff] [blame] | 383 | use_php 5.6 |
Paul Yang | e3e38b8 | 2016-12-08 14:39:20 -0800 | [diff] [blame] | 384 | pushd php |
Bo Yang | fd332d1 | 2016-09-30 00:07:47 +0000 | [diff] [blame] | 385 | rm -rf vendor |
| 386 | cp -r /usr/local/vendor-5.6 vendor |
Paul Yang | 190b527 | 2017-04-19 16:23:51 -0700 | [diff] [blame] | 387 | wget https://phar.phpunit.de/phpunit-5.7.0.phar -O /usr/bin/phpunit |
| 388 | phpunit |
Paul Yang | e3e38b8 | 2016-12-08 14:39:20 -0800 | [diff] [blame] | 389 | popd |
Paul Yang | 3975664 | 2017-02-01 12:47:58 -0800 | [diff] [blame] | 390 | pushd conformance |
Paul Yang | ecca6ea | 2017-06-30 12:14:09 -0700 | [diff] [blame] | 391 | make test_php |
Paul Yang | 3975664 | 2017-02-01 12:47:58 -0800 | [diff] [blame] | 392 | popd |
Bo Yang | fd332d1 | 2016-09-30 00:07:47 +0000 | [diff] [blame] | 393 | } |
| 394 | |
Bo Yang | 34cdaf4 | 2016-10-03 21:59:58 +0000 | [diff] [blame] | 395 | build_php5.6_c() { |
| 396 | use_php 5.6 |
Paul Yang | 190b527 | 2017-04-19 16:23:51 -0700 | [diff] [blame] | 397 | wget https://phar.phpunit.de/phpunit-5.7.0.phar -O /usr/bin/phpunit |
Paul Yang | 51293f3 | 2018-01-25 11:31:05 -0800 | [diff] [blame] | 398 | cd php/tests && /bin/bash ./test.sh 5.6 && cd ../.. |
Paul Yang | ecca6ea | 2017-06-30 12:14:09 -0700 | [diff] [blame] | 399 | # TODO(teboring): Add it back |
| 400 | # pushd conformance |
Paul Yang | 190b527 | 2017-04-19 16:23:51 -0700 | [diff] [blame] | 401 | # make test_php_c |
Paul Yang | ecca6ea | 2017-06-30 12:14:09 -0700 | [diff] [blame] | 402 | # popd |
Paul Yang | 190b527 | 2017-04-19 16:23:51 -0700 | [diff] [blame] | 403 | } |
| 404 | |
| 405 | build_php5.6_zts_c() { |
| 406 | use_php_zts 5.6 |
| 407 | wget https://phar.phpunit.de/phpunit-5.7.0.phar -O /usr/bin/phpunit |
Paul Yang | 51293f3 | 2018-01-25 11:31:05 -0800 | [diff] [blame] | 408 | cd php/tests && /bin/bash ./test.sh 5.6-zts && cd ../.. |
Paul Yang | ecca6ea | 2017-06-30 12:14:09 -0700 | [diff] [blame] | 409 | # TODO(teboring): Add it back |
| 410 | # pushd conformance |
| 411 | # make test_php_zts_c |
| 412 | # popd |
Bo Yang | fd332d1 | 2016-09-30 00:07:47 +0000 | [diff] [blame] | 413 | } |
| 414 | |
Bo Yang | 63448e6 | 2016-10-05 18:28:13 -0700 | [diff] [blame] | 415 | build_php5.6_mac() { |
Paul Yang | 46ae90d | 2016-12-08 11:16:49 -0800 | [diff] [blame] | 416 | generate_php_test_proto |
Bo Yang | 63448e6 | 2016-10-05 18:28:13 -0700 | [diff] [blame] | 417 | # Install PHP |
| 418 | curl -s https://php-osx.liip.ch/install.sh | bash -s 5.6 |
Paul Yang | 1f2dbc8 | 2016-11-08 11:38:34 -0800 | [diff] [blame] | 419 | PHP_FOLDER=`find /usr/local -type d -name "php5-5.6*"` # The folder name may change upon time |
| 420 | export PATH="$PHP_FOLDER/bin:$PATH" |
Bo Yang | 63448e6 | 2016-10-05 18:28:13 -0700 | [diff] [blame] | 421 | |
| 422 | # Install phpunit |
Paul Yang | c002743 | 2017-02-07 10:55:48 -0800 | [diff] [blame] | 423 | curl https://phar.phpunit.de/phpunit-5.6.10.phar -L -o phpunit.phar |
Bo Yang | 63448e6 | 2016-10-05 18:28:13 -0700 | [diff] [blame] | 424 | chmod +x phpunit.phar |
| 425 | sudo mv phpunit.phar /usr/local/bin/phpunit |
| 426 | |
| 427 | # Install valgrind |
| 428 | echo "#! /bin/bash" > valgrind |
| 429 | chmod ug+x valgrind |
| 430 | sudo mv valgrind /usr/local/bin/valgrind |
| 431 | |
| 432 | # Test |
| 433 | cd php/tests && /bin/bash ./test.sh && cd ../.. |
Paul Yang | ecca6ea | 2017-06-30 12:14:09 -0700 | [diff] [blame] | 434 | # TODO(teboring): Add it back |
| 435 | # pushd conformance |
Paul Yang | 190b527 | 2017-04-19 16:23:51 -0700 | [diff] [blame] | 436 | # make test_php_c |
Paul Yang | ecca6ea | 2017-06-30 12:14:09 -0700 | [diff] [blame] | 437 | # popd |
Bo Yang | 63448e6 | 2016-10-05 18:28:13 -0700 | [diff] [blame] | 438 | } |
| 439 | |
Bo Yang | fd332d1 | 2016-09-30 00:07:47 +0000 | [diff] [blame] | 440 | build_php7.0() { |
Bo Yang | c8bd36e | 2016-09-30 19:07:33 +0000 | [diff] [blame] | 441 | use_php 7.0 |
Paul Yang | e3e38b8 | 2016-12-08 14:39:20 -0800 | [diff] [blame] | 442 | pushd php |
Bo Yang | fd332d1 | 2016-09-30 00:07:47 +0000 | [diff] [blame] | 443 | rm -rf vendor |
| 444 | cp -r /usr/local/vendor-7.0 vendor |
Paul Yang | 190b527 | 2017-04-19 16:23:51 -0700 | [diff] [blame] | 445 | wget https://phar.phpunit.de/phpunit-5.6.0.phar -O /usr/bin/phpunit |
| 446 | phpunit |
Paul Yang | e3e38b8 | 2016-12-08 14:39:20 -0800 | [diff] [blame] | 447 | popd |
Paul Yang | 3975664 | 2017-02-01 12:47:58 -0800 | [diff] [blame] | 448 | pushd conformance |
Paul Yang | ecca6ea | 2017-06-30 12:14:09 -0700 | [diff] [blame] | 449 | make test_php |
Paul Yang | 3975664 | 2017-02-01 12:47:58 -0800 | [diff] [blame] | 450 | popd |
Bo Yang | fd332d1 | 2016-09-30 00:07:47 +0000 | [diff] [blame] | 451 | } |
| 452 | |
Bo Yang | 34cdaf4 | 2016-10-03 21:59:58 +0000 | [diff] [blame] | 453 | build_php7.0_c() { |
| 454 | use_php 7.0 |
Paul Yang | 190b527 | 2017-04-19 16:23:51 -0700 | [diff] [blame] | 455 | wget https://phar.phpunit.de/phpunit-5.6.0.phar -O /usr/bin/phpunit |
Paul Yang | 51293f3 | 2018-01-25 11:31:05 -0800 | [diff] [blame] | 456 | cd php/tests && /bin/bash ./test.sh 7.0 && cd ../.. |
Paul Yang | ecca6ea | 2017-06-30 12:14:09 -0700 | [diff] [blame] | 457 | # TODO(teboring): Add it back |
| 458 | # pushd conformance |
Paul Yang | 190b527 | 2017-04-19 16:23:51 -0700 | [diff] [blame] | 459 | # make test_php_c |
Paul Yang | ecca6ea | 2017-06-30 12:14:09 -0700 | [diff] [blame] | 460 | # popd |
Paul Yang | 190b527 | 2017-04-19 16:23:51 -0700 | [diff] [blame] | 461 | } |
| 462 | |
| 463 | build_php7.0_zts_c() { |
| 464 | use_php_zts 7.0 |
| 465 | wget https://phar.phpunit.de/phpunit-5.6.0.phar -O /usr/bin/phpunit |
Paul Yang | 51293f3 | 2018-01-25 11:31:05 -0800 | [diff] [blame] | 466 | cd php/tests && /bin/bash ./test.sh 7.0-zts && cd ../.. |
Paul Yang | ecca6ea | 2017-06-30 12:14:09 -0700 | [diff] [blame] | 467 | # TODO(teboring): Add it back. |
| 468 | # pushd conformance |
| 469 | # make test_php_zts_c |
| 470 | # popd |
Paul Yang | 190b527 | 2017-04-19 16:23:51 -0700 | [diff] [blame] | 471 | } |
| 472 | |
| 473 | build_php7.0_mac() { |
| 474 | generate_php_test_proto |
| 475 | # Install PHP |
| 476 | curl -s https://php-osx.liip.ch/install.sh | bash -s 7.0 |
| 477 | PHP_FOLDER=`find /usr/local -type d -name "php7-7.0*"` # The folder name may change upon time |
| 478 | export PATH="$PHP_FOLDER/bin:$PATH" |
| 479 | |
| 480 | # Install phpunit |
| 481 | curl https://phar.phpunit.de/phpunit-5.6.0.phar -L -o phpunit.phar |
| 482 | chmod +x phpunit.phar |
| 483 | sudo mv phpunit.phar /usr/local/bin/phpunit |
| 484 | |
| 485 | # Install valgrind |
| 486 | echo "#! /bin/bash" > valgrind |
| 487 | chmod ug+x valgrind |
| 488 | sudo mv valgrind /usr/local/bin/valgrind |
| 489 | |
| 490 | # Test |
| 491 | cd php/tests && /bin/bash ./test.sh && cd ../.. |
Paul Yang | ecca6ea | 2017-06-30 12:14:09 -0700 | [diff] [blame] | 492 | # TODO(teboring): Add it back |
| 493 | # pushd conformance |
Paul Yang | 190b527 | 2017-04-19 16:23:51 -0700 | [diff] [blame] | 494 | # make test_php_c |
Paul Yang | ecca6ea | 2017-06-30 12:14:09 -0700 | [diff] [blame] | 495 | # popd |
Bo Yang | 34cdaf4 | 2016-10-03 21:59:58 +0000 | [diff] [blame] | 496 | } |
| 497 | |
Paul Yang | 25abd7b | 2017-05-05 11:14:11 -0700 | [diff] [blame] | 498 | build_php_compatibility() { |
| 499 | internal_build_cpp |
| 500 | php/tests/compatibility_test.sh |
| 501 | } |
| 502 | |
Paul Yang | 2231931 | 2017-05-10 15:59:59 -0700 | [diff] [blame] | 503 | build_php7.1() { |
| 504 | use_php 7.1 |
| 505 | pushd php |
| 506 | rm -rf vendor |
| 507 | cp -r /usr/local/vendor-7.1 vendor |
| 508 | wget https://phar.phpunit.de/phpunit-5.6.0.phar -O /usr/bin/phpunit |
| 509 | phpunit |
| 510 | popd |
| 511 | pushd conformance |
Paul Yang | bdcbcab | 2018-07-26 13:52:22 -0700 | [diff] [blame] | 512 | make test_php |
Paul Yang | 2231931 | 2017-05-10 15:59:59 -0700 | [diff] [blame] | 513 | popd |
| 514 | } |
| 515 | |
| 516 | build_php7.1_c() { |
Paul Yang | bdcbcab | 2018-07-26 13:52:22 -0700 | [diff] [blame] | 517 | ENABLE_CONFORMANCE_TEST=$1 |
Paul Yang | 2231931 | 2017-05-10 15:59:59 -0700 | [diff] [blame] | 518 | use_php 7.1 |
| 519 | wget https://phar.phpunit.de/phpunit-5.6.0.phar -O /usr/bin/phpunit |
Paul Yang | 51293f3 | 2018-01-25 11:31:05 -0800 | [diff] [blame] | 520 | cd php/tests && /bin/bash ./test.sh 7.1 && cd ../.. |
Paul Yang | bdcbcab | 2018-07-26 13:52:22 -0700 | [diff] [blame] | 521 | if [ "$ENABLE_CONFORMANCE_TEST" = "true" ] |
| 522 | then |
| 523 | pushd conformance |
| 524 | make test_php_c |
| 525 | popd |
| 526 | fi |
Paul Yang | 2231931 | 2017-05-10 15:59:59 -0700 | [diff] [blame] | 527 | } |
| 528 | |
| 529 | build_php7.1_zts_c() { |
| 530 | use_php_zts 7.1 |
| 531 | wget https://phar.phpunit.de/phpunit-5.6.0.phar -O /usr/bin/phpunit |
Paul Yang | 51293f3 | 2018-01-25 11:31:05 -0800 | [diff] [blame] | 532 | cd php/tests && /bin/bash ./test.sh 7.1-zts && cd ../.. |
Paul Yang | 2231931 | 2017-05-10 15:59:59 -0700 | [diff] [blame] | 533 | pushd conformance |
| 534 | # make test_php_c |
| 535 | popd |
| 536 | } |
| 537 | |
Paul Yang | 25abd7b | 2017-05-05 11:14:11 -0700 | [diff] [blame] | 538 | build_php_all_32() { |
Bo Yang | c8bd36e | 2016-09-30 19:07:33 +0000 | [diff] [blame] | 539 | build_php5.5 |
| 540 | build_php5.6 |
| 541 | build_php7.0 |
Paul Yang | 2231931 | 2017-05-10 15:59:59 -0700 | [diff] [blame] | 542 | build_php7.1 |
Bo Yang | c8bd36e | 2016-09-30 19:07:33 +0000 | [diff] [blame] | 543 | build_php5.5_c |
| 544 | build_php5.6_c |
Paul Yang | 190b527 | 2017-04-19 16:23:51 -0700 | [diff] [blame] | 545 | build_php7.0_c |
Paul Yang | bdcbcab | 2018-07-26 13:52:22 -0700 | [diff] [blame] | 546 | build_php7.1_c $1 |
Bo Yang | c96dd66 | 2016-10-04 17:32:08 +0000 | [diff] [blame] | 547 | build_php5.5_zts_c |
Paul Yang | 190b527 | 2017-04-19 16:23:51 -0700 | [diff] [blame] | 548 | build_php5.6_zts_c |
| 549 | build_php7.0_zts_c |
Paul Yang | 2231931 | 2017-05-10 15:59:59 -0700 | [diff] [blame] | 550 | build_php7.1_zts_c |
Paul Yang | 51c5ff8 | 2016-10-25 17:27:05 -0700 | [diff] [blame] | 551 | } |
| 552 | |
Paul Yang | 25abd7b | 2017-05-05 11:14:11 -0700 | [diff] [blame] | 553 | build_php_all() { |
Paul Yang | bdcbcab | 2018-07-26 13:52:22 -0700 | [diff] [blame] | 554 | build_php_all_32 true |
Paul Yang | 25abd7b | 2017-05-05 11:14:11 -0700 | [diff] [blame] | 555 | build_php_compatibility |
| 556 | } |
| 557 | |
Josh Haberman | 738393b | 2016-02-18 20:10:23 -0800 | [diff] [blame] | 558 | # -------- main -------- |
| 559 | |
Josh Haberman | 738393b | 2016-02-18 20:10:23 -0800 | [diff] [blame] | 560 | if [ "$#" -ne 1 ]; then |
| 561 | echo " |
| 562 | Usage: $0 { cpp | |
Feng Xiao | a4f68b1 | 2016-07-19 17:20:31 -0700 | [diff] [blame] | 563 | cpp_distcheck | |
Josh Haberman | 738393b | 2016-02-18 20:10:23 -0800 | [diff] [blame] | 564 | csharp | |
Josh Haberman | 738393b | 2016-02-18 20:10:23 -0800 | [diff] [blame] | 565 | java_jdk7 | |
| 566 | java_oracle7 | |
Feng Xiao | baa4023 | 2016-07-29 14:11:21 -0700 | [diff] [blame] | 567 | java_compatibility | |
Josh Haberman | 738393b | 2016-02-18 20:10:23 -0800 | [diff] [blame] | 568 | objectivec_ios | |
Thomas Van Lenten | 368a2f4 | 2016-05-24 11:27:33 -0400 | [diff] [blame] | 569 | objectivec_ios_debug | |
| 570 | objectivec_ios_release | |
Josh Haberman | 738393b | 2016-02-18 20:10:23 -0800 | [diff] [blame] | 571 | objectivec_osx | |
Sergio Campamá | f0c1492 | 2016-06-14 11:26:01 -0700 | [diff] [blame] | 572 | objectivec_cocoapods_integration | |
Josh Haberman | 738393b | 2016-02-18 20:10:23 -0800 | [diff] [blame] | 573 | python | |
| 574 | python_cpp | |
Jie Luo | ea51149 | 2017-01-23 15:11:00 -0800 | [diff] [blame] | 575 | python_compatibility | |
Josh Haberman | ffc8118 | 2016-02-22 15:39:29 -0800 | [diff] [blame] | 576 | ruby21 | |
| 577 | ruby22 | |
Feng Xiao | 20fbb35 | 2016-07-21 18:04:56 -0700 | [diff] [blame] | 578 | jruby | |
Bo Yang | fd332d1 | 2016-09-30 00:07:47 +0000 | [diff] [blame] | 579 | ruby_all | |
| 580 | php5.5 | |
| 581 | php5.5_c | |
| 582 | php5.6 | |
| 583 | php5.6_c | |
| 584 | php7.0 | |
Bo Yang | c8bd36e | 2016-09-30 19:07:33 +0000 | [diff] [blame] | 585 | php7.0_c | |
Paul Yang | 25abd7b | 2017-05-05 11:14:11 -0700 | [diff] [blame] | 586 | php_compatibility | |
Paul Yang | 2231931 | 2017-05-10 15:59:59 -0700 | [diff] [blame] | 587 | php7.1 | |
| 588 | php7.1_c | |
Bo Yang | c8bd36e | 2016-09-30 19:07:33 +0000 | [diff] [blame] | 589 | php_all) |
Josh Haberman | 738393b | 2016-02-18 20:10:23 -0800 | [diff] [blame] | 590 | " |
| 591 | exit 1 |
| 592 | fi |
| 593 | |
| 594 | set -e # exit immediately on error |
| 595 | set -x # display all commands |
Feng Xiao | 9de4e64 | 2018-07-13 16:55:32 -0700 | [diff] [blame] | 596 | cd $(dirname $0) |
Josh Haberman | 738393b | 2016-02-18 20:10:23 -0800 | [diff] [blame] | 597 | eval "build_$1" |