-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathjenkins.sh
executable file
·84 lines (68 loc) · 2.15 KB
/
jenkins.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#!/bin/bash
set -ex
PKG=github.com/loomnetwork/loomchain
# disable modules for now
export GO111MODULE=off
# setup temp GOPATH
export GOPATH=/tmp/gopath-$BUILD_TAG
export
export PATH=$GOPATH:$PATH:/var/lib/jenkins/workspace/commongopath/bin:$GOPATH/bin
export PKG_TRANSFER_GATEWAY=github.com/loomnetwork/loomchain/vendor/github.com/loomnetwork/transfer-gateway
LOOM_SRC=$GOPATH/src/$PKG
TG_DIR=$GOPATH/src/$PKG_TRANSFER_GATEWAY
mkdir -p $LOOM_SRC
rsync -r --delete . $LOOM_SRC
if [[ "$OSTYPE" == "linux-gnu" ]]; then
export CGO_CFLAGS="-I/usr/local/include/leveldb"
export CGO_LDFLAGS="-L/usr/local/lib/ -L/usr/lib/x86_64-linux-gnu/ -lsnappy"
#elif [[ "$OSTYPE" == "darwin"* ]]; then #osx
fi
cd $LOOM_SRC
make clean
make get_lint
GO111MODULE=off make deps
make # on OSX we don't need any C precompiles like cleveldb
make validators-tool
# build the oracles
cd $TG_DIR
PKG=$PKG_TRANSFER_GATEWAY make tgoracle
PKG=$PKG_TRANSFER_GATEWAY make tron_tgoracle
PKG=$PKG_TRANSFER_GATEWAY make loomcoin_tgoracle
PKG=$PKG_TRANSFER_GATEWAY make dposv2_oracle
PKG=$PKG_TRANSFER_GATEWAY make bsc_tgoracle
# move them to the loomchain dir to make post-build steps simpler
mv tgoracle $LOOM_SRC/tgoracle
mv tron_tgoracle $LOOM_SRC/tron_tgoracle
mv loomcoin_tgoracle $LOOM_SRC/loomcoin_tgoracle
mv bsc_tgoracle $LOOM_SRC/bsc_tgoracle
# don't care about dpos oracle, don't need to move it
# build the various loom node variants
cd $LOOM_SRC
make basechain
# copy the generic loom binary so it can be published later, the loom binary will be replaced by the
# gateway variant when make loom-gateway executes
cp loom loom-generic
make loom-gateway
cp loom loom-gateway
make loom-cleveldb
make basechain-cleveldb
# lint after building everything
make lint || true
make linterrors
export LOOM_BIN=`pwd`/loom
export LOOM_VALIDATORS_TOOL=`pwd`/e2e/validators-tool
export GORACE="log_path=`pwd`/racelog"
#make loom-race
#make test-race
# export LOOMEXE_PATH="../loom"
# export LOOMEXE_ALTPATH="../loom2"
# export CHECK_APP_HASH="true"
make test
##make test-no-evm
##make no-evm-tests
##make test-app-store-race
#setup & run truffle tests
cd e2e/tests/truffle
yarn
cd ../receipts
bash ./run_truffle_tests.sh