From a3477b6c16b2b6638dbe0652ea52901cbd6800d0 Mon Sep 17 00:00:00 2001 From: Anatoli Babenia Date: Tue, 25 Aug 2020 19:29:05 +0300 Subject: [PATCH] [travis] Move `go get` to Makefile Building `bls` in `go get` requires sourcing env vars --- .travis.yml | 10 +--------- Makefile | 4 ++++ scripts/travis_node_checker.sh | 0 3 files changed, 5 insertions(+), 9 deletions(-) mode change 100644 => 100755 scripts/travis_node_checker.sh diff --git a/.travis.yml b/.travis.yml index 285e842f6..f9bbedb0a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,20 +12,12 @@ install: # default working directory with source code is automatically set to # /home/travis/gopath/src/github.com/harmony-one/harmony # https://docs.travis-ci.com/user/languages/go/#go-import-path - - pwd - - export GO111MODULE=on - - export GOPATH=$HOME/gopath - - export CGO_CPPFLAGS="-I$GOPATH/src/github.com/harmony-one/bls/include -I$GOPATH/src/github.com/harmony-one/mcl/include" - - export CGO_LDFLAGS="-L$GOPATH/src/github.com/harmony-one/bls/lib -L$GOPATH/src/github.com/harmony-one/mcl/lib" - - export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$GOPATH/src/github.com/harmony-one/bls/lib:$GOPATH/src/github.com/harmony-one/mcl/lib - git clone https://github.com/harmony-one/mcl.git $HOME/gopath/src/github.com/harmony-one/mcl - git clone https://github.com/harmony-one/bls.git $HOME/gopath/src/github.com/harmony-one/bls - (cd $HOME/gopath/src/github.com/harmony-one/mcl; make -j4) - (cd $HOME/gopath/src/github.com/harmony-one/bls; make BLS_SWAP_G=1 -j4) - - go get -v ./... + - make go-get - scripts/install_build_tools.sh - - chmod +x scripts/travis_checker.sh - - chmod +x scripts/travis_node_checker.sh script: - ${TEST} after_success: diff --git a/Makefile b/Makefile index 612697de4..8510a46e3 100644 --- a/Makefile +++ b/Makefile @@ -62,6 +62,10 @@ clean: rm -f ./*.rlp rm -rf ~/rpmbuild +go-get: + source ./scripts/setup_bls_build_flags.sh + go get -v ./... + test: bash ./test/all.sh diff --git a/scripts/travis_node_checker.sh b/scripts/travis_node_checker.sh old mode 100644 new mode 100755