Author Topic: Automated build and test server for graphene  (Read 2493 times)

0 Members and 1 Guest are viewing this topic.

Offline cryptosile

  • Full Member
  • ***
  • Posts: 56
    • View Profile
I'm taking a look now.

#Update1
It had some weird error about not having dependencies.  I'd just try running it again or try it without either of the --make options, by default it will build both cli and witness.

Just running again with no options worked for me.  I'll see if I can do anything to avoid the make error in the future.  That will take some more investigating.

try:
Code: [Select]
sudo docker run -v /home/clayop:/build sile16/graphene-build
#Update 2
It looks like the combo of -j4 and specifying both cli and witness is what breaks some dependency in the make process.  I did two things:
I made the default script to not specify -j4 .  Going for less speed but more dependable.  I added an option to specify the jobs for the people who want to speed up the build process.  I also change the target selection so by default it builds all unless you just want to specify a single target.

with these two changes I don't think this problem can happen for anyone else.


« Last Edit: August 17, 2015, 12:52:02 am by cryptosile »

Offline clayop

  • Hero Member
  • *****
  • Posts: 2033
    • View Profile
    • Bitshares Korea
  • BitShares: clayop
Got an error... I ran

Code: [Select]
sudo docker run -v /home/clayop:/build sile16/graphene-build --make_cli_wallet --make_witness_node

Code: [Select]
[ 65%] Built target graphene_net
make[1]: *** [programs/cli_wallet/CMakeFiles/cli_wallet.dir/rule] Error 2
make: *** [cli_wallet] Error 2
running ['/usr/bin/git', 'clone', 'https://github.com/cryptonomex/graphene.git']
running: /usr/bin/git submodule update --init --recursive
running /usr/bin/git pull --recurse-submodules origin master
['/usr/bin/cmake', '-DBOOST_ROOT="/usr/local/"', '-DCMAKE_BUILD_TYPE=Debug', '.']
['/usr/bin/make', '-j4', 'cli_wallet', 'witness_node']
Bitshares Korea - http://www.bitshares.kr
Vote for me and see Korean Bitshares community grows
delegate-clayop


Offline ElMato

  • Sr. Member
  • ****
  • Posts: 288
    • View Profile

Offline sudo

  • Hero Member
  • *****
  • Posts: 2255
    • View Profile
  • BitShares: ags

Offline cryptosile

  • Full Member
  • ***
  • Posts: 56
    • View Profile
yeah, I can do that tonight probably.  It already looks at the return code and colors the test box green if the return code is 0 for all test passed.  If it's red 1 or more tests failed.  You can click the log link to look at the full build log or individual test logs. 

I can probably make the test cell link directly to it corresponding log and also on failure report the # of failed tests.

Offline bytemaster

This is definitely Brownie.PTS worthy! Very useful codebase. Many thanks for your contributions.

I agree!  Some major Brownie.PTS heading your way.   

May I request that you run ./tests/chain_tests and report the number of pass/failure and duration? 
For the latest updates checkout my blog: http://bytemaster.bitshares.org
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

Offline Fox

This is definitely Brownie.PTS worthy! Very useful codebase. Many thanks for your contributions.
Witness: fox

Offline cass

  • Hero Member
  • *****
  • Posts: 4311
  • /(┬.┬)\
    • View Profile
█║▌║║█  - - -  The quieter you become, the more you are able to hear  - - -  █║▌║║█

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
wow .. this is cool ..
I always though that is what "travis" is doing .. but never took a closer look as to why graphene seems to not use it ..

Offline cryptosile

  • Full Member
  • ***
  • Posts: 56
    • View Profile
I started off by making this docker build box: https://hub.docker.com/r/sile16/graphene-build/

After that I thought, it can't be too hard to automate the build process so when a new commit hits github I'll run the build capture the output and print to html.  Took about 10 times longer than it probably should but here it is:

https://www.everydaycrypto.com/?page_id=107

Every 5 minutes my server checks for a new commit, will download build and update the webpage with the results.  It also builds docker images once a day for the witness node and cli, but those aren't quite ready for use as I still need to tweak the docker configs to allow the correct ports through etc.  But theoretically i'll be able to deploy witness nodes from the auto generated docker images:

https://hub.docker.com/r/sile16/graphene-cli/
and
https://hub.docker.com/r/sile16/graphene-witness/

Once we actually have a taged release on github for graphene those tags should propagate into the docker image as tags.   I'd like to do this for the testnet / devshares as well but not sure what github repo will be used for that whether bitshares/devshares will be used or cryptonomex/devshares   ... 

I'm new to all this docker stuff so if you have a good idea how to make it better let me know.

Oh,, and all the code i'm using the automate the build process is at: https://github.com/sile16/bts2

I'm sure someone is going to tell me you can do this with jenkins in like 2 lines of code or something.....  hahaha