Skip to content

Commit

Permalink
Sets up Travis CI. (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
damonkohler committed Aug 26, 2016
1 parent 817dc88 commit 9a303d0
Show file tree
Hide file tree
Showing 8 changed files with 145 additions and 32 deletions.
18 changes: 18 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright 2016 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.

sudo: required
services: docker
install: true
script: docker build ${TRAVIS_BUILD_DIR} -t cartographer
19 changes: 19 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Copyright 2016 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.

FROM ubuntu:trusty
COPY . cartographer
RUN cartographer/scripts/install_debs.sh && rm -rf /var/lib/apt/lists/*
RUN cartographer/scripts/install_ceres.sh && rm -rf ceres-solver
RUN cartographer/scripts/install_cartographer.sh && rm -rf cartographer
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ project provides Cartographer's ROS integration.
Documentation
=============

You will find complete documentation for using Cartographer `our Read the Docs
site`_.
You will find complete documentation for using Cartographer at `our Read the
Docs site`_.

.. _our Read the Docs site: https://google-cartographer.readthedocs.io

Expand Down
44 changes: 14 additions & 30 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,33 +45,17 @@ Getting Started without ROS

On Ubuntu 14.04 (Trusty):

.. code-block:: bash
# Install the required libraries that are available as debs
sudo apt-get install \
g++ \
google-mock \
libboost-all-dev \
libgflags-dev \
libgoogle-glog-dev \
liblua5.2-dev \
libprotobuf-dev \
libsuitesparse-dev \
libwebp-dev \
ninja-build \
protobuf-compiler \
python-sphinx
# Build and install Ceres
git clone https://ceres-solver.googlesource.com/ceres-solver
cd ceres-solver
mkdir build && cd build
cmake ..
make
sudo make install
# Build Cartographer
cd cartographer
mkdir build && cd build
cmake .. -G Ninja
ninja
.. include:: ../../scripts/install_debs.sh
:code: bash
:number-lines:
:start-line: 19

.. include:: ../../scripts/install_ceres.sh
:code: bash
:number-lines:
:start-line: 19

.. include:: ../../scripts/install_cartographer.sh
:code: bash
:number-lines:
:start-line: 19
27 changes: 27 additions & 0 deletions scripts/install_cartographer.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/sh

# Copyright 2016 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 .. -G Ninja
ninja
ninja test
sudo ninja install
28 changes: 28 additions & 0 deletions scripts/install_ceres.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/sh

# Copyright 2016 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 Ceres.
git clone https://ceres-solver.googlesource.com/ceres-solver
cd ceres-solver
mkdir build
cd build
cmake .. -G Ninja
ninja
ninja test
sudo ninja install
37 changes: 37 additions & 0 deletions scripts/install_debs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/bin/sh

# Copyright 2016 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

# Install the required libraries that are available as debs.
sudo apt-get update
sudo apt-get install -y \
cmake \
g++ \
git \
google-mock \
libboost-all-dev \
libeigen3-dev \
libgflags-dev \
libgoogle-glog-dev \
liblua5.2-dev \
libprotobuf-dev \
libsuitesparse-dev \
libwebp-dev \
ninja-build \
protobuf-compiler \
python-sphinx
File renamed without changes.

0 comments on commit 9a303d0

Please sign in to comment.