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
Use your own
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
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
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:
- Forked cpp-expresion-parser repo in GitHub
- cpp-expression-parser builds in AppVeyor
- cpp-expression parser biicode block with its automatically published releases
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
set PATH=%PATH%;C:\MinGW\binand bii configure "MinGW Makefiles" at
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
language and compilerare 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.
installprovides the tools necessary to test our code with BIICODE.
script, creates, builds and runs the project and checks if the project successes.
after_successpart 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.