From b9c1a1e232d448eba8a5f579fa1f3f4701f07508 Mon Sep 17 00:00:00 2001 From: Manuel Binna Date: Mon, 13 Feb 2017 20:17:45 +0100 Subject: [PATCH 1/7] Remove need for sudo Not using sudo is a good thing: it reduces boot time from 20-52s to 1-6s. See: https://docs.travis-ci.com/user/ci-environment/ --- .travis.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index ddb991694..2a1a1b94d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,5 @@ # 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 @@ -32,8 +29,8 @@ install: # 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" - if [ ! -f ${DEPS_DIR}/protobuf/src/.libs/protoc ] ; then 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 ; else cd protobuf ; fi - sudo make install + if [ ! -f ${DEPS_DIR}/protobuf/src/.libs/protoc ] ; then 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/local ; make ; else cd protobuf ; fi + make install # Change directory back to default build directory. before_script: From 4e647a5888168f80912eef95ab3704b8057f60e8 Mon Sep 17 00:00:00 2001 From: Manuel Binna Date: Mon, 13 Feb 2017 20:47:42 +0100 Subject: [PATCH 2/7] Install into directoy ${DEPS_DIR}/protobuf/install This directory is write-accessible. /usr/local is not. --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 2a1a1b94d..c13663465 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,8 +29,9 @@ install: # 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" - if [ ! -f ${DEPS_DIR}/protobuf/src/.libs/protoc ] ; then 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/local ; make ; else cd protobuf ; fi + if [ ! -f ${DEPS_DIR}/protobuf/src/.libs/protoc ] ; then mkdir -p protobuf ; travis_retry wget --no-check-certificate --quiet -O - ${PROTOBUF_URL} | tar --strip-components=1 -xz -C protobuf ; cd protobuf ; ./configure --prefix=${DEPS_DIR}/protobuf/install ; make ; else cd protobuf ; fi make install + export PATH=${DEPS_DIR}/protobuf/install/bin:${PATH} # Change directory back to default build directory. before_script: From bb4892159e960e8a3d5fd7929c319c2092dfec70 Mon Sep 17 00:00:00 2001 From: "Pierre R. Mai" Date: Mon, 13 Feb 2017 22:48:40 +0100 Subject: [PATCH 3/7] Adjust cache check and prefix dir to new location --- .travis.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index c13663465..b8444ad6c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,8 +29,7 @@ install: # 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" - if [ ! -f ${DEPS_DIR}/protobuf/src/.libs/protoc ] ; then mkdir -p protobuf ; travis_retry wget --no-check-certificate --quiet -O - ${PROTOBUF_URL} | tar --strip-components=1 -xz -C protobuf ; cd protobuf ; ./configure --prefix=${DEPS_DIR}/protobuf/install ; make ; else cd protobuf ; fi - make install + if [ ! -f ${DEPS_DIR}/protobuf/install/protoc ] ; then mkdir -p protobuf ; travis_retry wget --no-check-certificate --quiet -O - ${PROTOBUF_URL} | tar --strip-components=1 -xz -C protobuf ; cd protobuf ; ./configure --prefix=${DEPS_DIR}/protobuf/install ; make ; make install ; fi export PATH=${DEPS_DIR}/protobuf/install/bin:${PATH} # Change directory back to default build directory. @@ -41,7 +40,7 @@ before_script: script: - mkdir -p build - cd build - - cmake .. + - cmake -D CMAKE_PREFIX_PATH:PATH=${DEPS_DIR}/protobuf/install .. - cmake --build . - cd .. - python setup.py build From c1894dad2288c810fadf39fcdbd5069a45b5ced3 Mon Sep 17 00:00:00 2001 From: "Pierre R. Mai" Date: Mon, 13 Feb 2017 22:56:42 +0100 Subject: [PATCH 4/7] Fix cache check for new sudo-less ci build --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index b8444ad6c..15340300f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,7 +29,7 @@ install: # 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" - if [ ! -f ${DEPS_DIR}/protobuf/install/protoc ] ; then mkdir -p protobuf ; travis_retry wget --no-check-certificate --quiet -O - ${PROTOBUF_URL} | tar --strip-components=1 -xz -C protobuf ; cd protobuf ; ./configure --prefix=${DEPS_DIR}/protobuf/install ; make ; make install ; fi + if [ ! -f ${DEPS_DIR}/protobuf/install/bin/protoc ] ; then mkdir -p protobuf ; travis_retry wget --no-check-certificate --quiet -O - ${PROTOBUF_URL} | tar --strip-components=1 -xz -C protobuf ; cd protobuf ; ./configure --prefix=${DEPS_DIR}/protobuf/install ; make ; make install ; fi export PATH=${DEPS_DIR}/protobuf/install/bin:${PATH} # Change directory back to default build directory. From 00cefc14a84c3be17b9976be73ec0abdbce9b944 Mon Sep 17 00:00:00 2001 From: Carlo van Driesten Date: Tue, 14 Feb 2017 09:40:47 +0100 Subject: [PATCH 5/7] Update: Remove need for sudo PATH should not be overwritten! Changed: CMAKE_PREFIX_PATH:PATH=${DEPS_DIR}/protobuf/install .. To: CMAKE_PREFIX_PATH=${DEPS_DIR}/protobuf/install:${PATH} .. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 15340300f..7c3b9690a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -40,7 +40,7 @@ before_script: script: - mkdir -p build - cd build - - cmake -D CMAKE_PREFIX_PATH:PATH=${DEPS_DIR}/protobuf/install .. + - cmake -D CMAKE_PREFIX_PATH=${DEPS_DIR}/protobuf/install:${PATH} .. - cmake --build . - cd .. - python setup.py build From 0327c3b093d150fa2ffb3b5ed6444c9f54b07ff5 Mon Sep 17 00:00:00 2001 From: Carlo van Driesten Date: Tue, 14 Feb 2017 09:49:47 +0100 Subject: [PATCH 6/7] Update .travis.yml fix build fail --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 7c3b9690a..d77bee9ad 100644 --- a/.travis.yml +++ b/.travis.yml @@ -40,7 +40,7 @@ before_script: script: - mkdir -p build - cd build - - cmake -D CMAKE_PREFIX_PATH=${DEPS_DIR}/protobuf/install:${PATH} .. + - cmake -D CMAKE_PREFIX_PATH:PATH=${DEPS_DIR}/protobuf/install:${PATH} .. - cmake --build . - cd .. - python setup.py build From 92868491334cf16b041ebdd90d69790b43e79dd0 Mon Sep 17 00:00:00 2001 From: Carlo van Driesten Date: Tue, 14 Feb 2017 10:56:02 +0100 Subject: [PATCH 7/7] Update .travis.yml --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index d77bee9ad..15340300f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -40,7 +40,7 @@ before_script: script: - mkdir -p build - cd build - - cmake -D CMAKE_PREFIX_PATH:PATH=${DEPS_DIR}/protobuf/install:${PATH} .. + - cmake -D CMAKE_PREFIX_PATH:PATH=${DEPS_DIR}/protobuf/install .. - cmake --build . - cd .. - python setup.py build