Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI for building on Ubuntu #716 #756

Merged
merged 122 commits into from
Mar 18, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
122 commits
Select commit Hold shift + click to select a range
0226bbc
Update config.yml
Mar 8, 2019
a159397
Update config.yml
Mar 8, 2019
3893bb3
Update config.yml
Mar 8, 2019
72160a1
Update config.yml
Mar 8, 2019
af27f85
Update config.yml
Mar 8, 2019
40c4c06
Update config.yml
Mar 8, 2019
85486ef
Update config.yml
Mar 8, 2019
b23a91c
Update config.yml
Mar 8, 2019
3469c55
Update config.yml
Mar 8, 2019
a0f72f7
Update config.yml
Mar 8, 2019
dda365d
Update config.yml
Mar 8, 2019
428ccee
Update config.yml
Mar 8, 2019
941828d
Update config.yml
Mar 8, 2019
80db956
Update config.yml
Mar 8, 2019
bd20347
Update config.yml
Mar 8, 2019
531d4ee
Update config.yml
Mar 8, 2019
3583934
Update config.yml
Mar 8, 2019
a8070a5
Update config.yml
Mar 8, 2019
69f6b90
Update config.yml
Mar 8, 2019
41274c8
Update config.yml
Mar 8, 2019
8085644
Update config.yml
Mar 9, 2019
c27a9ca
Merge branch 'master' into master
raullenchai Mar 9, 2019
78f8292
Update config.yml
Mar 10, 2019
720326f
use xcode: "10.1.0"
Mar 10, 2019
1f9715e
add run dep ensure
Mar 10, 2019
a2e98d8
restore config.yml add test macos build
Mar 10, 2019
4aa189e
xcode 10.2
Mar 10, 2019
c2659f1
test macos 10.14
Mar 10, 2019
d432009
Update config.yml
Mar 10, 2019
ed0ef22
Update config.yml
Mar 10, 2019
d065a5b
Merge branch 'master' into master
raullenchai Mar 10, 2019
a92d4b2
Update config.yml
Mar 10, 2019
2aa287a
test macos sync s3
Mar 13, 2019
89dc3dd
change sync to put
Mar 13, 2019
d219f13
Update config.yml
Mar 13, 2019
fe61f09
test docker and macos use S3 var
Mar 14, 2019
f304e3a
Update config.yml
Mar 14, 2019
6543731
Update config.yml
Mar 14, 2019
daeafc7
test install s3
Mar 14, 2019
4fa43fd
Update install-cli.sh
Mar 14, 2019
d6cdd9d
merge
Mar 14, 2019
eae2ba7
Merge branch 'iotexproject-master'
Mar 14, 2019
0cfaebc
Update config.yml
Mar 14, 2019
dfce9cc
add ioctl deploy to S3
Mar 14, 2019
9e69fff
add --unstable specified download S3 ioctl
Mar 14, 2019
f12521e
change docker install awscli
Mar 14, 2019
f7b178e
Update config.yml
Mar 14, 2019
1dcb08e
Update config.yml
Mar 14, 2019
94c9b99
Update config.yml
Mar 14, 2019
b26bb64
Update config.yml
Mar 14, 2019
1caf3ff
Merge branch 'master' into master
raullenchai Mar 14, 2019
4847a2d
Merge branch 'master' into master
raullenchai Mar 14, 2019
290026a
Merge branch 'master' into master
raullenchai Mar 15, 2019
93cd65e
Merge pull request #2 from iotexproject/master
Mar 15, 2019
e1ec037
Update config.yml
Mar 15, 2019
b801b48
Update config.yml
Mar 15, 2019
2ceda15
Update config.yml
Mar 15, 2019
8e0c129
Update config.yml
Mar 15, 2019
b050c0f
Update config.yml
Mar 15, 2019
808f957
Update config.yml
Mar 15, 2019
005f698
Update config.yml
Mar 15, 2019
bf420c0
Update config.yml
Mar 15, 2019
06a0c91
Update config.yml
Mar 15, 2019
88f2c97
Update config.yml
Mar 15, 2019
65891f7
Update config.yml
Mar 15, 2019
4f2d23f
Update config.yml
Mar 15, 2019
9bea61b
Update config.yml
Mar 15, 2019
e29cdb5
Update config.yml
Mar 15, 2019
3cd36ea
Update config.yml
Mar 15, 2019
fa8efe6
Update config.yml
Mar 15, 2019
19d70c0
Update config.yml
Mar 15, 2019
74997d9
Update config.yml
Mar 15, 2019
01122de
update golang 1.11
Mar 15, 2019
6f59568
Update config.yml
Mar 15, 2019
745d6a6
Update config.yml
Mar 15, 2019
cafaab9
Update config.yml
Mar 15, 2019
93bb2b5
Update config.yml
Mar 15, 2019
d8b028c
Update config.yml
Mar 15, 2019
fd6720e
Update config.yml
Mar 15, 2019
fd74f6c
Update config.yml
Mar 15, 2019
5ef0eb1
Update config.yml
Mar 15, 2019
be3283f
Update config.yml
Mar 15, 2019
75a7d4f
macos change golang to 1.11.6
Mar 15, 2019
fc7dc9d
macos use curl
Mar 15, 2019
47bd8f4
Update config.yml
Mar 15, 2019
2d2846d
Update config.yml
Mar 15, 2019
2a205a4
Update config.yml
Mar 15, 2019
d8424c8
ok
Mar 15, 2019
142cc1a
nightly_ioctl_build_darwin install golang 1.11.6
Mar 15, 2019
ceda16d
Update config.yml
Mar 15, 2019
a01d0a6
Update config.yml
Mar 15, 2019
535e1b4
Merge branch 'master' into master
raullenchai Mar 16, 2019
82d9282
Update config.yml
Mar 16, 2019
015c983
use golang 1.11.5
Mar 16, 2019
24ff0f5
debug env
Mar 16, 2019
e74f6b3
return env
Mar 16, 2019
1982d75
return golang 1.11.6
Mar 16, 2019
f7ee2b5
enable build 3 test
Mar 16, 2019
64661a3
test buildcli
Mar 16, 2019
8c45daf
install libc6-dev-i386
Mar 16, 2019
ff4db1a
sudo apt-get install libc6-dev-i386
Mar 16, 2019
b6cc2b1
test release
Mar 16, 2019
55ac4eb
use pip install awscli
Mar 16, 2019
02b3821
aws sync
Mar 16, 2019
3b37594
test ioctl darwin
Mar 16, 2019
bdafb9d
test maocs ioctl
Mar 16, 2019
38c6273
Update config.yml
Mar 16, 2019
89b461b
Update config.yml
Mar 16, 2019
4ed467c
Update config.yml
Mar 16, 2019
165137d
Update config.yml
Mar 16, 2019
17df77d
Update config.yml
Mar 16, 2019
eb5be25
use requires ubuntu
Mar 16, 2019
66f3aaf
fix syntax
Mar 16, 2019
fe7948e
disable go build 386
Mar 17, 2019
e0d2d42
debug build ioctl
Mar 17, 2019
64852ec
debug ubuntu build
Mar 17, 2019
a2ed340
debug 3 build_test_*
Mar 17, 2019
6b126d6
Merge branch 'master' into feiren-dev
Mar 17, 2019
e2b77a5
Merge pull request #3 from feigu1984/feiren-dev
Mar 17, 2019
54e04dc
skip ubuntu
Mar 17, 2019
721e4e5
skil ubuntu
Mar 17, 2019
9431d0c
delete job build_test_ubuntu
Mar 18, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
156 changes: 82 additions & 74 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,115 +3,122 @@
# Check https://circleci.com/docs/2.0/language-go/ for more details
version: 2
jobs:
build:
build_test_docker:
docker:
# specify the version
- image: iotex/iotex-core-ci:latest

# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/
# - image: circleci/postgres:9.4

#### TEMPLATE_NOTE: go expects specific checkout path representing url
#### expecting it in the form of
#### /go/src/github.com/circleci/go-tool
#### /go/src/bitbucket.org/circleci/go-tool
working_directory: /go/src/github.com/iotexproject/iotex-core
steps:
- checkout

# specify any bash command here prefixed with `run: `
- run: golint -set_exit_status $(go list ./... | grep -v /vendor/ | grep -v /explorer/idl/ | grep -v /api/idl/)
- run: ./go.test.sh
- run: bash <(curl -s https://codecov.io/bash)
- run: go test -run=XXX -bench=. $(go list ./crypto)
- run: make minicluster

nightly-build:
docker:
# specify the version
- image: iotex/iotex-core-ci:latest

# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/
# - image: circleci/postgres:9.4
build_test_darwin:
macos:
xcode: "10.2.0" # not supported > 10.2.0
working_directory: ~/go/src/github.com/iotexproject/iotex-core

#### TEMPLATE_NOTE: go expects specific checkout path representing url
#### expecting it in the form of
#### /go/src/github.com/circleci/go-tool
#### /go/src/bitbucket.org/circleci/go-tool
working_directory: /go/src/github.com/iotexproject/iotex-core
steps:
- checkout

# specify any bash command here prefixed with `run: `
- run: make nightlybuild
- run: cd cli/ioctl/ && sh buildcli.sh
- run: sudo apt install awscli
- run:
name: Deploy to S3
command: aws s3 cp release/* ${S3_BUCKET_DIR}
name: install golang 1.11.6
command: |
curl -o go1.11.6.darwin-amd64.tar.gz https://dl.google.com/go/go1.11.6.darwin-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.11.6.darwin-amd64.tar.gz
- run:
name: SET GO ENV AND go.test.sh
command: |
export GOPATH=~/go
export GOROOT="/usr/local/go"
export LD_LIBRARY_PATH=:~/go/src/github.com/iotexproject/iotex-core/crypto/lib
export PATH=$PATH:$GOPATH/bin:$PATH:$GOROOT/bin
./go.test.sh
bash <(curl -s https://codecov.io/bash)
go test -run=XXX -bench=. $(go list ./crypto)
make minicluster

test_macos_build:
macos:
xcode: "10.2.0" # not supported > 10.2.0
build_test_ubuntu:
machine:
image: circleci/classic:latest
working_directory: ~/go/src/github.com/iotexproject/iotex-core

steps:
- checkout

- run:
name: Install golang / dep
name: clean go 1.9 update golang 1.11.6
command: |
brew install golang
wget https://dl.google.com/go/go1.11.6.linux-amd64.tar.gz
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -zxf go1.11.6.linux-amd64.tar.gz
- run:
name: SET GO ENV

name: SET GO ENV AND go.test.sh
command: |
export GOROOT="/usr/local/go"
export GOPATH=~/go
export GOROOT="$(brew --prefix golang)/libexec"
export LD_LIBRARY_PATH=:~/go/src/github.com/iotexproject/iotex-core/crypto/lib
export PATH=$PATH:$GOPATH/bin
export PATH=$PATH:$GOROOT/bin
set -e
for d in $(go list ./... | grep -v 'vendor\|protocol/vote'); do
go test -short -v -coverprofile=profile.out -covermode=count "$d"
if [ -f profile.out ]; then
cat profile.out >> coverage.txt
rm profile.out
fi
done
export LD_LIBRARY_PATH=:"/home/circleci/go/src/github.com/iotexproject/iotex-core/crypto/lib"
export PATH=$GOPATH/bin:$GOROOT/bin:$PATH
./go.test.sh
bash <(curl -s https://codecov.io/bash)
go test -run=XXX -bench=. $(go list ./crypto)
make minicluster
######################################################################
nightly_build_docker:
docker:
# specify the version
- image: iotex/iotex-core-ci:latest

working_directory: /go/src/github.com/iotexproject/iotex-core
steps:
- checkout
# specify any bash command here prefixed with `run: `
#- run: golint -set_exit_status $(go list ./... | grep -v /vendor/ | grep -v /explorer/idl/ | grep -v /api/idl/)
#- run: go env
#- run: dep ensure
#- run: ./go.test.sh
- run: bash <(curl -s https://codecov.io/bash)
- run: go test -run=XXX -bench=. $(go list ./crypto)
- run: make minicluster
- run: make nightlybuild

nightly_ioctl_build_docker:
docker:
# specify the version
- image: iotex/iotex-core-ci:latest

nightly-macos:
working_directory: /go/src/github.com/iotexproject/iotex-core
steps:
- checkout
- run: cd cli/ioctl/ && ./buildcli.sh
- run: sudo apt-get install python python-pip
- run: sudo pip install awscli
- run: aws s3 sync cli/ioctl/release/ ${S3_BUCKET_DIR}

nightly_ioctl_build_darwin:
macos:
xcode: "10.2.0" # not supported > 10.2.0
xcode: "10.2.0" # not supported > 10.2.0

working_directory: ~/go/src/github.com/iotexproject/iotex-core

steps:
- checkout
- run: cd cli/ioctl/ && sh buildcli.sh
- run: pip install awscli
- run:
name: Deploy to S3
command: aws s3 cp release/* ${S3_BUCKET_DIR}
name: install golang 1.11.6
command: |
curl -o go1.11.6.darwin-amd64.tar.gz https://dl.google.com/go/go1.11.6.darwin-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.11.6.darwin-amd64.tar.gz
- run:
name: SET GO ENV AND buildcli.sh
command: |
export GOPATH=~/go
export GOROOT="/usr/local/go"
export LD_LIBRARY_PATH=:~/go/src/github.com/iotexproject/iotex-core/crypto/lib
export PATH=$PATH:$GOPATH/bin:$PATH:$GOROOT/bin
cd cli/ioctl/ && ./buildcli.sh
sudo pip install awscli
aws s3 sync release/ ${S3_BUCKET_DIR}

workflows:
version: 2
commit:
jobs:
- build
- test_macos_build

- build_test_darwin
- build_test_docker

scheduled-workflow:
triggers:
- schedule:
Expand All @@ -121,5 +128,6 @@ workflows:
only:
- master
jobs:
- nightly-build
- nightly-macos
- nightly_build_docker
- nightly_ioctl_build_docker
- nightly_ioctl_build_darwin
2 changes: 1 addition & 1 deletion cli/ioctl/buildcli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ cd $(dirname $0)
gofmt -w ./

CGO_ENABLED=1 GOARCH=amd64 go build -o $release_dir/$project_name-$OS-amd64 -v .
CGO_ENABLED=1 GOARCH=386 go build -o $release_dir/$project_name-$OS-386 -v .
#CGO_ENABLED=1 GOARCH=386 go build -o $release_dir/$project_name-$OS-386 -v .