Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
build/
CMakeCache.txt
CMakeFiles
CMakeScripts
Expand Down
52 changes: 52 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Source: https://github.com/boostorg/hana/blob/master/.travis.yml

# Sudo is required for installing recent versions of dependencies.
sudo: required

# Use C++ build environment.
language: cpp

# Protobuf requires g++ (see https://github.com/google/protobuf/blob/master/src/README.md)
compiler:
- gcc

# Cache dependencies to speed up the build.
cache:
directories:
- ${TRAVIS_BUILD_DIR}/deps/cmake
- ${TRAVIS_BUILD_DIR}/deps/protobuf

# Handle dependencies in separate directory.
before_install:
- DEPS_DIR="${TRAVIS_BUILD_DIR}/deps"
- mkdir -p "${DEPS_DIR}"
- cd "${DEPS_DIR}"

install:
# Install a recent version of CMake
- |
CMAKE_URL="https://cmake.org/files/v3.7/cmake-3.7.2-Linux-x86_64.tar.gz"
mkdir -p cmake
travis_retry wget --no-check-certificate --quiet -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C cmake
export PATH=${DEPS_DIR}/cmake/bin:${PATH}
# Install a recent version of the Protobuf
- |
PROTOBUF_URL="https://github.com/google/protobuf/releases/download/v3.2.0/protobuf-cpp-3.2.0.tar.gz"
mkdir -p protobuf
travis_retry wget --no-check-certificate --quiet -O - ${PROTOBUF_URL} | tar --strip-components=1 -xz -C protobuf
cd protobuf
./configure --prefix=/usr
make
sudo make install
# Change directory back to default build directory.
before_script:
- cd "${TRAVIS_BUILD_DIR}"

# Run the build script.
script:
- mkdir -p build
- cd build
- cmake ..
- cmake --build .