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

before_install:
    - git submodule init
    - git submodule update
    - cd cellframe-sdk
    - git submodule init
    - git submodule update
    - cd ..

script:
    - mkdir build
    - cd build
    - cmake -DBUILD_CELLFRAME_NODE_TESTS=ON ../
    - make
    - ctest
    - cpack
    - sudo dpkg -i *.deb
    - ls -laR /opt/cellframe-node
    - sudo /opt/cellframe-node/bin/cellframe-node-tool cert create cert0 sig_tesla
    - sudo service cellframe-node start
    - sudo systemctl status cellframe-node
    - sudo /opt/cellframe-node/bin/cellframe-node-cli wallet new -w wallet0
    - sudo /opt/cellframe-node/bin/cellframe-node-cli token_decl -net private -chain gdb token TOK1 total_supply 1000000000000000000000000 signs_total 1 signs_emission 1 certs cert0
    - sudo /opt/cellframe-node/bin/cellframe-node-cli token_emit -net private -chain_emission gdb -chain_base_tx gdb -addr $(sudo /opt/cellframe-node/bin/cellframe-node-cli wallet list| grep addr | awk '{print $2}' |tr -d "\n") -token TOK1 -certs cert0 -emission_value 123000000000000
    - sudo /opt/cellframe-node/bin/cellframe-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
    - libpython3-dev

