diff options
Diffstat (limited to 'travis.sh')
-rwxr-xr-x | travis.sh | 52 |
1 files changed, 48 insertions, 4 deletions
@@ -11,6 +11,15 @@ # For when some other test needs the C++ main build, including protoc and # libprotobuf. internal_build_cpp() { + if [ $(uname -s) == "Linux" ]; then + # Install GCC 4.8 to replace the default GCC 4.6. We need 4.8 for more + # decent C++ 11 support in order to compile conformance tests. + sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y + sudo apt-get update -qq + sudo apt-get install -qq g++-4.8 + export CXX="g++-4.8" CC="gcc-4.8" + fi + ./autogen.sh ./configure make -j2 @@ -47,6 +56,24 @@ build_csharp() { cd conformance && make test_csharp && cd .. } +build_golang() { + # Go build needs `protoc`. + internal_build_cpp + # Add protoc to the path so that the examples build finds it. + export PATH="`pwd`/src:$PATH" + + # Install Go and the Go protobuf compiler plugin. + sudo apt-get update -qq + sudo apt-get install -qq golang + export GOPATH="$HOME/gocode" + mkdir -p "$GOPATH/src/github.com/google" + ln -s "`pwd`" "$GOPATH/src/github.com/google/protobuf" + export PATH="$GOPATH/bin:$PATH" + go get github.com/golang/protobuf/protoc-gen-go + + cd examples && make gotest && cd .. +} + use_java() { version=$1 case "$version" in @@ -75,7 +102,17 @@ use_java() { build_java() { # Java build needs `protoc`. internal_build_cpp - cd java && mvn test && cd .. + cd java && mvn test && mvn install + cd util && mvn test + cd ../.. +} + +build_java_with_conformance_tests() { + # Java build needs `protoc`. + internal_build_cpp + cd java && mvn test && mvn install + cd util && mvn test && mvn assembly:single + cd ../.. cd conformance && make test_java && cd .. } @@ -91,7 +128,7 @@ build_java_jdk6() { } build_java_jdk7() { use_java jdk7 - build_java + build_java_with_conformance_tests } build_java_oracle7() { use_java oracle7 @@ -136,8 +173,9 @@ internal_objectivec_common () { brew update brew outdated xctool || brew upgrade xctool # Reused the build script that takes care of configuring and ensuring things - # are up to date. - objectivec/DevTools/full_mac_build.sh --core-only --skip-xcode + # are up to date. Xcode and conformance tests will be directly invoked. + objectivec/DevTools/full_mac_build.sh \ + --core-only --skip-xcode --skip-objc-conformance } internal_xctool_debug_and_release() { @@ -178,6 +216,7 @@ build_objectivec_osx() { -scheme ProtocolBuffers \ -destination "platform=OS X,arch=x86_64" \ test + cd conformance && make test_objc && cd .. } build_python() { @@ -232,6 +271,11 @@ build_jruby() { cd ruby && bash travis-test.sh jruby && cd .. } +build_javascript() { + internal_build_cpp + cd js && npm install && npm test && cd .. +} + # -------- main -------- if [ "$#" -ne 1 ]; then |