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 | # |
Elliotte Rusty Harold | 1927520 | 2022-04-28 15:55:28 +0000 | [diff] [blame] | 3 | # Build and run tests for the protobuf project. We use this script to run |
Feng Xiao | 9de4e64 | 2018-07-13 16:55:32 -0700 | [diff] [blame] | 4 | # tests on kokoro (Ubuntu and MacOS). It can run locally as well but you |
Elliotte Rusty Harold | 1927520 | 2022-04-28 15:55:28 +0000 | [diff] [blame] | 5 | # 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 | internal_build_cpp() { |
Josh Haberman | 738393b | 2016-02-18 20:10:23 -0800 | [diff] [blame] | 8 | if [ -f src/protoc ]; then |
| 9 | # Already built. |
| 10 | return |
| 11 | fi |
| 12 | |
Carlos O'Ryan | 3c5442a | 2018-03-26 16:54:32 -0400 | [diff] [blame] | 13 | # Initialize any submodules. |
| 14 | git submodule update --init --recursive |
| 15 | |
Chris Fallin | 20e94b2 | 2015-05-13 16:43:48 -0700 | [diff] [blame] | 16 | ./autogen.sh |
Ben Wolsieffer | 56b40a8 | 2018-10-04 20:25:10 -0400 | [diff] [blame] | 17 | ./configure CXXFLAGS="-fPIC -std=c++11" # -fPIC is needed for python cpp test. |
| 18 | # See python/setup.py for more details |
Joshua Haberman | f5e8ee4 | 2019-03-06 12:04:17 -0800 | [diff] [blame] | 19 | make -j$(nproc) |
Josh Haberman | 181c7f2 | 2015-07-15 11:05:10 -0700 | [diff] [blame] | 20 | } |
| 21 | |
| 22 | build_cpp() { |
| 23 | internal_build_cpp |
Joshua Haberman | f5e8ee4 | 2019-03-06 12:04:17 -0800 | [diff] [blame] | 24 | make check -j$(nproc) || (cat src/test-suite.log; false) |
Bo Yang | fd332d1 | 2016-09-30 00:07:47 +0000 | [diff] [blame] | 25 | cd conformance && make test_cpp && cd .. |
Chris Fallin | 20e94b2 | 2015-05-13 16:43:48 -0700 | [diff] [blame] | 26 | } |
| 27 | |
Hao Nguyen | 4f8a635 | 2019-01-23 10:02:51 -0800 | [diff] [blame] | 28 | build_cpp_tcmalloc() { |
| 29 | internal_build_cpp |
| 30 | ./configure LIBS=-ltcmalloc && make clean && make \ |
| 31 | PTHREAD_CFLAGS='-pthread -DGOOGLE_PROTOBUF_HEAP_CHECK_DRACONIAN' \ |
| 32 | check |
| 33 | cd src |
Adam Cozzette | d135f07 | 2019-01-25 10:28:52 -0800 | [diff] [blame] | 34 | PPROF_PATH=/usr/bin/google-pprof HEAPCHECK=strict ./protobuf-test |
Hao Nguyen | 4f8a635 | 2019-01-23 10:02:51 -0800 | [diff] [blame] | 35 | } |
| 36 | |
Chris Fallin | 20e94b2 | 2015-05-13 16:43:48 -0700 | [diff] [blame] | 37 | build_cpp_distcheck() { |
Adam Cozzette | 45aba80 | 2019-03-11 14:39:49 -0700 | [diff] [blame] | 38 | grep -q -- "-Og" src/Makefile.am && |
| 39 | echo "The -Og flag is incompatible with Clang versions older than 4.0." && |
| 40 | exit 1 |
| 41 | |
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. |
Adam Cozzette | 860f8ad | 2022-04-28 12:08:26 -0700 | [diff] [blame] | 49 | git ls-files | grep "^\(java\|python\|objectivec\|csharp\|ruby\|php\|cmake\|examples\|src/google/protobuf/.*\.proto\)" |\ |
Derek Perez | d1b2eff | 2021-04-20 09:36:06 -0700 | [diff] [blame] | 50 | grep -v ".gitignore" | grep -v "java/lite/proguard.pgcfg" |\ |
David L. Jones | f130827 | 2020-03-06 16:37:15 -0800 | [diff] [blame] | 51 | grep -v "python/compatibility_tests" | grep -v "python/docs" | grep -v "python/.repo-metadata.json" |\ |
David L. Jones | ff06e23 | 2020-08-31 10:40:57 -0700 | [diff] [blame] | 52 | grep -v "python/protobuf_distutils" | grep -v "csharp/compatibility_tests" > dist.lst |
Feng Xiao | a4f68b1 | 2016-07-19 17:20:31 -0700 | [diff] [blame] | 53 | # Unzip the dist tar file. |
| 54 | DIST=`ls *.tar.gz` |
| 55 | tar -xf $DIST |
| 56 | cd ${DIST//.tar.gz} |
| 57 | # Check if every file exists in the dist tar file. |
| 58 | FILES_MISSING="" |
| 59 | for FILE in $(<../dist.lst); do |
Feng Xiao | acd5b05 | 2018-08-09 21:21:01 -0700 | [diff] [blame] | 60 | [ -f "$FILE" ] || { |
Feng Xiao | a4f68b1 | 2016-07-19 17:20:31 -0700 | [diff] [blame] | 61 | echo "$FILE is not found!" |
| 62 | FILES_MISSING="$FILE $FILES_MISSING" |
Feng Xiao | acd5b05 | 2018-08-09 21:21:01 -0700 | [diff] [blame] | 63 | } |
Feng Xiao | a4f68b1 | 2016-07-19 17:20:31 -0700 | [diff] [blame] | 64 | done |
| 65 | cd .. |
| 66 | if [ ! -z "$FILES_MISSING" ]; then |
| 67 | echo "Missing files in EXTRA_DIST: $FILES_MISSING" |
| 68 | exit 1 |
| 69 | fi |
| 70 | |
| 71 | # Do the regular dist-check for C++. |
Joshua Haberman | f5e8ee4 | 2019-03-06 12:04:17 -0800 | [diff] [blame] | 72 | make distcheck -j$(nproc) |
Chris Fallin | 20e94b2 | 2015-05-13 16:43:48 -0700 | [diff] [blame] | 73 | } |
| 74 | |
Hao Nguyen | f85c823 | 2019-03-07 14:34:28 -0800 | [diff] [blame] | 75 | build_dist_install() { |
Adam Cozzette | 0e7a35f | 2021-09-29 13:41:33 -0700 | [diff] [blame] | 76 | # Create a symlink pointing to python2 and put it at the beginning of $PATH. |
| 77 | # This is necessary because the googletest build system involves a Python |
| 78 | # script that is not compatible with Python 3. More recent googletest |
| 79 | # versions have fixed this, but they have also removed the autotools build |
| 80 | # system support that we rely on. This is a temporary workaround to keep the |
| 81 | # googletest build working when the default python binary is Python 3. |
| 82 | mkdir tmp || true |
| 83 | pushd tmp |
| 84 | ln -s /usr/bin/python2 ./python |
| 85 | popd |
| 86 | PATH=$PWD/tmp:$PATH |
| 87 | |
Hao Nguyen | f85c823 | 2019-03-07 14:34:28 -0800 | [diff] [blame] | 88 | # Initialize any submodules. |
| 89 | git submodule update --init --recursive |
| 90 | ./autogen.sh |
| 91 | ./configure |
| 92 | make dist |
| 93 | |
| 94 | # Unzip the dist tar file and install it. |
| 95 | DIST=`ls *.tar.gz` |
| 96 | tar -xf $DIST |
| 97 | pushd ${DIST//.tar.gz} |
| 98 | ./configure && make check -j4 && make install |
| 99 | |
| 100 | export LD_LIBRARY_PATH=/usr/local/lib |
| 101 | |
| 102 | # Try to install Java |
| 103 | pushd java |
Joshua Haberman | 301d315 | 2022-02-08 18:31:50 -0800 | [diff] [blame] | 104 | use_java jdk11 |
Hao Nguyen | f85c823 | 2019-03-07 14:34:28 -0800 | [diff] [blame] | 105 | $MVN install |
| 106 | popd |
| 107 | |
| 108 | # Try to install Python |
Joshua Haberman | 301d315 | 2022-02-08 18:31:50 -0800 | [diff] [blame] | 109 | python3 -m venv venv |
Hao Nguyen | f85c823 | 2019-03-07 14:34:28 -0800 | [diff] [blame] | 110 | source venv/bin/activate |
| 111 | pushd python |
Adam Cozzette | 151e632 | 2021-09-23 15:08:32 -0700 | [diff] [blame] | 112 | python3 setup.py clean build sdist |
| 113 | pip3 install dist/protobuf-*.tar.gz |
Hao Nguyen | f85c823 | 2019-03-07 14:34:28 -0800 | [diff] [blame] | 114 | popd |
| 115 | deactivate |
| 116 | rm -rf python/venv |
| 117 | } |
| 118 | |
Jan Tattermusch | ddb36ef | 2015-05-18 17:34:02 -0700 | [diff] [blame] | 119 | build_csharp() { |
Jon Skeet | 9a9a66e | 2017-10-25 08:03:50 +0100 | [diff] [blame] | 120 | # Required for conformance tests and to regenerate protos. |
Jon Skeet | b6defa7 | 2015-08-04 10:01:40 +0100 | [diff] [blame] | 121 | internal_build_cpp |
Josh Haberman | ffc8118 | 2016-02-22 15:39:29 -0800 | [diff] [blame] | 122 | NUGET=/usr/local/bin/nuget.exe |
Jon Skeet | b6defa7 | 2015-08-04 10:01:40 +0100 | [diff] [blame] | 123 | |
Jan Tattermusch | 67fee07 | 2019-03-12 04:48:10 -0400 | [diff] [blame] | 124 | # Disable some unwanted dotnet options |
| 125 | export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true |
| 126 | export DOTNET_CLI_TELEMETRY_OPTOUT=true |
| 127 | |
| 128 | # TODO(jtattermusch): is this still needed with "first time experience" |
| 129 | # disabled? |
Jon Skeet | 10a8fb4 | 2016-07-14 22:01:47 +0100 | [diff] [blame] | 130 | # Perform "dotnet new" once to get the setup preprocessing out of the |
| 131 | # way. That spews a lot of output (including backspaces) into logs |
| 132 | # otherwise, and can cause problems. It doesn't matter if this step |
| 133 | # is performed multiple times; it's cheap after the first time anyway. |
Jon Skeet | f26e8c2 | 2017-05-04 08:51:46 +0100 | [diff] [blame] | 134 | # (It also doesn't matter if it's unnecessary, which it will be on some |
| 135 | # systems. It's necessary on Jenkins in order to avoid unprintable |
| 136 | # characters appearing in the JUnit output.) |
Jon Skeet | 10a8fb4 | 2016-07-14 22:01:47 +0100 | [diff] [blame] | 137 | mkdir dotnettmp |
| 138 | (cd dotnettmp; dotnet new > /dev/null) |
| 139 | rm -rf dotnettmp |
| 140 | |
Jon Skeet | 9a9a66e | 2017-10-25 08:03:50 +0100 | [diff] [blame] | 141 | # Check that the protos haven't broken C# codegen. |
| 142 | # TODO(jonskeet): Fail if regenerating creates any changes. |
| 143 | csharp/generate_protos.sh |
Brent Shaffer | 6737954 | 2018-05-23 16:43:30 -0700 | [diff] [blame] | 144 | |
Jan Tattermusch | ddb36ef | 2015-05-18 17:34:02 -0700 | [diff] [blame] | 145 | csharp/buildall.sh |
Josh Haberman | e891c29 | 2015-12-30 16:03:49 -0800 | [diff] [blame] | 146 | cd conformance && make test_csharp && cd .. |
Jie Luo | 7288689 | 2017-02-09 16:49:52 -0800 | [diff] [blame] | 147 | |
| 148 | # Run csharp compatibility test between 3.0.0 and the current version. |
| 149 | csharp/compatibility_tests/v3.0.0/test.sh 3.0.0 |
Jon Skeet | 9f597a4 | 2022-03-28 11:38:50 +0100 | [diff] [blame] | 150 | |
| 151 | # Regression test for https://github.com/protocolbuffers/protobuf/issues/9526 |
| 152 | # - all line endings in .proto and .cs (and .csproj) files should be LF. |
| 153 | if git ls-files --eol csharp | grep -E '\.cs|\.proto' | grep -v w/lf |
| 154 | then |
| 155 | echo "The files listed above have mixed or CRLF line endings; please change to LF." |
| 156 | exit 1 |
| 157 | fi |
Jan Tattermusch | ddb36ef | 2015-05-18 17:34:02 -0700 | [diff] [blame] | 158 | } |
| 159 | |
Tim Swast | 7e31c4d | 2015-11-20 15:32:53 -0800 | [diff] [blame] | 160 | build_golang() { |
| 161 | # Go build needs `protoc`. |
| 162 | internal_build_cpp |
| 163 | # Add protoc to the path so that the examples build finds it. |
| 164 | export PATH="`pwd`/src:$PATH" |
| 165 | |
Tim Swast | 7e31c4d | 2015-11-20 15:32:53 -0800 | [diff] [blame] | 166 | export GOPATH="$HOME/gocode" |
Feng Xiao | a0a17e2 | 2018-08-23 15:35:52 -0700 | [diff] [blame] | 167 | mkdir -p "$GOPATH/src/github.com/protocolbuffers" |
Joe Tsai | 654edd8 | 2020-05-12 13:02:09 -0700 | [diff] [blame] | 168 | mkdir -p "$GOPATH/src/github.com/golang" |
Feng Xiao | afe98de | 2018-08-22 11:55:30 -0700 | [diff] [blame] | 169 | rm -f "$GOPATH/src/github.com/protocolbuffers/protobuf" |
Joe Tsai | 654edd8 | 2020-05-12 13:02:09 -0700 | [diff] [blame] | 170 | rm -f "$GOPATH/src/github.com/golang/protobuf" |
Feng Xiao | afe98de | 2018-08-22 11:55:30 -0700 | [diff] [blame] | 171 | ln -s "`pwd`" "$GOPATH/src/github.com/protocolbuffers/protobuf" |
Tim Swast | 7e31c4d | 2015-11-20 15:32:53 -0800 | [diff] [blame] | 172 | export PATH="$GOPATH/bin:$PATH" |
Joe Tsai | 654edd8 | 2020-05-12 13:02:09 -0700 | [diff] [blame] | 173 | (cd $GOPATH/src/github.com/golang && git clone https://github.com/golang/protobuf.git && cd protobuf && git checkout v1.3.5) |
| 174 | go install github.com/golang/protobuf/protoc-gen-go |
Tim Swast | 7e31c4d | 2015-11-20 15:32:53 -0800 | [diff] [blame] | 175 | |
Feng Xiao | 8136ccb | 2017-09-12 12:00:20 -0700 | [diff] [blame] | 176 | cd examples && PROTO_PATH="-I../src -I." make gotest && cd .. |
Tim Swast | 7e31c4d | 2015-11-20 15:32:53 -0800 | [diff] [blame] | 177 | } |
| 178 | |
Chris Fallin | 20e94b2 | 2015-05-13 16:43:48 -0700 | [diff] [blame] | 179 | use_java() { |
Chris Fallin | 20e94b2 | 2015-05-13 16:43:48 -0700 | [diff] [blame] | 180 | version=$1 |
| 181 | case "$version" in |
Elliotte Rusty Harold | cc8ae4c | 2022-04-18 19:54:42 +0000 | [diff] [blame] | 182 | jdk17) |
| 183 | export PATH=/usr/lib/jvm/java-17-openjdk-amd64/bin:$PATH |
| 184 | export JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64 |
| 185 | ;; |
Joshua Haberman | 301d315 | 2022-02-08 18:31:50 -0800 | [diff] [blame] | 186 | jdk11) |
| 187 | export PATH=/usr/lib/jvm/java-11-openjdk-amd64/bin:$PATH |
| 188 | export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64 |
| 189 | ;; |
Tomo Suzuki | 7051725 | 2019-06-26 15:28:49 -0400 | [diff] [blame] | 190 | jdk8) |
| 191 | export PATH=/usr/lib/jvm/java-8-openjdk-amd64/bin:$PATH |
| 192 | export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64 |
| 193 | ;; |
Chris Fallin | 20e94b2 | 2015-05-13 16:43:48 -0700 | [diff] [blame] | 194 | jdk7) |
Chris Fallin | 20e94b2 | 2015-05-13 16:43:48 -0700 | [diff] [blame] | 195 | export PATH=/usr/lib/jvm/java-7-openjdk-amd64/bin:$PATH |
Feng Xiao | ad49ed7 | 2016-07-21 11:37:46 -0700 | [diff] [blame] | 196 | export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64 |
Chris Fallin | 20e94b2 | 2015-05-13 16:43:48 -0700 | [diff] [blame] | 197 | ;; |
| 198 | oracle7) |
Chris Fallin | 20e94b2 | 2015-05-13 16:43:48 -0700 | [diff] [blame] | 199 | export PATH=/usr/lib/jvm/java-7-oracle/bin:$PATH |
Feng Xiao | ad49ed7 | 2016-07-21 11:37:46 -0700 | [diff] [blame] | 200 | export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64 |
Chris Fallin | 20e94b2 | 2015-05-13 16:43:48 -0700 | [diff] [blame] | 201 | ;; |
| 202 | esac |
| 203 | |
Feng Xiao | 9de4e64 | 2018-07-13 16:55:32 -0700 | [diff] [blame] | 204 | MAVEN_LOCAL_REPOSITORY=/var/maven_local_repository |
Elliotte Rusty Harold | 5711cab | 2021-12-14 23:40:36 +0000 | [diff] [blame] | 205 | MVN="$MVN -e --quiet -Dhttps.protocols=TLSv1.2 -Dmaven.repo.local=$MAVEN_LOCAL_REPOSITORY" |
Josh Haberman | 1ee0fda | 2016-03-03 16:02:55 -0800 | [diff] [blame] | 206 | |
Chris Fallin | 20e94b2 | 2015-05-13 16:43:48 -0700 | [diff] [blame] | 207 | which java |
| 208 | java -version |
Feng Xiao | ad49ed7 | 2016-07-21 11:37:46 -0700 | [diff] [blame] | 209 | $MVN -version |
Chris Fallin | 20e94b2 | 2015-05-13 16:43:48 -0700 | [diff] [blame] | 210 | } |
| 211 | |
Brian Wignall | a104dff | 2020-01-08 13:18:20 -0500 | [diff] [blame] | 212 | # --batch-mode suppresses download progress output that spams the logs. |
Josh Haberman | b28b3f6 | 2016-02-20 12:17:10 -0800 | [diff] [blame] | 213 | MVN="mvn --batch-mode" |
Josh Haberman | d08c39c | 2016-02-20 12:03:39 -0800 | [diff] [blame] | 214 | |
Jason Lunn | ddd7f46 | 2021-10-06 13:06:27 -0400 | [diff] [blame] | 215 | internal_build_java() { |
Josh Haberman | 2f3f1de | 2016-03-01 15:37:17 -0800 | [diff] [blame] | 216 | version=$1 |
| 217 | dir=java_$version |
Chris Fallin | 20e94b2 | 2015-05-13 16:43:48 -0700 | [diff] [blame] | 218 | # Java build needs `protoc`. |
Josh Haberman | 181c7f2 | 2015-07-15 11:05:10 -0700 | [diff] [blame] | 219 | internal_build_cpp |
Josh Haberman | 2f3f1de | 2016-03-01 15:37:17 -0800 | [diff] [blame] | 220 | cp -r java $dir |
Adam Cozzette | 5a9367a | 2021-05-11 12:07:45 -0700 | [diff] [blame] | 221 | cd $dir && $MVN clean |
Jason Lunn | ddd7f46 | 2021-10-06 13:06:27 -0400 | [diff] [blame] | 222 | # Skip tests here - callers will decide what tests they want to run |
Adam Cozzette | 388df00 | 2022-03-04 17:03:36 +0000 | [diff] [blame] | 223 | $MVN install -Dmaven.test.skip=true |
Jason Lunn | ddd7f46 | 2021-10-06 13:06:27 -0400 | [diff] [blame] | 224 | } |
| 225 | |
| 226 | build_java() { |
Jason Lunn | 2ed8173 | 2021-10-06 16:40:09 -0400 | [diff] [blame] | 227 | version=$1 |
| 228 | internal_build_java $version |
Adam Cozzette | 5a9367a | 2021-05-11 12:07:45 -0700 | [diff] [blame] | 229 | # Skip the Kotlin tests on Oracle 7 |
| 230 | if [ "$version" == "oracle7" ]; then |
| 231 | $MVN test -pl bom,lite,core,util |
| 232 | else |
| 233 | $MVN test |
| 234 | fi |
Feng Xiao | 9e5fb55 | 2015-12-21 11:08:18 -0800 | [diff] [blame] | 235 | cd ../.. |
| 236 | } |
| 237 | |
Josh Haberman | 2f3f1de | 2016-03-01 15:37:17 -0800 | [diff] [blame] | 238 | # The conformance tests are hard-coded to work with the $ROOT/java directory. |
| 239 | # 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] | 240 | build_java_with_conformance_tests() { |
| 241 | # Java build needs `protoc`. |
| 242 | internal_build_cpp |
Tomo Suzuki | ca25bad | 2019-10-22 13:42:35 -0400 | [diff] [blame] | 243 | # This local installation avoids the problem caused by a new version not yet in Maven Central |
| 244 | cd java/bom && $MVN install |
| 245 | cd ../.. |
Deanna Garcia | 41e89c7 | 2021-06-24 18:21:49 +0000 | [diff] [blame] | 246 | cd java/core && $MVN test && $MVN install |
| 247 | cd ../lite && $MVN test && $MVN install |
Deanna Garcia | 1e8457f | 2021-06-24 22:06:55 +0000 | [diff] [blame] | 248 | cd ../util && $MVN test && $MVN install && $MVN package assembly:single |
Deanna Garcia | 41e89c7 | 2021-06-24 18:21:49 +0000 | [diff] [blame] | 249 | if [ "$version" == "jdk8" ]; then |
| 250 | cd ../kotlin && $MVN test && $MVN install |
| 251 | cd ../kotlin-lite && $MVN test && $MVN install |
| 252 | fi |
Feng Xiao | af81dcf | 2015-12-21 03:25:59 -0800 | [diff] [blame] | 253 | cd ../.. |
Chris Fallin | 20e94b2 | 2015-05-13 16:43:48 -0700 | [diff] [blame] | 254 | cd conformance && make test_java && cd .. |
| 255 | } |
| 256 | |
Chris Fallin | 20e94b2 | 2015-05-13 16:43:48 -0700 | [diff] [blame] | 257 | build_java_jdk7() { |
| 258 | use_java jdk7 |
Feng Xiao | 9e5fb55 | 2015-12-21 11:08:18 -0800 | [diff] [blame] | 259 | build_java_with_conformance_tests |
Chris Fallin | 20e94b2 | 2015-05-13 16:43:48 -0700 | [diff] [blame] | 260 | } |
Elliotte Rusty Harold | bbc4f8d | 2022-04-18 16:47:56 +0000 | [diff] [blame] | 261 | |
Chris Fallin | 20e94b2 | 2015-05-13 16:43:48 -0700 | [diff] [blame] | 262 | build_java_oracle7() { |
| 263 | use_java oracle7 |
Josh Haberman | 2f3f1de | 2016-03-01 15:37:17 -0800 | [diff] [blame] | 264 | build_java oracle7 |
Chris Fallin | 20e94b2 | 2015-05-13 16:43:48 -0700 | [diff] [blame] | 265 | } |
Elliotte Rusty Harold | bbc4f8d | 2022-04-18 16:47:56 +0000 | [diff] [blame] | 266 | |
| 267 | build_java_jdk8() { |
| 268 | use_java jdk8 |
| 269 | build_java_with_conformance_tests |
| 270 | } |
| 271 | |
David L. Jones | 5283ef4 | 2022-04-22 16:44:09 -0700 | [diff] [blame] | 272 | build_java_jdk11() { |
| 273 | use_java jdk11 |
Elliotte Rusty Harold | 868ab14 | 2022-04-28 11:09:39 +0000 | [diff] [blame] | 274 | build_java |
David L. Jones | 5283ef4 | 2022-04-22 16:44:09 -0700 | [diff] [blame] | 275 | } |
| 276 | |
Elliotte Rusty Harold | cc8ae4c | 2022-04-18 19:54:42 +0000 | [diff] [blame] | 277 | build_java_jdk17() { |
| 278 | use_java jdk17 |
Elliotte Rusty Harold | e22db32 | 2022-04-28 19:10:12 +0000 | [diff] [blame] | 279 | build_java |
Elliotte Rusty Harold | cc8ae4c | 2022-04-18 19:54:42 +0000 | [diff] [blame] | 280 | } |
| 281 | |
Tomo Suzuki | 7051725 | 2019-06-26 15:28:49 -0400 | [diff] [blame] | 282 | build_java_linkage_monitor() { |
Tomo Suzuki | bedef1e | 2019-07-01 17:03:04 -0400 | [diff] [blame] | 283 | # Linkage Monitor checks compatibility with other Google libraries |
| 284 | # https://github.com/GoogleCloudPlatform/cloud-opensource-java/tree/master/linkage-monitor |
| 285 | |
Joshua Haberman | 301d315 | 2022-02-08 18:31:50 -0800 | [diff] [blame] | 286 | use_java jdk11 |
Tomo Suzuki | bedef1e | 2019-07-01 17:03:04 -0400 | [diff] [blame] | 287 | internal_build_cpp |
| 288 | |
| 289 | # Linkage Monitor uses $HOME/.m2 local repository |
| 290 | MVN="mvn -e -B -Dhttps.protocols=TLSv1.2" |
| 291 | cd java |
Tomo Suzuki | bedef1e | 2019-07-01 17:03:04 -0400 | [diff] [blame] | 292 | # Installs the snapshot version locally |
| 293 | $MVN install -Dmaven.test.skip=true |
| 294 | |
| 295 | # Linkage Monitor uses the snapshot versions installed in $HOME/.m2 to verify compatibility |
| 296 | JAR=linkage-monitor-latest-all-deps.jar |
| 297 | curl -v -O "https://storage.googleapis.com/cloud-opensource-java-linkage-monitor/${JAR}" |
| 298 | # Fails if there's new linkage errors compared with baseline |
| 299 | java -jar $JAR com.google.cloud:libraries-bom |
Tomo Suzuki | 7051725 | 2019-06-26 15:28:49 -0400 | [diff] [blame] | 300 | } |
Chris Fallin | 20e94b2 | 2015-05-13 16:43:48 -0700 | [diff] [blame] | 301 | |
Thomas Van Lenten | 9642b82 | 2015-06-10 17:21:23 -0400 | [diff] [blame] | 302 | build_objectivec_ios() { |
Thomas Van Lenten | 368a2f4 | 2016-05-24 11:27:33 -0400 | [diff] [blame] | 303 | # Reused the build script that takes care of configuring and ensuring things |
| 304 | # are up to date. The OS X test runs the objc conformance test, so skip it |
| 305 | # here. |
Thomas Van Lenten | 368a2f4 | 2016-05-24 11:27:33 -0400 | [diff] [blame] | 306 | objectivec/DevTools/full_mac_build.sh \ |
Thomas Van Lenten | bd00671 | 2019-01-07 16:42:22 -0500 | [diff] [blame] | 307 | --core-only --skip-xcode-osx --skip-xcode-tvos --skip-objc-conformance "$@" |
Thomas Van Lenten | 368a2f4 | 2016-05-24 11:27:33 -0400 | [diff] [blame] | 308 | } |
| 309 | |
| 310 | build_objectivec_ios_debug() { |
| 311 | build_objectivec_ios --skip-xcode-release |
| 312 | } |
| 313 | |
| 314 | build_objectivec_ios_release() { |
| 315 | build_objectivec_ios --skip-xcode-debug |
Thomas Van Lenten | 9642b82 | 2015-06-10 17:21:23 -0400 | [diff] [blame] | 316 | } |
| 317 | |
| 318 | build_objectivec_osx() { |
Thomas Van Lenten | 368a2f4 | 2016-05-24 11:27:33 -0400 | [diff] [blame] | 319 | # Reused the build script that takes care of configuring and ensuring things |
| 320 | # are up to date. |
| 321 | objectivec/DevTools/full_mac_build.sh \ |
Thomas Van Lenten | bd00671 | 2019-01-07 16:42:22 -0500 | [diff] [blame] | 322 | --core-only --skip-xcode-ios --skip-xcode-tvos |
| 323 | } |
| 324 | |
| 325 | build_objectivec_tvos() { |
| 326 | # Reused the build script that takes care of configuring and ensuring things |
| 327 | # are up to date. The OS X test runs the objc conformance test, so skip it |
| 328 | # here. |
| 329 | objectivec/DevTools/full_mac_build.sh \ |
| 330 | --core-only --skip-xcode-ios --skip-xcode-osx --skip-objc-conformance "$@" |
| 331 | } |
| 332 | |
| 333 | build_objectivec_tvos_debug() { |
| 334 | build_objectivec_tvos --skip-xcode-release |
| 335 | } |
| 336 | |
| 337 | build_objectivec_tvos_release() { |
| 338 | build_objectivec_tvos --skip-xcode-debug |
Thomas Van Lenten | 9642b82 | 2015-06-10 17:21:23 -0400 | [diff] [blame] | 339 | } |
Dan O'Reilly | 5de2a81 | 2015-08-20 18:19:56 -0400 | [diff] [blame] | 340 | |
Chris Fallin | 20e94b2 | 2015-05-13 16:43:48 -0700 | [diff] [blame] | 341 | build_python() { |
Josh Haberman | 181c7f2 | 2015-07-15 11:05:10 -0700 | [diff] [blame] | 342 | internal_build_cpp |
Chris Fallin | 20e94b2 | 2015-05-13 16:43:48 -0700 | [diff] [blame] | 343 | cd python |
Joshua Haberman | 301d315 | 2022-02-08 18:31:50 -0800 | [diff] [blame] | 344 | tox --skip-missing-interpreters |
Chris Fallin | 20e94b2 | 2015-05-13 16:43:48 -0700 | [diff] [blame] | 345 | cd .. |
| 346 | } |
| 347 | |
Paul Yang | 4dec4f9 | 2018-12-18 18:07:24 -0800 | [diff] [blame] | 348 | build_python_version() { |
| 349 | internal_build_cpp |
| 350 | cd python |
| 351 | envlist=$1 |
Joshua Haberman | 301d315 | 2022-02-08 18:31:50 -0800 | [diff] [blame] | 352 | tox -e $envlist |
Paul Yang | 4dec4f9 | 2018-12-18 18:07:24 -0800 | [diff] [blame] | 353 | cd .. |
| 354 | } |
| 355 | |
Paul Yang | 4dec4f9 | 2018-12-18 18:07:24 -0800 | [diff] [blame] | 356 | build_python37() { |
| 357 | build_python_version py37-python |
| 358 | } |
| 359 | |
Jie Luo | 7faab5e | 2019-12-13 15:49:18 -0800 | [diff] [blame] | 360 | build_python38() { |
| 361 | build_python_version py38-python |
| 362 | } |
| 363 | |
Bu Sun Kim | 51c80ce | 2020-12-04 21:16:47 +0000 | [diff] [blame] | 364 | build_python39() { |
Bu Sun Kim | 523b109 | 2020-12-15 17:08:56 -0700 | [diff] [blame] | 365 | build_python_version py39-python |
Bu Sun Kim | 51c80ce | 2020-12-04 21:16:47 +0000 | [diff] [blame] | 366 | } |
| 367 | |
Bu Sun Kim | c01cd6e | 2021-10-15 11:24:49 -0600 | [diff] [blame] | 368 | build_python310() { |
| 369 | build_python_version py310-python |
| 370 | } |
| 371 | |
Chris Fallin | 20e94b2 | 2015-05-13 16:43:48 -0700 | [diff] [blame] | 372 | build_python_cpp() { |
Josh Haberman | 181c7f2 | 2015-07-15 11:05:10 -0700 | [diff] [blame] | 373 | internal_build_cpp |
Bo Yang | fd332d1 | 2016-09-30 00:07:47 +0000 | [diff] [blame] | 374 | export LD_LIBRARY_PATH=../src/.libs # for Linux |
| 375 | export DYLD_LIBRARY_PATH=../src/.libs # for OS X |
Chris Fallin | 20e94b2 | 2015-05-13 16:43:48 -0700 | [diff] [blame] | 376 | cd python |
Joshua Haberman | 301d315 | 2022-02-08 18:31:50 -0800 | [diff] [blame] | 377 | tox --skip-missing-interpreters |
Chris Fallin | 20e94b2 | 2015-05-13 16:43:48 -0700 | [diff] [blame] | 378 | cd .. |
| 379 | } |
| 380 | |
Paul Yang | 4dec4f9 | 2018-12-18 18:07:24 -0800 | [diff] [blame] | 381 | build_python_cpp_version() { |
| 382 | internal_build_cpp |
| 383 | export LD_LIBRARY_PATH=../src/.libs # for Linux |
| 384 | export DYLD_LIBRARY_PATH=../src/.libs # for OS X |
| 385 | cd python |
| 386 | envlist=$1 |
| 387 | tox -e $envlist |
| 388 | cd .. |
| 389 | } |
| 390 | |
Paul Yang | 4dec4f9 | 2018-12-18 18:07:24 -0800 | [diff] [blame] | 391 | build_python37_cpp() { |
| 392 | build_python_cpp_version py37-cpp |
| 393 | } |
| 394 | |
Jie Luo | 7faab5e | 2019-12-13 15:49:18 -0800 | [diff] [blame] | 395 | build_python38_cpp() { |
| 396 | build_python_cpp_version py38-cpp |
| 397 | } |
| 398 | |
Bu Sun Kim | 51c80ce | 2020-12-04 21:16:47 +0000 | [diff] [blame] | 399 | build_python39_cpp() { |
Bu Sun Kim | 523b109 | 2020-12-15 17:08:56 -0700 | [diff] [blame] | 400 | build_python_cpp_version py39-cpp |
Bu Sun Kim | 51c80ce | 2020-12-04 21:16:47 +0000 | [diff] [blame] | 401 | } |
| 402 | |
Bu Sun Kim | c01cd6e | 2021-10-15 11:24:49 -0600 | [diff] [blame] | 403 | build_python310_cpp() { |
| 404 | build_python_cpp_version py310-cpp |
| 405 | } |
| 406 | |
Paul Yang | 78ba021 | 2018-07-02 15:11:36 -0700 | [diff] [blame] | 407 | build_ruby23() { |
| 408 | internal_build_cpp # For conformance tests. |
Paul Yang | 333b3ce | 2018-10-18 11:16:55 -0700 | [diff] [blame] | 409 | cd ruby && bash travis-test.sh ruby-2.3.8 && cd .. |
Paul Yang | 78ba021 | 2018-07-02 15:11:36 -0700 | [diff] [blame] | 410 | } |
| 411 | build_ruby24() { |
| 412 | internal_build_cpp # For conformance tests. |
| 413 | cd ruby && bash travis-test.sh ruby-2.4 && cd .. |
| 414 | } |
| 415 | build_ruby25() { |
| 416 | internal_build_cpp # For conformance tests. |
Paul Yang | 333b3ce | 2018-10-18 11:16:55 -0700 | [diff] [blame] | 417 | cd ruby && bash travis-test.sh ruby-2.5.1 && cd .. |
Paul Yang | 78ba021 | 2018-07-02 15:11:36 -0700 | [diff] [blame] | 418 | } |
Paul Yang | de9e1a0 | 2019-01-03 14:25:50 -0800 | [diff] [blame] | 419 | build_ruby26() { |
| 420 | internal_build_cpp # For conformance tests. |
| 421 | cd ruby && bash travis-test.sh ruby-2.6.0 && cd .. |
Chris Fallin | 20e94b2 | 2015-05-13 16:43:48 -0700 | [diff] [blame] | 422 | } |
Eric Walker | 2c8364b | 2020-04-17 13:20:38 -0400 | [diff] [blame] | 423 | build_ruby27() { |
| 424 | internal_build_cpp # For conformance tests. |
| 425 | cd ruby && bash travis-test.sh ruby-2.7.0 && cd .. |
| 426 | } |
Joshua Haberman | 9abf6e2 | 2021-01-13 12:16:25 -0800 | [diff] [blame] | 427 | build_ruby30() { |
| 428 | internal_build_cpp # For conformance tests. |
Joshua Haberman | d339e17 | 2021-08-01 12:07:15 -0700 | [diff] [blame] | 429 | cd ruby && bash travis-test.sh ruby-3.0.2 && cd .. |
Joshua Haberman | 9abf6e2 | 2021-01-13 12:16:25 -0800 | [diff] [blame] | 430 | } |
Marco Concetto Rudilosso | abdfd09 | 2022-03-17 16:38:36 +0000 | [diff] [blame] | 431 | build_ruby31() { |
| 432 | internal_build_cpp # For conformance tests. |
| 433 | cd ruby && bash travis-test.sh ruby-3.1.0 && cd .. |
| 434 | } |
Chris Fallin | 20e94b2 | 2015-05-13 16:43:48 -0700 | [diff] [blame] | 435 | |
Jason Lunn | 728878e | 2021-10-07 18:45:38 -0400 | [diff] [blame] | 436 | build_jruby92() { |
Jason Lunn | ddd7f46 | 2021-10-06 13:06:27 -0400 | [diff] [blame] | 437 | internal_build_cpp # For conformance tests. |
| 438 | internal_build_java jdk8 && cd .. # For Maven protobuf jar with local changes |
Jason Lunn | df09991 | 2022-02-25 14:11:12 +0000 | [diff] [blame] | 439 | cd ruby && bash travis-test.sh jruby-9.2.20.1 && cd .. |
Jason Lunn | 728878e | 2021-10-07 18:45:38 -0400 | [diff] [blame] | 440 | } |
| 441 | |
| 442 | build_jruby93() { |
| 443 | internal_build_cpp # For conformance tests. |
| 444 | internal_build_java jdk8 && cd .. # For Maven protobuf jar with local changes |
Jason Lunn | 6b26277 | 2022-03-29 19:01:05 +0000 | [diff] [blame] | 445 | cd ruby && bash travis-test.sh jruby-9.3.4.0 && cd .. |
Rob Widmer | 24b2094 | 2020-09-16 11:00:29 -0400 | [diff] [blame] | 446 | } |
| 447 | |
Bo Yang | c8bd36e | 2016-09-30 19:07:33 +0000 | [diff] [blame] | 448 | use_php() { |
| 449 | VERSION=$1 |
Paul Yang | d7c4409 | 2018-12-18 10:57:03 -0800 | [diff] [blame] | 450 | export PATH=/usr/local/php-${VERSION}/bin:$PATH |
Joshua Haberman | f1ce866 | 2020-06-09 15:40:29 -0700 | [diff] [blame] | 451 | internal_build_cpp |
Bo Yang | c8bd36e | 2016-09-30 19:07:33 +0000 | [diff] [blame] | 452 | } |
| 453 | |
Joshua Haberman | 8b87075 | 2021-05-04 10:19:22 -0700 | [diff] [blame] | 454 | build_php() { |
| 455 | use_php $1 |
Paul Yang | 525be94 | 2021-02-04 09:50:28 -0800 | [diff] [blame] | 456 | pushd php |
| 457 | rm -rf vendor |
Brett McBride | 4c03fcf | 2022-01-27 15:45:20 +1100 | [diff] [blame] | 458 | php -v |
| 459 | php -m |
Paul Yang | 525be94 | 2021-02-04 09:50:28 -0800 | [diff] [blame] | 460 | composer update |
| 461 | composer test |
| 462 | popd |
| 463 | (cd conformance && make test_php) |
| 464 | } |
| 465 | |
Joshua Haberman | 8b87075 | 2021-05-04 10:19:22 -0700 | [diff] [blame] | 466 | test_php_c() { |
Paul Yang | e3e38b8 | 2016-12-08 14:39:20 -0800 | [diff] [blame] | 467 | pushd php |
Bo Yang | fd332d1 | 2016-09-30 00:07:47 +0000 | [diff] [blame] | 468 | rm -rf vendor |
Brett McBride | 4c03fcf | 2022-01-27 15:45:20 +1100 | [diff] [blame] | 469 | php -v |
| 470 | php -m |
Paul Yang | d7c4409 | 2018-12-18 10:57:03 -0800 | [diff] [blame] | 471 | composer update |
Joshua Haberman | 8b87075 | 2021-05-04 10:19:22 -0700 | [diff] [blame] | 472 | composer test_c |
Paul Yang | e3e38b8 | 2016-12-08 14:39:20 -0800 | [diff] [blame] | 473 | popd |
Joshua Haberman | 8b87075 | 2021-05-04 10:19:22 -0700 | [diff] [blame] | 474 | (cd conformance && make test_php_c) |
Bo Yang | fd332d1 | 2016-09-30 00:07:47 +0000 | [diff] [blame] | 475 | } |
| 476 | |
Joshua Haberman | 8b87075 | 2021-05-04 10:19:22 -0700 | [diff] [blame] | 477 | build_php_c() { |
| 478 | use_php $1 |
| 479 | test_php_c |
Paul Yang | 190b527 | 2017-04-19 16:23:51 -0700 | [diff] [blame] | 480 | } |
| 481 | |
| 482 | build_php7.0_mac() { |
Joshua Haberman | f1ce866 | 2020-06-09 15:40:29 -0700 | [diff] [blame] | 483 | internal_build_cpp |
Paul Yang | 190b527 | 2017-04-19 16:23:51 -0700 | [diff] [blame] | 484 | # Install PHP |
| 485 | curl -s https://php-osx.liip.ch/install.sh | bash -s 7.0 |
Joshua Haberman | 27ba0c5 | 2020-05-13 15:36:21 -0700 | [diff] [blame] | 486 | PHP_FOLDER=`find /usr/local -type d -name "php5-7.0*"` # The folder name may change upon time |
| 487 | test ! -z "$PHP_FOLDER" |
Paul Yang | 190b527 | 2017-04-19 16:23:51 -0700 | [diff] [blame] | 488 | export PATH="$PHP_FOLDER/bin:$PATH" |
| 489 | |
Joshua Haberman | 8b87075 | 2021-05-04 10:19:22 -0700 | [diff] [blame] | 490 | # Install Composer |
| 491 | wget https://getcomposer.org/download/2.0.13/composer.phar --progress=dot:mega -O /usr/local/bin/composer |
| 492 | chmod a+x /usr/local/bin/composer |
| 493 | |
Paul Yang | 190b527 | 2017-04-19 16:23:51 -0700 | [diff] [blame] | 494 | # Install valgrind |
| 495 | echo "#! /bin/bash" > valgrind |
| 496 | chmod ug+x valgrind |
| 497 | sudo mv valgrind /usr/local/bin/valgrind |
| 498 | |
| 499 | # Test |
Joshua Haberman | 8b87075 | 2021-05-04 10:19:22 -0700 | [diff] [blame] | 500 | test_php_c |
Bo Yang | 34cdaf4 | 2016-10-03 21:59:58 +0000 | [diff] [blame] | 501 | } |
| 502 | |
Joshua Haberman | 27ba0c5 | 2020-05-13 15:36:21 -0700 | [diff] [blame] | 503 | build_php7.3_mac() { |
Joshua Haberman | f1ce866 | 2020-06-09 15:40:29 -0700 | [diff] [blame] | 504 | internal_build_cpp |
Paul Yang | 8521957 | 2020-01-30 12:45:47 -0800 | [diff] [blame] | 505 | # Install PHP |
Joshua Haberman | 27ba0c5 | 2020-05-13 15:36:21 -0700 | [diff] [blame] | 506 | # We can't test PHP 7.4 with these binaries yet: |
| 507 | # https://github.com/liip/php-osx/issues/276 |
| 508 | curl -s https://php-osx.liip.ch/install.sh | bash -s 7.3 |
| 509 | PHP_FOLDER=`find /usr/local -type d -name "php5-7.3*"` # The folder name may change upon time |
| 510 | test ! -z "$PHP_FOLDER" |
Paul Yang | 8521957 | 2020-01-30 12:45:47 -0800 | [diff] [blame] | 511 | export PATH="$PHP_FOLDER/bin:$PATH" |
| 512 | |
Joshua Haberman | 8b87075 | 2021-05-04 10:19:22 -0700 | [diff] [blame] | 513 | # Install Composer |
| 514 | wget https://getcomposer.org/download/2.0.13/composer.phar --progress=dot:mega -O /usr/local/bin/composer |
| 515 | chmod a+x /usr/local/bin/composer |
| 516 | |
Paul Yang | 8521957 | 2020-01-30 12:45:47 -0800 | [diff] [blame] | 517 | # Install valgrind |
| 518 | echo "#! /bin/bash" > valgrind |
| 519 | chmod ug+x valgrind |
| 520 | sudo mv valgrind /usr/local/bin/valgrind |
| 521 | |
| 522 | # Test |
Joshua Haberman | 8b87075 | 2021-05-04 10:19:22 -0700 | [diff] [blame] | 523 | test_php_c |
Paul Yang | 8521957 | 2020-01-30 12:45:47 -0800 | [diff] [blame] | 524 | } |
| 525 | |
Paul Yang | 25abd7b | 2017-05-05 11:14:11 -0700 | [diff] [blame] | 526 | build_php_compatibility() { |
| 527 | internal_build_cpp |
Paul Yang | 25abd7b | 2017-05-05 11:14:11 -0700 | [diff] [blame] | 528 | } |
| 529 | |
Paul Yang | fe1790c | 2019-12-12 13:59:51 -0800 | [diff] [blame] | 530 | build_php_multirequest() { |
| 531 | use_php 7.4 |
Joshua Haberman | 2cc68ef | 2020-05-28 19:24:08 -0700 | [diff] [blame] | 532 | php/tests/multirequest.sh |
Paul Yang | fe1790c | 2019-12-12 13:59:51 -0800 | [diff] [blame] | 533 | } |
| 534 | |
Paul Yang | d4ca929 | 2020-08-11 19:30:46 -0700 | [diff] [blame] | 535 | build_php8.0_all() { |
Joshua Haberman | 8b87075 | 2021-05-04 10:19:22 -0700 | [diff] [blame] | 536 | build_php 8.0 |
Brett McBride | 4c03fcf | 2022-01-27 15:45:20 +1100 | [diff] [blame] | 537 | build_php 8.1 |
Joshua Haberman | 8b87075 | 2021-05-04 10:19:22 -0700 | [diff] [blame] | 538 | build_php_c 8.0 |
Brett McBride | 4c03fcf | 2022-01-27 15:45:20 +1100 | [diff] [blame] | 539 | build_php_c 8.1 |
Paul Yang | d4ca929 | 2020-08-11 19:30:46 -0700 | [diff] [blame] | 540 | } |
| 541 | |
Paul Yang | 25abd7b | 2017-05-05 11:14:11 -0700 | [diff] [blame] | 542 | build_php_all_32() { |
Joshua Haberman | 8b87075 | 2021-05-04 10:19:22 -0700 | [diff] [blame] | 543 | build_php 7.0 |
| 544 | build_php 7.1 |
| 545 | build_php 7.4 |
| 546 | build_php_c 7.0 |
| 547 | build_php_c 7.1 |
| 548 | build_php_c 7.4 |
| 549 | build_php_c 7.1-zts |
| 550 | build_php_c 7.2-zts |
| 551 | build_php_c 7.5-zts |
Paul Yang | 51c5ff8 | 2016-10-25 17:27:05 -0700 | [diff] [blame] | 552 | } |
| 553 | |
Paul Yang | 25abd7b | 2017-05-05 11:14:11 -0700 | [diff] [blame] | 554 | build_php_all() { |
Joshua Haberman | 8b87075 | 2021-05-04 10:19:22 -0700 | [diff] [blame] | 555 | build_php_all_32 |
Paul Yang | fe1790c | 2019-12-12 13:59:51 -0800 | [diff] [blame] | 556 | build_php_multirequest |
Paul Yang | 25abd7b | 2017-05-05 11:14:11 -0700 | [diff] [blame] | 557 | build_php_compatibility |
| 558 | } |
| 559 | |
Yilun Chong | 6adc3d7 | 2018-12-18 16:20:23 -0800 | [diff] [blame] | 560 | build_benchmark() { |
Yilun Chong | 152c830 | 2018-12-20 17:15:51 -0800 | [diff] [blame] | 561 | use_php 7.2 |
Yilun Chong | 6adc3d7 | 2018-12-18 16:20:23 -0800 | [diff] [blame] | 562 | cd kokoro/linux/benchmark && ./run.sh |
| 563 | } |
| 564 | |
Josh Haberman | 738393b | 2016-02-18 20:10:23 -0800 | [diff] [blame] | 565 | # -------- main -------- |
| 566 | |
Josh Haberman | 738393b | 2016-02-18 20:10:23 -0800 | [diff] [blame] | 567 | if [ "$#" -ne 1 ]; then |
| 568 | echo " |
| 569 | Usage: $0 { cpp | |
Feng Xiao | a4f68b1 | 2016-07-19 17:20:31 -0700 | [diff] [blame] | 570 | cpp_distcheck | |
Josh Haberman | 738393b | 2016-02-18 20:10:23 -0800 | [diff] [blame] | 571 | csharp | |
Josh Haberman | 738393b | 2016-02-18 20:10:23 -0800 | [diff] [blame] | 572 | java_jdk7 | |
| 573 | java_oracle7 | |
Elliotte Rusty Harold | bbc4f8d | 2022-04-18 16:47:56 +0000 | [diff] [blame] | 574 | java_jdk8 | |
Elliotte Rusty Harold | 1927520 | 2022-04-28 15:55:28 +0000 | [diff] [blame] | 575 | java_jdk11 | |
Elliotte Rusty Harold | cc8ae4c | 2022-04-18 19:54:42 +0000 | [diff] [blame] | 576 | java_jdk17 | |
Tomo Suzuki | 7051725 | 2019-06-26 15:28:49 -0400 | [diff] [blame] | 577 | java_linkage_monitor | |
Josh Haberman | 738393b | 2016-02-18 20:10:23 -0800 | [diff] [blame] | 578 | objectivec_ios | |
Thomas Van Lenten | 368a2f4 | 2016-05-24 11:27:33 -0400 | [diff] [blame] | 579 | objectivec_ios_debug | |
| 580 | objectivec_ios_release | |
Josh Haberman | 738393b | 2016-02-18 20:10:23 -0800 | [diff] [blame] | 581 | objectivec_osx | |
Thomas Van Lenten | bd00671 | 2019-01-07 16:42:22 -0500 | [diff] [blame] | 582 | objectivec_tvos | |
| 583 | objectivec_tvos_debug | |
| 584 | objectivec_tvos_release | |
Josh Haberman | 738393b | 2016-02-18 20:10:23 -0800 | [diff] [blame] | 585 | python | |
| 586 | python_cpp | |
Jie Luo | ea51149 | 2017-01-23 15:11:00 -0800 | [diff] [blame] | 587 | python_compatibility | |
Paul Yang | 39df66e | 2018-10-12 12:36:33 -0700 | [diff] [blame] | 588 | ruby23 | |
| 589 | ruby24 | |
| 590 | ruby25 | |
Paul Yang | de9e1a0 | 2019-01-03 14:25:50 -0800 | [diff] [blame] | 591 | ruby26 | |
Masaki Hara | f494cb2 | 2020-04-25 01:50:27 +0900 | [diff] [blame] | 592 | ruby27 | |
Joshua Haberman | 9abf6e2 | 2021-01-13 12:16:25 -0800 | [diff] [blame] | 593 | ruby30 | |
Marco Concetto Rudilosso | abdfd09 | 2022-03-17 16:38:36 +0000 | [diff] [blame] | 594 | ruby31 | |
Jason Lunn | 728878e | 2021-10-07 18:45:38 -0400 | [diff] [blame] | 595 | jruby92 | |
| 596 | jruby93 | |
Bo Yang | fd332d1 | 2016-09-30 00:07:47 +0000 | [diff] [blame] | 597 | ruby_all | |
Yilun Chong | 6adc3d7 | 2018-12-18 16:20:23 -0800 | [diff] [blame] | 598 | php_all | |
Joshua Haberman | 8b87075 | 2021-05-04 10:19:22 -0700 | [diff] [blame] | 599 | php_all_32 | |
| 600 | php7.0_mac | |
| 601 | php7.3_mac | |
Hao Nguyen | f85c823 | 2019-03-07 14:34:28 -0800 | [diff] [blame] | 602 | dist_install | |
Elliotte Rusty Harold | 1927520 | 2022-04-28 15:55:28 +0000 | [diff] [blame] | 603 | benchmark } |
Josh Haberman | 738393b | 2016-02-18 20:10:23 -0800 | [diff] [blame] | 604 | " |
| 605 | exit 1 |
| 606 | fi |
| 607 | |
| 608 | set -e # exit immediately on error |
| 609 | set -x # display all commands |
Feng Xiao | 9de4e64 | 2018-07-13 16:55:32 -0700 | [diff] [blame] | 610 | cd $(dirname $0) |
Josh Haberman | 738393b | 2016-02-18 20:10:23 -0800 | [diff] [blame] | 611 | eval "build_$1" |