Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
142 lines (77 sloc) 7.24 KB

Continuous Integration


AppVeyor provides Continuous Integration and Deploy for Windows and it is compatible with both GitHub and Bitbucket.

Place an appveyor.yml file in your repository and each time you push to your Github repository it will kick-off a new build in Windows, executing your tests and publishing it as a biicode block into your biicode user account.

Login AppVeyor and click on + NEW PROJECT and choose the repository you want to deploy with. Create an appveyor.yml file in your local project to automatically publish your block to biicode, including your version tags, here's an example file:

.. literalinclude:: /_static/code/cpp/integration/appveyor-basic.yml
   :language: text

Encrypt your biicode password and your access token using Encrypt Data tool, copy the values generated and put them it in your environment like secured_password: secure:. Use your own test_script and environment values to start deploying with it.

Here's an appveyor guide about how to Git push from Appveyor Build. Following this Appveyor Guide we're using it as credentials with Git commands. Use this GitHub guide to create your GitHub Personal Access Token. This is a full appveyor.yml file to automatically publish to biicode DEV and STABLE versions:

.. literalinclude:: /_static/code/cpp/integration/appveyor.yml
   :language: text

What's going on the appveyor.yml file?

  • install: This part installs all tools required to deploy your biicode projects in AppVeyor.
  • before_build: Moves your project's files into the biicode project and configures it to use Visual Studio 12 via bii configure. Check biicode docs and your project's settings in Appveyor to use other build configurations. Also note that there's a commented line here you should also write if your project contains folders.
  • test_script: cd bin and execute your project. Ensure about your project's executable, build and execute it locally with bii build.
  • deploy_script: This script publishes your block to biicode, including your version tag only when it's tagged.
  • on_success: If your biicode.conf file is updated commit its changes to github without launching a new build. Else do nothing.
  • environment: Replace all environment variables here with your values: project_name, tag, default version tag value... Also your encrypted variables.

You can see this example live:

Learn more about AppVeyor visiting their docs.

  • Here's a blog-post about using Appveyor CI and Deploy for Windows.
  • MinGW compiler is already installed in Appveyor, just include it in the Path at install section: set PATH=%PATH%;C:\MinGW\bin and bii configure "MinGW Makefiles" at before_build section.

Travis CI

Travis CI takes care of running your tests and deploying your apps. Like we work with VCS, many of the blocks published in our web have their .travis.yml files, that lets us pushing to our GitHub repository, and automatically build in Linux, execute and publish this project with your biicode user account thanks to this excellent service.

If you're working with it, the .travis.yml file format will help to automatically publish to your biicode account with DEV tag:

.. literalinclude:: /_static/code/cpp/integration/travis-basic.yml
   :language: text

Here's a way to automatically publish to your biicode account with DEV tag unless your github repository is tagged, in this case, imports the tag and publishes as STABLE to biicode:

.. literalinclude:: /_static/code/cpp/integration/travis.yml
   :language: text

What's going on the .travis.yml file?

  • language and compiler are totally clear (this is where you choose the language and compiler that Travis CI will use).
  • before_installing, stablishes our automatic commit must be ignored and configures git to push later, on the after_success part.
  • install provides the tools necessary to test our code with BIICODE.
  • script, creates, builds and runs the project and checks if the project successes.
  • after_success part is to publish your project to biicode as STABLE with VERSION_TAG if tagged in github, otherwise it publishes as DEV. Also, if your biicode.conf file is updated, this commits its changes to github without launching a new build.
  • env: replace all environment values with your own ones. Don’t delete the *travis* text, as it is the one needed to specify that commit should skip build, avoiding entering an endless build loop.

To learn more about Travis using C++ language, visit its documentation.

Check our biicode's forum and/or StackOverflow tag for questions and answers. You can also write us for suggestions and feedback.