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 | # |
| 3 | # Build and runs tests for the protobuf project. The tests as written here are |
| 4 | # used by both Jenkins and Travis, though some specialized logic is required to |
| 5 | # handle the differences between them. |
Thomas Van Lenten | c4d3638 | 2015-06-09 13:35:41 -0400 | [diff] [blame] | 6 | |
Josh Haberman | 0f8c25d | 2016-02-19 09:11:38 -0800 | [diff] [blame] | 7 | on_travis() { |
| 8 | if [ "$TRAVIS" == "true" ]; then |
| 9 | "$@" |
| 10 | fi |
| 11 | } |
| 12 | |
Josh Haberman | 181c7f2 | 2015-07-15 11:05:10 -0700 | [diff] [blame] | 13 | # For when some other test needs the C++ main build, including protoc and |
| 14 | # libprotobuf. |
| 15 | internal_build_cpp() { |
Josh Haberman | 738393b | 2016-02-18 20:10:23 -0800 | [diff] [blame] | 16 | if [ -f src/protoc ]; then |
| 17 | # Already built. |
| 18 | return |
| 19 | fi |
| 20 | |
Josh Haberman | d33e93b | 2016-02-18 19:13:07 -0800 | [diff] [blame] | 21 | if [[ $(uname -s) == "Linux" && "$TRAVIS" == "true" ]]; then |
Feng Xiao | 9125863 | 2015-12-21 03:34:28 -0800 | [diff] [blame] | 22 | # Install GCC 4.8 to replace the default GCC 4.6. We need 4.8 for more |
| 23 | # decent C++ 11 support in order to compile conformance tests. |
| 24 | sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y |
| 25 | sudo apt-get update -qq |
| 26 | sudo apt-get install -qq g++-4.8 |
| 27 | export CXX="g++-4.8" CC="gcc-4.8" |
| 28 | fi |
Feng Xiao | 1e2fece | 2015-12-18 15:16:07 -0800 | [diff] [blame] | 29 | |
Chris Fallin | 20e94b2 | 2015-05-13 16:43:48 -0700 | [diff] [blame] | 30 | ./autogen.sh |
| 31 | ./configure |
Josh Haberman | 67c727c | 2016-03-04 14:21:18 -0800 | [diff] [blame] | 32 | make -j2 |
Josh Haberman | 181c7f2 | 2015-07-15 11:05:10 -0700 | [diff] [blame] | 33 | } |
| 34 | |
| 35 | build_cpp() { |
| 36 | internal_build_cpp |
Josh Haberman | 67c727c | 2016-03-04 14:21:18 -0800 | [diff] [blame] | 37 | make check -j2 |
Chris Fallin | 20e94b2 | 2015-05-13 16:43:48 -0700 | [diff] [blame] | 38 | cd conformance && make test_cpp && cd .. |
Josh Haberman | cb36bde | 2016-04-29 09:52:20 -0700 | [diff] [blame] | 39 | |
| 40 | # Verify benchmarking code can build successfully. |
Josh Haberman | 49a8918 | 2016-04-29 10:19:03 -0700 | [diff] [blame] | 41 | cd benchmarks && make && ./generate-datasets && cd .. |
Chris Fallin | 20e94b2 | 2015-05-13 16:43:48 -0700 | [diff] [blame] | 42 | } |
| 43 | |
| 44 | build_cpp_distcheck() { |
| 45 | ./autogen.sh |
| 46 | ./configure |
Josh Haberman | 67c727c | 2016-03-04 14:21:18 -0800 | [diff] [blame] | 47 | make distcheck -j2 |
Chris Fallin | 20e94b2 | 2015-05-13 16:43:48 -0700 | [diff] [blame] | 48 | } |
| 49 | |
Jan Tattermusch | ddb36ef | 2015-05-18 17:34:02 -0700 | [diff] [blame] | 50 | build_csharp() { |
Jon Skeet | b6defa7 | 2015-08-04 10:01:40 +0100 | [diff] [blame] | 51 | # Just for the conformance tests. We don't currently |
| 52 | # need to really build protoc, but it's simplest to keep with the |
| 53 | # conventions of the other builds. |
| 54 | internal_build_cpp |
Josh Haberman | ffc8118 | 2016-02-22 15:39:29 -0800 | [diff] [blame] | 55 | NUGET=/usr/local/bin/nuget.exe |
Jon Skeet | b6defa7 | 2015-08-04 10:01:40 +0100 | [diff] [blame] | 56 | |
Josh Haberman | ffc8118 | 2016-02-22 15:39:29 -0800 | [diff] [blame] | 57 | if [ "$TRAVIS" == "true" ]; then |
| 58 | # Install latest version of Mono |
| 59 | sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF |
| 60 | echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list |
| 61 | echo "deb http://download.mono-project.com/repo/debian wheezy-libtiff-compat main" | sudo tee -a /etc/apt/sources.list.d/mono-xamarin.list |
| 62 | sudo apt-get update -qq |
| 63 | sudo apt-get install -qq mono-devel referenceassemblies-pcl nunit |
| 64 | wget www.nuget.org/NuGet.exe -O nuget.exe |
| 65 | NUGET=../../nuget.exe |
| 66 | fi |
Jan Tattermusch | ddb36ef | 2015-05-18 17:34:02 -0700 | [diff] [blame] | 67 | |
Josh Haberman | ffc8118 | 2016-02-22 15:39:29 -0800 | [diff] [blame] | 68 | (cd csharp/src; mono $NUGET restore) |
Jan Tattermusch | ddb36ef | 2015-05-18 17:34:02 -0700 | [diff] [blame] | 69 | csharp/buildall.sh |
Josh Haberman | e891c29 | 2015-12-30 16:03:49 -0800 | [diff] [blame] | 70 | cd conformance && make test_csharp && cd .. |
Jan Tattermusch | ddb36ef | 2015-05-18 17:34:02 -0700 | [diff] [blame] | 71 | } |
| 72 | |
Tim Swast | 7e31c4d | 2015-11-20 15:32:53 -0800 | [diff] [blame] | 73 | build_golang() { |
| 74 | # Go build needs `protoc`. |
| 75 | internal_build_cpp |
| 76 | # Add protoc to the path so that the examples build finds it. |
| 77 | export PATH="`pwd`/src:$PATH" |
| 78 | |
| 79 | # Install Go and the Go protobuf compiler plugin. |
| 80 | sudo apt-get update -qq |
| 81 | sudo apt-get install -qq golang |
| 82 | export GOPATH="$HOME/gocode" |
| 83 | mkdir -p "$GOPATH/src/github.com/google" |
| 84 | ln -s "`pwd`" "$GOPATH/src/github.com/google/protobuf" |
| 85 | export PATH="$GOPATH/bin:$PATH" |
| 86 | go get github.com/golang/protobuf/protoc-gen-go |
| 87 | |
| 88 | cd examples && make gotest && cd .. |
| 89 | } |
| 90 | |
Chris Fallin | 20e94b2 | 2015-05-13 16:43:48 -0700 | [diff] [blame] | 91 | use_java() { |
Chris Fallin | 20e94b2 | 2015-05-13 16:43:48 -0700 | [diff] [blame] | 92 | version=$1 |
| 93 | case "$version" in |
| 94 | jdk6) |
Josh Haberman | 0f8c25d | 2016-02-19 09:11:38 -0800 | [diff] [blame] | 95 | on_travis sudo apt-get install openjdk-6-jdk |
Chris Fallin | 20e94b2 | 2015-05-13 16:43:48 -0700 | [diff] [blame] | 96 | export PATH=/usr/lib/jvm/java-6-openjdk-amd64/bin:$PATH |
| 97 | ;; |
| 98 | jdk7) |
Josh Haberman | 0f8c25d | 2016-02-19 09:11:38 -0800 | [diff] [blame] | 99 | on_travis sudo apt-get install openjdk-7-jdk |
Chris Fallin | 20e94b2 | 2015-05-13 16:43:48 -0700 | [diff] [blame] | 100 | export PATH=/usr/lib/jvm/java-7-openjdk-amd64/bin:$PATH |
| 101 | ;; |
| 102 | oracle7) |
Josh Haberman | ffc8118 | 2016-02-22 15:39:29 -0800 | [diff] [blame] | 103 | if [ "$TRAVIS" == "true" ]; then |
| 104 | sudo apt-get install python-software-properties # for apt-add-repository |
| 105 | echo "oracle-java7-installer shared/accepted-oracle-license-v1-1 select true" | \ |
| 106 | sudo debconf-set-selections |
| 107 | yes | sudo apt-add-repository ppa:webupd8team/java |
| 108 | yes | sudo apt-get install oracle-java7-installer |
| 109 | fi; |
Chris Fallin | 20e94b2 | 2015-05-13 16:43:48 -0700 | [diff] [blame] | 110 | export PATH=/usr/lib/jvm/java-7-oracle/bin:$PATH |
| 111 | ;; |
| 112 | esac |
| 113 | |
Josh Haberman | 1ee0fda | 2016-03-03 16:02:55 -0800 | [diff] [blame] | 114 | if [ "$TRAVIS" != "true" ]; then |
| 115 | MAVEN_LOCAL_REPOSITORY=/var/maven_local_repository |
| 116 | MVN="$MVN -e -X --offline -Dmaven.repo.local=$MAVEN_LOCAL_REPOSITORY" |
| 117 | fi; |
| 118 | |
Chris Fallin | 20e94b2 | 2015-05-13 16:43:48 -0700 | [diff] [blame] | 119 | which java |
| 120 | java -version |
| 121 | } |
| 122 | |
Josh Haberman | d08c39c | 2016-02-20 12:03:39 -0800 | [diff] [blame] | 123 | # --batch-mode supresses download progress output that spams the logs. |
Josh Haberman | b28b3f6 | 2016-02-20 12:17:10 -0800 | [diff] [blame] | 124 | MVN="mvn --batch-mode" |
Josh Haberman | d08c39c | 2016-02-20 12:03:39 -0800 | [diff] [blame] | 125 | |
Chris Fallin | 20e94b2 | 2015-05-13 16:43:48 -0700 | [diff] [blame] | 126 | build_java() { |
Josh Haberman | 2f3f1de | 2016-03-01 15:37:17 -0800 | [diff] [blame] | 127 | version=$1 |
| 128 | dir=java_$version |
Chris Fallin | 20e94b2 | 2015-05-13 16:43:48 -0700 | [diff] [blame] | 129 | # Java build needs `protoc`. |
Josh Haberman | 181c7f2 | 2015-07-15 11:05:10 -0700 | [diff] [blame] | 130 | internal_build_cpp |
Josh Haberman | 2f3f1de | 2016-03-01 15:37:17 -0800 | [diff] [blame] | 131 | cp -r java $dir |
| 132 | cd $dir && $MVN clean && $MVN test |
Feng Xiao | 9e5fb55 | 2015-12-21 11:08:18 -0800 | [diff] [blame] | 133 | cd ../.. |
| 134 | } |
| 135 | |
Josh Haberman | 2f3f1de | 2016-03-01 15:37:17 -0800 | [diff] [blame] | 136 | # The conformance tests are hard-coded to work with the $ROOT/java directory. |
| 137 | # 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] | 138 | build_java_with_conformance_tests() { |
| 139 | # Java build needs `protoc`. |
| 140 | internal_build_cpp |
Josh Haberman | d08c39c | 2016-02-20 12:03:39 -0800 | [diff] [blame] | 141 | cd java && $MVN test && $MVN install |
Josh Haberman | 2f3f1de | 2016-03-01 15:37:17 -0800 | [diff] [blame] | 142 | cd util && $MVN package assembly:single |
Feng Xiao | af81dcf | 2015-12-21 03:25:59 -0800 | [diff] [blame] | 143 | cd ../.. |
Chris Fallin | 20e94b2 | 2015-05-13 16:43:48 -0700 | [diff] [blame] | 144 | cd conformance && make test_java && cd .. |
| 145 | } |
| 146 | |
| 147 | build_javanano() { |
| 148 | # Java build needs `protoc`. |
Josh Haberman | 181c7f2 | 2015-07-15 11:05:10 -0700 | [diff] [blame] | 149 | internal_build_cpp |
Josh Haberman | b28b3f6 | 2016-02-20 12:17:10 -0800 | [diff] [blame] | 150 | cd javanano && $MVN test && cd .. |
Chris Fallin | 20e94b2 | 2015-05-13 16:43:48 -0700 | [diff] [blame] | 151 | } |
| 152 | |
| 153 | build_java_jdk6() { |
| 154 | use_java jdk6 |
Josh Haberman | 2f3f1de | 2016-03-01 15:37:17 -0800 | [diff] [blame] | 155 | build_java jdk6 |
Chris Fallin | 20e94b2 | 2015-05-13 16:43:48 -0700 | [diff] [blame] | 156 | } |
| 157 | build_java_jdk7() { |
| 158 | use_java jdk7 |
Feng Xiao | 9e5fb55 | 2015-12-21 11:08:18 -0800 | [diff] [blame] | 159 | build_java_with_conformance_tests |
Chris Fallin | 20e94b2 | 2015-05-13 16:43:48 -0700 | [diff] [blame] | 160 | } |
| 161 | build_java_oracle7() { |
| 162 | use_java oracle7 |
Josh Haberman | 2f3f1de | 2016-03-01 15:37:17 -0800 | [diff] [blame] | 163 | build_java oracle7 |
Chris Fallin | 20e94b2 | 2015-05-13 16:43:48 -0700 | [diff] [blame] | 164 | } |
| 165 | |
| 166 | build_javanano_jdk6() { |
| 167 | use_java jdk6 |
| 168 | build_javanano |
| 169 | } |
| 170 | build_javanano_jdk7() { |
| 171 | use_java jdk7 |
| 172 | build_javanano |
| 173 | } |
| 174 | build_javanano_oracle7() { |
| 175 | use_java oracle7 |
| 176 | build_javanano |
| 177 | } |
| 178 | |
Dan O'Reilly | 5de2a81 | 2015-08-20 18:19:56 -0400 | [diff] [blame] | 179 | internal_install_python_deps() { |
Josh Haberman | 483533d | 2016-02-19 12:48:33 -0800 | [diff] [blame] | 180 | if [ "$TRAVIS" != "true" ]; then |
| 181 | return; |
| 182 | fi |
Thomas Van Lenten | 9642b82 | 2015-06-10 17:21:23 -0400 | [diff] [blame] | 183 | # Install tox (OS X doesn't have pip). |
| 184 | if [ $(uname -s) == "Darwin" ]; then |
| 185 | sudo easy_install tox |
| 186 | else |
| 187 | sudo pip install tox |
| 188 | fi |
Dan O'Reilly | d9598ca | 2015-08-26 20:30:41 -0400 | [diff] [blame] | 189 | # Only install Python2.6/3.x on Linux. |
Dan O'Reilly | 76f8a3f | 2015-08-21 18:51:47 -0400 | [diff] [blame] | 190 | if [ $(uname -s) == "Linux" ]; then |
| 191 | sudo apt-get install -y python-software-properties # for apt-add-repository |
| 192 | sudo apt-add-repository -y ppa:fkrull/deadsnakes |
| 193 | sudo apt-get update -qq |
| 194 | sudo apt-get install -y python2.6 python2.6-dev |
Dan O'Reilly | d9598ca | 2015-08-26 20:30:41 -0400 | [diff] [blame] | 195 | sudo apt-get install -y python3.3 python3.3-dev |
| 196 | sudo apt-get install -y python3.4 python3.4-dev |
Dan O'Reilly | 76f8a3f | 2015-08-21 18:51:47 -0400 | [diff] [blame] | 197 | fi |
Dan O'Reilly | 5de2a81 | 2015-08-20 18:19:56 -0400 | [diff] [blame] | 198 | } |
| 199 | |
Thomas Van Lenten | 9642b82 | 2015-06-10 17:21:23 -0400 | [diff] [blame] | 200 | build_objectivec_ios() { |
Thomas Van Lenten | 368a2f4 | 2016-05-24 11:27:33 -0400 | [diff] [blame] | 201 | # Reused the build script that takes care of configuring and ensuring things |
| 202 | # are up to date. The OS X test runs the objc conformance test, so skip it |
| 203 | # here. |
| 204 | # Note: travis has xctool installed, and we've looked at using it in the past |
| 205 | # but it has ended up proving unreliable (bugs), an they are removing build |
| 206 | # support in favor of xcbuild (or just xcodebuild). |
| 207 | objectivec/DevTools/full_mac_build.sh \ |
| 208 | --core-only --skip-xcode-osx --skip-objc-conformance "$@" |
| 209 | } |
| 210 | |
| 211 | build_objectivec_ios_debug() { |
| 212 | build_objectivec_ios --skip-xcode-release |
| 213 | } |
| 214 | |
| 215 | build_objectivec_ios_release() { |
| 216 | build_objectivec_ios --skip-xcode-debug |
Thomas Van Lenten | 9642b82 | 2015-06-10 17:21:23 -0400 | [diff] [blame] | 217 | } |
| 218 | |
| 219 | build_objectivec_osx() { |
Thomas Van Lenten | 368a2f4 | 2016-05-24 11:27:33 -0400 | [diff] [blame] | 220 | # Reused the build script that takes care of configuring and ensuring things |
| 221 | # are up to date. |
| 222 | objectivec/DevTools/full_mac_build.sh \ |
| 223 | --core-only --skip-xcode-ios |
Thomas Van Lenten | 9642b82 | 2015-06-10 17:21:23 -0400 | [diff] [blame] | 224 | } |
Dan O'Reilly | 5de2a81 | 2015-08-20 18:19:56 -0400 | [diff] [blame] | 225 | |
Sergio Campamá | f0c1492 | 2016-06-14 11:26:01 -0700 | [diff] [blame] | 226 | build_objectivec_cocoapods_integration() { |
| 227 | # First, load the RVM environment in bash, needed to update ruby. |
| 228 | source ~/.rvm/scripts/rvm |
| 229 | # Update ruby to 2.2.3 as the default one crashes with segmentation faults |
| 230 | # when using pod. |
| 231 | rvm use 2.2.3 --install --binary --fuzzy |
| 232 | # Update pod to the latest version. |
| 233 | gem install cocoapods --no-ri --no-rdoc |
| 234 | objectivec/Tests/CocoaPods/run_tests.sh |
| 235 | } |
| 236 | |
Chris Fallin | 20e94b2 | 2015-05-13 16:43:48 -0700 | [diff] [blame] | 237 | build_python() { |
Josh Haberman | 181c7f2 | 2015-07-15 11:05:10 -0700 | [diff] [blame] | 238 | internal_build_cpp |
Dan O'Reilly | 5de2a81 | 2015-08-20 18:19:56 -0400 | [diff] [blame] | 239 | internal_install_python_deps |
Chris Fallin | 20e94b2 | 2015-05-13 16:43:48 -0700 | [diff] [blame] | 240 | cd python |
Dan O'Reilly | d9598ca | 2015-08-26 20:30:41 -0400 | [diff] [blame] | 241 | # Only test Python 2.6/3.x on Linux |
Dan O'Reilly | 76f8a3f | 2015-08-21 18:51:47 -0400 | [diff] [blame] | 242 | if [ $(uname -s) == "Linux" ]; then |
Jie Luo | 2850a98 | 2015-10-09 17:07:03 -0700 | [diff] [blame] | 243 | envlist=py\{26,27,33,34\}-python |
Dan O'Reilly | 76f8a3f | 2015-08-21 18:51:47 -0400 | [diff] [blame] | 244 | else |
| 245 | envlist=py27-python |
| 246 | fi |
| 247 | tox -e $envlist |
Chris Fallin | 20e94b2 | 2015-05-13 16:43:48 -0700 | [diff] [blame] | 248 | cd .. |
| 249 | } |
| 250 | |
| 251 | build_python_cpp() { |
Josh Haberman | 181c7f2 | 2015-07-15 11:05:10 -0700 | [diff] [blame] | 252 | internal_build_cpp |
Dan O'Reilly | 5de2a81 | 2015-08-20 18:19:56 -0400 | [diff] [blame] | 253 | internal_install_python_deps |
| 254 | export LD_LIBRARY_PATH=../src/.libs # for Linux |
Tamir Duberstein | c91d9ab | 2015-05-14 21:32:39 -0400 | [diff] [blame] | 255 | export DYLD_LIBRARY_PATH=../src/.libs # for OS X |
Chris Fallin | 20e94b2 | 2015-05-13 16:43:48 -0700 | [diff] [blame] | 256 | cd python |
Dan O'Reilly | d9598ca | 2015-08-26 20:30:41 -0400 | [diff] [blame] | 257 | # Only test Python 2.6/3.x on Linux |
Dan O'Reilly | 76f8a3f | 2015-08-21 18:51:47 -0400 | [diff] [blame] | 258 | if [ $(uname -s) == "Linux" ]; then |
Jisi Liu | 72bd9c9 | 2015-10-06 10:48:57 -0700 | [diff] [blame] | 259 | # py26 is currently disabled due to json_format |
| 260 | envlist=py\{27,33,34\}-cpp |
Dan O'Reilly | 76f8a3f | 2015-08-21 18:51:47 -0400 | [diff] [blame] | 261 | else |
| 262 | envlist=py27-cpp |
| 263 | fi |
| 264 | tox -e $envlist |
Chris Fallin | 20e94b2 | 2015-05-13 16:43:48 -0700 | [diff] [blame] | 265 | cd .. |
| 266 | } |
| 267 | |
| 268 | build_ruby19() { |
Josh Haberman | 181c7f2 | 2015-07-15 11:05:10 -0700 | [diff] [blame] | 269 | internal_build_cpp # For conformance tests. |
Chris Fallin | 20e94b2 | 2015-05-13 16:43:48 -0700 | [diff] [blame] | 270 | cd ruby && bash travis-test.sh ruby-1.9 && cd .. |
| 271 | } |
| 272 | build_ruby20() { |
Josh Haberman | 181c7f2 | 2015-07-15 11:05:10 -0700 | [diff] [blame] | 273 | internal_build_cpp # For conformance tests. |
Chris Fallin | 20e94b2 | 2015-05-13 16:43:48 -0700 | [diff] [blame] | 274 | cd ruby && bash travis-test.sh ruby-2.0 && cd .. |
| 275 | } |
| 276 | build_ruby21() { |
Josh Haberman | 181c7f2 | 2015-07-15 11:05:10 -0700 | [diff] [blame] | 277 | internal_build_cpp # For conformance tests. |
Chris Fallin | 20e94b2 | 2015-05-13 16:43:48 -0700 | [diff] [blame] | 278 | cd ruby && bash travis-test.sh ruby-2.1 && cd .. |
| 279 | } |
| 280 | build_ruby22() { |
Josh Haberman | 181c7f2 | 2015-07-15 11:05:10 -0700 | [diff] [blame] | 281 | internal_build_cpp # For conformance tests. |
Chris Fallin | 20e94b2 | 2015-05-13 16:43:48 -0700 | [diff] [blame] | 282 | cd ruby && bash travis-test.sh ruby-2.2 && cd .. |
| 283 | } |
| 284 | build_jruby() { |
Josh Haberman | 181c7f2 | 2015-07-15 11:05:10 -0700 | [diff] [blame] | 285 | internal_build_cpp # For conformance tests. |
Chris Fallin | 20e94b2 | 2015-05-13 16:43:48 -0700 | [diff] [blame] | 286 | cd ruby && bash travis-test.sh jruby && cd .. |
| 287 | } |
| 288 | |
Josh Haberman | e9cf31e | 2015-12-21 15:18:17 -0800 | [diff] [blame] | 289 | build_javascript() { |
| 290 | internal_build_cpp |
Josh Haberman | 0d2d8bc | 2015-12-28 06:43:42 -0800 | [diff] [blame] | 291 | cd js && npm install && npm test && cd .. |
Josh Haberman | e9cf31e | 2015-12-21 15:18:17 -0800 | [diff] [blame] | 292 | } |
| 293 | |
Josh Haberman | 738393b | 2016-02-18 20:10:23 -0800 | [diff] [blame] | 294 | # Note: travis currently does not support testing more than one language so the |
| 295 | # .travis.yml cheats and claims to only be cpp. If they add multiple language |
| 296 | # support, this should probably get updated to install steps and/or |
| 297 | # rvm/gemfile/jdk/etc. entries rather than manually doing the work. |
| 298 | |
| 299 | # .travis.yml uses matrix.exclude to block the cases where app-get can't be |
| 300 | # use to install things. |
| 301 | |
| 302 | # -------- main -------- |
| 303 | |
Josh Haberman | 738393b | 2016-02-18 20:10:23 -0800 | [diff] [blame] | 304 | if [ "$#" -ne 1 ]; then |
| 305 | echo " |
| 306 | Usage: $0 { cpp | |
| 307 | csharp | |
| 308 | java_jdk6 | |
| 309 | java_jdk7 | |
| 310 | java_oracle7 | |
| 311 | javanano_jdk6 | |
| 312 | javanano_jdk7 | |
| 313 | javanano_oracle7 | |
| 314 | objectivec_ios | |
Thomas Van Lenten | 368a2f4 | 2016-05-24 11:27:33 -0400 | [diff] [blame] | 315 | objectivec_ios_debug | |
| 316 | objectivec_ios_release | |
Josh Haberman | 738393b | 2016-02-18 20:10:23 -0800 | [diff] [blame] | 317 | objectivec_osx | |
Sergio Campamá | f0c1492 | 2016-06-14 11:26:01 -0700 | [diff] [blame] | 318 | objectivec_cocoapods_integration | |
Josh Haberman | 738393b | 2016-02-18 20:10:23 -0800 | [diff] [blame] | 319 | python | |
| 320 | python_cpp | |
Josh Haberman | ffc8118 | 2016-02-22 15:39:29 -0800 | [diff] [blame] | 321 | ruby19 | |
| 322 | ruby20 | |
| 323 | ruby21 | |
| 324 | ruby22 | |
Josh Haberman | 738393b | 2016-02-18 20:10:23 -0800 | [diff] [blame] | 325 | jruby } |
| 326 | " |
| 327 | exit 1 |
| 328 | fi |
| 329 | |
| 330 | set -e # exit immediately on error |
| 331 | set -x # display all commands |
| 332 | eval "build_$1" |