Update Travis Docker file for Trusty to build gRPC code (#709)

[RFC=0002](https://github.com/googlecartographer/rfcs/blob/master/text/0002-cloud-based-mapping-1.md)
master
Christoph Schütte 2017-11-24 22:08:51 +01:00 committed by Wally B. Feed
parent 7e82ac3bbf
commit f6a7dfd07b
4 changed files with 58 additions and 1 deletions

View File

@ -19,5 +19,7 @@ COPY scripts/install_ceres.sh cartographer/scripts/
RUN cartographer/scripts/install_ceres.sh && rm -rf ceres-solver RUN cartographer/scripts/install_ceres.sh && rm -rf ceres-solver
COPY scripts/install_proto3.sh cartographer/scripts/ COPY scripts/install_proto3.sh cartographer/scripts/
RUN cartographer/scripts/install_proto3.sh && rm -rf protobuf RUN cartographer/scripts/install_proto3.sh && rm -rf protobuf
COPY scripts/install_grpc.sh cartographer/scripts/
RUN cartographer/scripts/install_grpc.sh && rm -rf grpc
COPY . cartographer COPY . cartographer
RUN cartographer/scripts/install_cartographer.sh && rm -rf cartographer RUN cartographer/scripts/install_cartographer_with_grpc.sh && rm -rf cartographer

View File

@ -0,0 +1,27 @@
#!/bin/sh
# Copyright 2017 The Cartographer Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
set -o errexit
set -o verbose
# Build and install Cartographer.
cd cartographer
mkdir build
cd build
cmake .. -DBUILD_GRPC=ON -G Ninja
ninja
ninja test
sudo ninja install

27
scripts/install_grpc.sh Executable file
View File

@ -0,0 +1,27 @@
#!/bin/sh
# Copyright 2017 The Cartographer Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
set -o errexit
set -o verbose
VERSION="v1.7.2"
# Build and install gRPC.
git clone -b ${VERSION} https://github.com/grpc/grpc
cd grpc
git submodule update --init
make
sudo make install

View File

@ -26,6 +26,7 @@ git checkout tags/${VERSION}
mkdir build mkdir build
cd build cd build
cmake -G Ninja \ cmake -G Ninja \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-DCMAKE_BUILD_TYPE=Release \ -DCMAKE_BUILD_TYPE=Release \
-Dprotobuf_BUILD_TESTS=OFF \ -Dprotobuf_BUILD_TESTS=OFF \
../cmake ../cmake