zathras-crypto / omnicore

mastercore info

Home Page:mastercoin.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Please enable Travis CI

dexX7 opened this issue · comments

commented

Please enable Travis CI for automated testing, including pull requests. While this doesn't cover the RPC tests via bitcoin-spock, it does test six different build plattforms, a huge number of Bitcoin Core tests, and of course the unit tests.

Given the increased number of unit tests currently added, this becomes more and more relevant.

It takes 5 minutes and simply consists of a GitHub authentification. See: mastercoin-MSC#269 (comment)

Enabled for my mastercore repo, and flipped the 'build only if travis.yml is present' switch as suggested. What is this file and what should it contain?

commented

Yay, I love it! :)

Travis CI provides a similar service to what is intended by ci.omni.foundation. While Jenkins provides an extreme amount of options and choices, Travis CI is pretty simple and due to the previous work of Bitcoin Core, we already have a very well configurated setup.

The .travis file contains build and test instructions for Travis. With the current setup six builds are created for different plattforms, followed by the execution of unit tests and RPC tests for Bitcoin Core.

You enabled a link between your repo and Travis, and you should be able to trigger builds of the available branches here:

Furthermore, any pushes - from you or in form of a pull request - trigger also a build. As demonstration I pushed a new commit to one of my PRs:

travis_pr_check

When following that detail link, you'll see the current build in progress:

Once finished, the currently yollow box will either turn red, if something is broken, or green, to indicate the building and testing was successful.

If you take a look at the overview of my bitcoin branches, you can also see build result symbols for each branch, which link to the results:

travis_branches

commented

Soo.. the building and testing finished, indicating success, when looking at the PR:

travis_all_is_well

As well as in the detail view on the Travis website for that build:

travis_success_pr

The whole process took roughly 50-55 minutes in total (while 4 builds are executed in parallel, with a cumulative build time of about 3 hours).

Per single build, the maximum allowed time is 50 minutes, so we're pretty close to that limit, at least with the Windows builds. Unfortunally, due to this constraint, it's nearly impossible to do bitcoin-spock based testing via Travis as well. Yesterday, I tried to squeeze bitcoin-spock into the bitcoind build, which finishes after about 15 minutes, but I wasn't successful and the build stalled for some reason at some point.

While this is unfortunate, this was never intended to replace the testing via Jenkins and the Omni CI server, which can go much deeper (i.e. mainnet consensus testing), but it's an incredibly useful "first filter", especially because it also executes the Boost unit tests (for the linux based builds at least).

The Bitcoin Core team has a special agreement with Travis, to enable caching of some resources, which reduces the build times significantly:

But nevertheless.. this is pretty nice, right? :)

this is pretty nice, right? :)

This is awesome - thanks so much mate - I'll look into the nuts and bolts a bit more when I'm back at my desktop but yeah - this is pretty darn nice :)

commented

Awesome. If you get your hand on @achamely or @CraigSellars, please forward your impression, so it can be enabled for OmniLayer/omnicore as well - or at least discussed of course.