Last Updated: February 25, 2016
·
1.87K
· qubyte

Boost sandbox code and Travis CI.

See for example: https://github.com/qubyte/QuantumBoosty

Boost is very large, and the sandbox similarly so. If you want to use boost and boost sandbox with Travis, then it's best to install boost with apt-get, and acquire the sandbox modules you need only.

Travis CI makes an debian style system available for use in testing. Boost can be installed in the usual way

sudo apt-get install libboost-dev

I wanted to install the odeint sandbox package for the linked code, and it's available from a git repository.

clone --depth 1 git://github.com/headmyshoulder/odeint-v2.git

Finally, all that needs to be done is to copy the relevant parts of odeint to their places in boost.

sudo cp -r odeint-v2/boost/numeric/odeint/ /usr/include/boost/numeric/odeint
sudo cp -r odeint-v2/boost/numeric/odeint.hpp /usr/include/boost/numeric/odeint.hpp

Following the above, code may compile with boost and odeint. The yml file I used was:

language:
  - cpp
compiler:
  - g++
  - clang++
before_install:
  - sudo apt-get install libboost-dev
  - git clone --depth 1 git://github.com/headmyshoulder/odeint-v2.git
  - sudo cp -r odeint-v2/boost/numeric/odeint/ /usr/include/boost/numeric/odeint
  - sudo cp -r odeint-v2/boost/numeric/odeint.hpp /usr/include/boost/numeric/odeint.hpp
  - git clone --depth 1 git://github.com/qubyte/QuantumBoosty.git
  - cd QuantumBoosty
script:
  - $CXX two_level.cpp -o two_level
  - ./two_level