diff options
-rw-r--r-- | .travis.yml | 1 | ||||
-rw-r--r-- | protobuf-lite.pc.in | 4 | ||||
-rw-r--r-- | protobuf.pc.in | 4 | ||||
-rw-r--r-- | protoc-artifacts/Dockerfile | 40 | ||||
-rw-r--r-- | protoc-artifacts/README.md | 21 | ||||
-rwxr-xr-x | python/setup.py | 2 | ||||
-rw-r--r-- | ruby/pom.xml | 10 | ||||
-rw-r--r-- | ruby/tests/basic.rb | 6 | ||||
-rwxr-xr-x | ruby/travis-test.sh | 19 |
9 files changed, 96 insertions, 11 deletions
diff --git a/.travis.yml b/.travis.yml index 354be896..4f513653 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,6 +14,7 @@ script: - cd python && python setup.py build && python setup.py test && cd .. - export LD_LIBRARY_PATH=../src/.libs - cd python && python setup.py build --cpp_implementation && python setup.py test --cpp_implementation && cd .. + - cd ruby && sh travis-test.sh && cd .. - cd conformance && make test_java && cd .. - make distcheck -j2 notifications: diff --git a/protobuf-lite.pc.in b/protobuf-lite.pc.in index 29c218e5..80f1f461 100644 --- a/protobuf-lite.pc.in +++ b/protobuf-lite.pc.in @@ -8,6 +8,4 @@ Description: Google's Data Interchange Format Version: @VERSION@ Libs: -L${libdir} -lprotobuf-lite @PTHREAD_CFLAGS@ @PTHREAD_LIBS@ Cflags: -I${includedir} @PTHREAD_CFLAGS@ -# Commented out because it crashes pkg-config *sigh*: -# http://bugs.freedesktop.org/show_bug.cgi?id=13265 -# Conflicts: protobuf +Conflicts: protobuf diff --git a/protobuf.pc.in b/protobuf.pc.in index 29f24877..49014903 100644 --- a/protobuf.pc.in +++ b/protobuf.pc.in @@ -9,6 +9,4 @@ Version: @VERSION@ Libs: -L${libdir} -lprotobuf @PTHREAD_CFLAGS@ @PTHREAD_LIBS@ Libs.private: @LIBS@ Cflags: -I${includedir} @PTHREAD_CFLAGS@ -# Commented out because it crashes pkg-config *sigh*: -# http://bugs.freedesktop.org/show_bug.cgi?id=13265 -# Conflicts: protobuf-lite +Conflicts: protobuf-lite diff --git a/protoc-artifacts/Dockerfile b/protoc-artifacts/Dockerfile new file mode 100644 index 00000000..fd35b89f --- /dev/null +++ b/protoc-artifacts/Dockerfile @@ -0,0 +1,40 @@ +FROM centos:6.6 + +RUN yum install -y git \ + tar \ + wget \ + make \ + autoconf \ + curl-devel \ + unzip \ + automake \ + libtool \ + glibc-static.i686 \ + glibc-devel \ + glibc-devel.i686 + +# Install Java 8 +RUN wget -q --no-cookies --no-check-certificate \ + --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u45-b14/jdk-8u45-linux-x64.tar.gz" \ + -O - | tar xz -C /var/local +ENV JAVA_HOME /var/local/jdk1.8.0_45 +ENV PATH $JAVA_HOME/bin:$PATH + +# Install Maven +RUN wget -q http://apache.cs.utah.edu/maven/maven-3/3.3.3/binaries/apache-maven-3.3.3-bin.tar.gz -O - | \ + tar xz -C /var/local +ENV PATH /var/local/apache-maven-3.3.3/bin:$PATH + +# Install GCC 4.7 to support -static-libstdc++ +RUN wget http://people.centos.org/tru/devtools-1.1/devtools-1.1.repo -P /etc/yum.repos.d +RUN bash -c 'echo "enabled=1" >> /etc/yum.repos.d/devtools-1.1.repo' +RUN bash -c "sed -e 's/\$basearch/i386/g' /etc/yum.repos.d/devtools-1.1.repo > /etc/yum.repos.d/devtools-i386-1.1.repo" +RUN sed -e 's/testing-/testing-i386-/g' -i /etc/yum.repos.d/devtools-i386-1.1.repo +RUN yum install -y devtoolset-1.1 \ + devtoolset-1.1-libstdc++-devel \ + devtoolset-1.1-libstdc++-devel.i686 + +RUN git clone --depth 1 https://github.com/google/protobuf.git + +# Start in devtoolset environment that uses GCC 4.7 +CMD ["scl", "enable", "devtoolset-1.1", "bash"] diff --git a/protoc-artifacts/README.md b/protoc-artifacts/README.md index 1ed1435e..06091cfe 100644 --- a/protoc-artifacts/README.md +++ b/protoc-artifacts/README.md @@ -87,6 +87,23 @@ When you have done deployment for all platforms, go to https://oss.sonatype.org/#stagingRepositories, verify that the staging repository has all the binaries, close and release this repository. +### Tips for deploying on Linux +We build on Centos 6.6 to provide a good compatibility for not very new +systems. We have provided a ``Dockerfile`` under this directory to build the +environment. It has been tested with Docker 1.6.1. + +To build a image: +``` +$ docker build -t protoc-artifacts . +``` + +To run the image: +``` +$ docker run -it --rm=true protoc-artifacts +``` + +The Protobuf repository has been cloned into ``/protobuf``. + ### Tips for deploying on Windows Under Windows the following error may occur: ``gpg: cannot open tty `no tty': No such file or directory``. This can be fixed by configuring gpg through an @@ -118,7 +135,9 @@ stored: ### Tested build environments We have succesfully built artifacts on the following environments: -- Linux x86_32 and x86_64: Ubuntu 14.04.2 64-bit +- Linux x86_32 and x86_64: + - Centos 6.6 (within Docker 1.6.1) + - Ubuntu 14.04.2 64-bit - Windows x86_32: MSYS with ``mingw32-gcc-g++ 4.8.1-4`` on Windows 7 64-bit - Windows x86_64: Cygwin64 with ``mingw64-x86_64-gcc-g++ 4.8.3-1`` on Windows 7 64-bit - Mac OS X x86_32 and x86_64: Mac OS X 10.9.5 diff --git a/python/setup.py b/python/setup.py index 06aed94b..1764ec87 100755 --- a/python/setup.py +++ b/python/setup.py @@ -53,7 +53,7 @@ def GetVersion(): protobuf library may be loaded instead.""" with open(os.path.join('google', 'protobuf', '__init__.py')) as version_file: - exec(version_file.read()) + exec(version_file.read(), globals()) return __version__ diff --git a/ruby/pom.xml b/ruby/pom.xml index 01f0e16b..247b243a 100644 --- a/ruby/pom.xml +++ b/ruby/pom.xml @@ -61,6 +61,14 @@ </execution> </executions> </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <configuration> + <source>1.6</source> + <target>1.6</target> + </configuration> + </plugin> </plugins> </build> <dependencies> @@ -78,7 +86,7 @@ <dependency> <groupId>com.google.protobuf</groupId> <artifactId>protobuf-java</artifactId> - <version>3.0.0-alpha-3-pre</version> + <version>3.0.0-alpha-2</version> </dependency> </dependencies> </project> diff --git a/ruby/tests/basic.rb b/ruby/tests/basic.rb index 1c2a03dc..a00f0b05 100644 --- a/ruby/tests/basic.rb +++ b/ruby/tests/basic.rb @@ -1035,7 +1035,8 @@ module BasicTest end def test_json - skip("Unimplemented") if RUBY_PLATFORM == "java" + # TODO: Fix JSON in JRuby version. + return if RUBY_PLATFORM == "java" m = TestMessage.new(:optional_int32 => 1234, :optional_int64 => -0x1_0000_0000, :optional_uint32 => 0x8000_0000, @@ -1066,7 +1067,8 @@ module BasicTest end def test_json_maps - skip("Unimplemented") if RUBY_PLATFORM == "java" + # TODO: Fix JSON in JRuby version. + return if RUBY_PLATFORM == "java" m = MapMessage.new(:map_string_int32 => {"a" => 1}) expected = '{"map_string_int32":{"a":1},"map_string_msg":{}}' assert MapMessage.encode_json(m) == expected diff --git a/ruby/travis-test.sh b/ruby/travis-test.sh new file mode 100755 index 00000000..2ccb490a --- /dev/null +++ b/ruby/travis-test.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +# Exit on any error. +set -e + +test_version() { + version=$1 + bash --login -c \ + "rvm install $version && rvm use $version && \ + which ruby && \ + gem install bundler && bundle && \ + rake test" +} + +test_version ruby-1.9 +test_version ruby-2.0 +test_version ruby-2.1 +test_version ruby-2.2 +test_version jruby |