| 1 | ''THIS PAGE IS NOT FINISHED YET'' |
| 2 | |
| 3 | We'll be adding TravisCI and Coveralss integration to a Boost library. Let's take a Boost.LexicalCast as an example. At the end we'll get [https://github.com/boostorg/variant#test-results something like this]. |
| 4 | |
| 5 | '''TravisCI integration''' |
| 6 | |
| 7 | Travis requires some access permissions to the repository that are usually provided by Boostorg admins. However bothering admins is actually not required: |
| 8 | * go to the Boost project page (in our example it would be [https://github.com/boostorg/lexical_cast]) |
| 9 | * press the "Fork" button at the top right corner |
| 10 | * now you have a copy of the boost project (in our example it is [https://github.com/apolukhin/lexical_cast]). Go to the [https://travis-ci.org/profile/] and enable builds for the forked project. |
| 11 | * clone the original boostorg repo or use an existing clone. Change directory to the clone folder (`cd boost_maintain/boost/libs/lexical_cast/`) |
| 12 | * add our forked repo as another remote host for default push: `git remote set-url --add origin git@github.com:apolukhin/lexical_cast.git`. If everything is right, you'll see something like this if you execute `git remote -v`: |
| 13 | {{{ |
| 14 | origin git@github.com:boostorg/lexical_cast.git (fetch) |
| 15 | origin git@github.com:boostorg/lexical_cast.git (push) |
| 16 | origin git@github.com:apolukhin/lexical_cast.git (push) |
| 17 | }}} |
| 18 | * now add the `.travis.yml` file, set PROJECT_TO_TEST in it to the library name, tune the `README.md` and commit changes: |
| 19 | {{{ |
| 20 | cp ../variant/.travis.yml ./ |
| 21 | sed -i 's/PROJECT_TO_TEST=.*/PROJECT_TO_TEST=lexical_cast/g' .travis.yml |
| 22 | git add .travis.yml |
| 23 | |
| 24 | cp ../variant/README.md ./ |
| 25 | sed -i 's/variant/lexical_cast/g' README.md |
| 26 | sed -i 's/apolukhin/<your login>/g' README.md |
| 27 | gedit README.md |
| 28 | git add README.md |
| 29 | |
| 30 | }}} |