sudo: required
language: c
compiler: gcc
dist: xenial
notifications:
  email: false

before_install:
    - git submodule init
    - git submodule update

script:
    - mkdir build
    - cd build
    - cmake -DBUILD_KELVIN_NODE_TESTS=ON ../
    - make
    - ctest
    - cpack
    - sudo dpkg -i *.deb
    - ls -laR /opt/kelvin-node
    - sudo /opt/kelvin-node/bin/kelvin-node-tool cert create cert0 sig_tesla
    - sudo service kelvin-node start
    - sudo systemctl status kelvin-node
    - sudo /opt/kelvin-node/bin/kelvin-node-cli wallet new -w wallet0
    - sudo /opt/kelvin-node/bin/kelvin-node-cli token_decl -net private -chain gdb token TOK1 total_supply 1000000000000000000000000 signs_total 1 signs_emission 1 certs cert0
    - sudo /opt/kelvin-node/bin/kelvin-node-cli token_emit -net private -chain_emission gdb -chain_base_tx gdb -addr $(sudo /opt/kelvin-node/bin/kelvin-node-cli wallet list| grep addr | awk '{print $2}' |tr -d "\n") -token TOK1 -certs cert0 -emission_value 123000000000000
    - sudo /opt/kelvin-node/bin/kelvin-node-cli mempool_proc -net private -chain gdb
addons:
  apt:
    sources:
    - ubuntu-toolchain-r-test
    packages:
    - libjson-c-dev
    - libev-dev
    - libmagic-dev
    - libldb-dev
    - libtevent-dev
    - libcurl4-gnutls-dev
    - debconf-utils
    - dconf-cli
    - pv
