Changes between Version 1 and Version 2 of TravisCoverals
- Timestamp:
- Dec 18, 2014, 2:45:16 PM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TravisCoverals
v1 v2 1 '' THIS PAGE IS NOT FINISHED YET''1 '''Travis and Coveralls integration''' 2 2 3 We'll be adding TravisCI and Coveral ss 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].3 We'll be adding TravisCI and Coveralls 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 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: 5 Travis requires some access permissions to the repository that are usually provided by Boostorg Admins. However bothering Admins is actually not required: 8 6 * 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. 7 * press the "Fork" button at the top right corner. Now you have a copy of the boost project in your account. 11 8 * 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`:9 * add our forked repo as another remote host for default push: `git remote set-url --add origin git@github.com:<your_login>/lexical_cast.git`. If everything is right, you'll see something like this if you execute `git remote -v`: 13 10 {{{ 14 11 origin git@github.com:boostorg/lexical_cast.git (fetch) 15 12 origin git@github.com:boostorg/lexical_cast.git (push) 16 origin git@github.com: apolukhin/lexical_cast.git (push)13 origin git@github.com:<your_login>/lexical_cast.git (push) 17 14 }}} 18 * now add the `.travis.yml` file, set PROJECT_TO_TEST in it to the library name, tune the `README.md` and commit changes: 15 16 * log in into [https://travis-ci.org/# Travis] 17 * go to the [https://travis-ci.org/profile/] and enable builds for the forked project. 18 * log into [https://coveralls.io/ Coverals]. 19 * go to the [https://coveralls.io/repos/new] and add a forked repo. 20 21 * now add the `.travis.yml` file, tune the `README.md` and commit changes: 19 22 {{{ 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 cp ../variant/.travis.yml ./ # Copying .travis.yml from Boost.Variant 24 git add .travis.yml # Adding .travis.yml for next commit 23 25 24 cp ../variant/README.md ./ 25 sed -i 's/variant/lexical_cast/g' README.md 26 sed -i 's/apolukhin/<your login>/g' README.md27 gedit README.md 28 git add README.md 26 cp ../variant/README.md ./ # Copying README.md from Boost.Variant 27 sed -i 's/variant/lexical_cast/g' README.md # Replacing `variant` with `lexical_cast` 28 sed -i 's/apolukhin/<your_login>/g' README.md # Replace `apolukhin` login name wuth your own login name 29 gedit README.md # ... editing README.md in editor 30 git add README.md # Adding README.md for next commit 29 31 32 git commit -m "Travis and Coveralls integration" # Committing changes to GIT 33 git push # push changes to boostorg and forked repo using one command 30 34 }}} 35 36 37 That's it! If everything is done right, you'll see the build process going on TravisCI and after ~20 minutes results will be visible in README.md view on github.