Changes between Version 1 and Version 2 of TravisCoverals


Ignore:
Timestamp:
Dec 18, 2014, 2:45:16 PM (8 years ago)
Author:
Antony Polukhin
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TravisCoverals

    v1 v2  
    1 ''THIS PAGE IS NOT FINISHED YET''
     1'''Travis and Coveralls integration'''
    22
    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].
     3We'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].
    44
    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:
     5Travis requires some access permissions to the repository that are usually provided by Boostorg Admins. However bothering Admins is actually not required:
    86* 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.
    118* 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`:
    1310{{{
    1411origin  git@github.com:boostorg/lexical_cast.git (fetch)
    1512origin  git@github.com:boostorg/lexical_cast.git (push)
    16 origin  git@github.com:apolukhin/lexical_cast.git (push)
     13origin  git@github.com:<your_login>/lexical_cast.git (push)
    1714}}}
    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:
    1922{{{
    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
     23cp ../variant/.travis.yml ./                       # Copying .travis.yml from Boost.Variant
     24git add .travis.yml                                # Adding .travis.yml for next commit
    2325
    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
     26cp ../variant/README.md ./                         # Copying README.md from Boost.Variant
     27sed -i 's/variant/lexical_cast/g' README.md        # Replacing `variant` with `lexical_cast`
     28sed -i 's/apolukhin/<your_login>/g' README.md      # Replace `apolukhin` login name wuth your own login name
     29gedit README.md                                    # ... editing README.md in editor
     30git add README.md                                  # Adding README.md for next commit
    2931
     32git commit -m "Travis and Coveralls integration"   # Committing changes to GIT
     33git push                                           # push changes to boostorg and forked repo using one command
    3034}}}
     35
     36
     37That'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.