From f640dc209ec0ac25d438f8c137907381a7921d3d Mon Sep 17 00:00:00 2001 From: Alexander Scherbatiy Date: Wed, 12 Sep 2018 10:12:52 +0300 Subject: [PATCH 1/3] Add initial circleci config file --- .circleci/config.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..94ae75c --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,30 @@ +version: 2 +jobs: + build: + docker: + - image: circleci/golang:1.9-node + working_directory: /go/src/github.com/singnet + environment: + SINGNET_REPOS: /go/src/github.com/singnet + steps: + - run: + name: Install tools + command: | + # install protobuf + sudo apt-get -y install golang-goprotobuf-dev golint + # install IPFS + wget https://dist.ipfs.io/go-ipfs/v0.4.17/go-ipfs_v0.4.17_linux-amd64.tar.gz + tar xvfz go-ipfs_*.tar.gz + cp ./go-ipfs/ipfs $GOPATH/bin + # Installl Python + sudo apt-get -y install python3 python3-pip + # Install other + sudo apt-get -y install libudev-dev libusb-1.0-0-dev + - run: + name: Build platform-contracts + command: | + cd $SINGNET_REPOS + git clone https://github.com/singnet/platform-contracts.git + cd platform-contracts + npm install + npm install ganache-cli From a9aaffa100f1ee01f11799217a94be4dc4867485 Mon Sep 17 00:00:00 2001 From: Alexander Scherbatiy Date: Wed, 12 Sep 2018 17:07:45 +0300 Subject: [PATCH 2/3] Use ubuntu:latest image and build snet-cli, snet-daemon, and example-service in circleci config file --- .circleci/config.yml | 40 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 36 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 94ae75c..44baefa 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,16 +2,22 @@ version: 2 jobs: build: docker: - - image: circleci/golang:1.9-node - working_directory: /go/src/github.com/singnet + - image: ubuntu:latest + working_directory: /root/go/src/github.com/singnet environment: - SINGNET_REPOS: /go/src/github.com/singnet + GOPATH: /root/go + SINGNET_REPOS: /root/go/src/github.com/singnet steps: - run: name: Install tools command: | + export PATH=$PATH:$GOPATH/bin + apt-get update + apt-get -y install sudo wget git + # Install NodeJS toolset + sudo apt-get -y install nodejs npm # install protobuf - sudo apt-get -y install golang-goprotobuf-dev golint + sudo apt-get -y install golang go-dep golang-goprotobuf-dev golint # install IPFS wget https://dist.ipfs.io/go-ipfs/v0.4.17/go-ipfs_v0.4.17_linux-amd64.tar.gz tar xvfz go-ipfs_*.tar.gz @@ -28,3 +34,29 @@ jobs: cd platform-contracts npm install npm install ganache-cli + - run: + name: Build snet-cli + command: | + cd $SINGNET_REPOS + git clone https://github.com/singnet/snet-cli.git + cd snet-cli + ./scripts/blockchain install + pip3 install -e . + - run: + name: Build snet-daemon + command: | + export PATH=$PATH:$GOPATH/bin + rm -rf $GOPATH/bin + cd $SINGNET_REPOS + git clone https://github.com/singnet/snet-daemon.git + cd snet-daemon + ./scripts/install + ./scripts/build + - run: + name: Build example-service + command: | + export PATH=$PATH:$GOPATH/bin + cd $SINGNET_REPOS + git clone https://github.com/singnet/example-service.git + cd example-service + pip3 install -r requirements.txt \ No newline at end of file From 887c2bbfdfc82409c613ee3ae87c741bc78dd677 Mon Sep 17 00:00:00 2001 From: Alexander Scherbatiy Date: Mon, 17 Sep 2018 16:41:27 +0300 Subject: [PATCH 3/3] build linux amd64 for snet-daemon --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 44baefa..2a835c6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -51,7 +51,7 @@ jobs: git clone https://github.com/singnet/snet-daemon.git cd snet-daemon ./scripts/install - ./scripts/build + ./scripts/build linux amd64 - run: name: Build example-service command: |