3
3
build :
4
4
docker :
5
5
- image : ubuntu:latest
6
- working_directory : /root/go /src/github.com/singnet
6
+ working_directory : /root/singnet /src/github.com/singnet/platform-pipeline
7
7
environment :
8
- GOPATH : /root/go
9
- SINGNET_REPOS : /root/go /src/github.com/singnet
8
+ GOPATH : /root/singnet
9
+ SINGNET_REPOS : /root/singnet /src/github.com/singnet
10
10
steps :
11
11
- run :
12
12
name : Install tools
13
13
command : |
14
14
export PATH=$PATH:$GOPATH/bin
15
+ mkdir $GOPATH/download
16
+ cd $GOPATH/download
15
17
apt-get update
16
18
apt-get -y install sudo wget git
17
19
# Install NodeJS toolset
18
20
sudo apt-get -y install nodejs npm
19
- # install protobuf
21
+ # install Go tools
20
22
sudo apt-get -y install golang go-dep golang-goprotobuf-dev golint
21
23
# install IPFS
22
24
wget https://dist.ipfs.io/go-ipfs/v0.4.17/go-ipfs_v0.4.17_linux-amd64.tar.gz
23
25
tar xvfz go-ipfs_*.tar.gz
24
- cp ./go-ipfs/ipfs $GOPATH /bin
26
+ cp ./go-ipfs/ipfs /usr/local /bin
25
27
# Installl Python
26
28
sudo apt-get -y install python3 python3-pip
27
29
# Install other
28
30
sudo apt-get -y install libudev-dev libusb-1.0-0-dev
31
+ - run :
32
+ name : Build token-contracts
33
+ command : |
34
+ cd $SINGNET_REPOS
35
+ git clone https://github.com/singnet/token-contracts.git
36
+ cd token-contracts
37
+ npm install
38
+ npm run-script compile
39
+ npm run-script package-npm
29
40
- run :
30
41
name : Build platform-contracts
31
42
command : |
32
43
cd $SINGNET_REPOS
33
44
git clone https://github.com/singnet/platform-contracts.git
34
45
cd platform-contracts
35
- npm install
36
46
npm install ganache-cli
47
+ # install token-contracts from local dir
48
+ npm install $SINGNET_REPOS/token-contracts/build/npm-module
49
+ npm install
50
+ npm run-script compile
51
+ npm run-script package-npm
37
52
- run :
38
53
name : Build snet-cli
39
54
command : |
40
55
cd $SINGNET_REPOS
41
56
git clone https://github.com/singnet/snet-cli.git
42
57
cd snet-cli
58
+ # install token-contracts and platform-contracts from local dir
59
+ cd blockchain/
60
+ npm install $SINGNET_REPOS/token-contracts/build/npm-module
61
+ npm install $SINGNET_REPOS/platform-contracts/build/npm-module
62
+ cd ..
43
63
./scripts/blockchain install
44
64
pip3 install -e .
45
65
- run :
46
66
name : Build snet-daemon
47
67
command : |
48
68
export PATH=$PATH:$GOPATH/bin
49
- rm -rf $GOPATH/bin
50
69
cd $SINGNET_REPOS
51
70
git clone https://github.com/singnet/snet-daemon.git
52
71
cd snet-daemon
72
+ # install token-contracts and platform-contracts from local dir
73
+ cd resources/blockchain
74
+ npm install $SINGNET_REPOS/token-contracts/build/npm-module
75
+ npm install $SINGNET_REPOS/platform-contracts/build/npm-module
76
+ cd ../..
53
77
./scripts/install
54
78
./scripts/build linux amd64
55
79
- run :
59
83
cd $SINGNET_REPOS
60
84
git clone https://github.com/singnet/example-service.git
61
85
cd example-service
62
- pip3 install -r requirements.txt
86
+ pip3 install -r requirements.txt
87
+ - checkout
88
+ - run :
89
+ name : Run integration tests
90
+ command : |
91
+ export PATH=$PATH:$GOPATH/bin
92
+ mkdir $GOPATH/log
93
+ go get github.com/DATA-DOG/godog/cmd/godog
94
+ # Disable TensorFlow warnings wich pollute example-service log file
95
+ export TF_CPP_MIN_LOG_LEVEL=2
96
+ godog
0 commit comments