Skip to content

Commit 775d454

Browse files
committed
Restructure travis.yml
1 parent fbd2555 commit 775d454

File tree

1 file changed

+19
-8
lines changed

1 file changed

+19
-8
lines changed

.travis.yml

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,29 @@
11
# Source: https://github.com/boostorg/hana/blob/master/.travis.yml
22

3+
# Sudo is required for installing recent versions of dependencies.
4+
sudo: required
5+
6+
# Use C++ build environment.
37
language: cpp
4-
sudo: true
8+
9+
# Creates a matrix build job to build the product with the different compilers.
510
compiler:
611
- clang
712
- gcc
8-
addons:
9-
apt:
10-
sources:
11-
- ubuntu-toolchain-r-test
13+
14+
# Cache dependencies to speed up the build.
1215
cache:
1316
directories:
1417
- ${TRAVIS_BUILD_DIR}/deps/cmake
1518
- ${TRAVIS_BUILD_DIR}/deps/protobuf
16-
install:
19+
20+
# Handle dependencies in separate directory.
21+
before_install:
1722
- DEPS_DIR="${TRAVIS_BUILD_DIR}/deps"
18-
- mkdir -p "${DEPS_DIR}" && cd "${DEPS_DIR}"
23+
- mkdir -p "${DEPS_DIR}"
24+
- cd "${DEPS_DIR}"
1925

26+
install:
2027
# Install a recent version of CMake
2128
- |
2229
CMAKE_URL="https://cmake.org/files/v3.7/cmake-3.7.2-Linux-x86_64.tar.gz"
@@ -32,9 +39,13 @@ install:
3239
cd protobuf
3340
./configure --prefix=/usr
3441
make
35-
make install
42+
sudo make install
43+
44+
# Change directory back to default build directory.
3645
before_script:
3746
- cd "${TRAVIS_BUILD_DIR}"
47+
48+
# Run the build script.
3849
script:
3950
- mkdir build
4051
- cd build

0 commit comments

Comments
 (0)