How to use the latest boost in Travis CI?

I tried to install boost 1.64

in Travis CI environment in several ways. But none of them succeeded. In my first naive attempt, I just added the following line to the travis script:

install:
  - sudo apt-get install libboost1.64-all-dev

      

This resulted in an error: Unable to find package libboost1.64-all-dev

In the second attempt, I specified the repository with the required version boost

.

before_install:
  - sudo add-apt-repository -y ppa:nschloe/boost-nightly
  - sudo apt-get update -qq
install:
  - sudo apt-get install libboost-all-dev
  # - sudo apt-get install libboost1.64-all-dev (also tried)

      

In the first case, the default setting boost

(1.54) was installed . In the second case, the result was the same error message: Unable to find package libboost1.64-all-dev

On a third attempt, I manually typed in the instructions to install boost

:

install:
  - sudo wget -O boost_1_64_0.tar.gz http://sourceforge.net/projects/boost/files/boost/1.64.0/boost_1_64_0.tar.gz/download
  - sudo tar xzvf boost_1_64_0.tar.gz
  - cd boost_1_64_0/
  - sudo ./bootstrap.sh --prefix=/usr/local
  - sudo ./b2
  - sudo ./b2 install 

      

As a result, my script took over 30 minutes, then was interrupted. Is there an easy (or just working) way to install other than the standard version for Travis CI?

+3


source to share


2 answers


To see what all packages are available (for example, when adding an additional repository), you can run the "search in ket" command, for example:

sudo apt-cache search libboost

      

Then you can see the available versions.

When created manually, by default it creates "everything" (all static / shared debug / release libs), which is time consuming and therefore may time out.



You can try to build only the libraries you really need, for reference:

./bootstrap.sh --with-libraries=program_options,filesystem,system
./b2 link=shared threading=multi variant=release

      

(see here http://www.boost.org/build/doc/html/bbv2/overview/invocation.html for details )

+4


source


I ran into the same issue and limiting the command information output showed it to be a trick.

Three that flood the magazine:



    - tar -xzf boost_1_64_0.tar.gz
    - ./b2 -d0
    - ./b2 install -d0

      

+1


source







All Articles