This repository has been archived by the owner on Jul 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 20
/
.travis.yml
132 lines (120 loc) · 3.51 KB
/
.travis.yml
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
matrix:
include:
- &ft_job
language: go
go: 1.13.x
dist: bionic
addons:
apt:
packages:
- python3-pip
- parallel
- g++-6
- gcc-6
- bzr
- build-essential
cache:
apt: true
directories:
- $CACHE_DIR
- $HOME/.cache/pip
- $HOME/.cache/go-build
- $HOME/gopath/pkg/mod
before_install:
- export GO111MODULE=on
- export GOPRIVATE=github.com/coinexchain/*
- export GOROOT=$(go env GOROOT)
- export CXX="g++-6" CC="gcc-6"
- export PATH=$PATH:$HOME/gopath/bin
install:
- cd -
- go env
#- pip3 install --upgrade pip
- python3 --version
- pip3 --version
#- pip3 install pipenv
#- pipenv --version
- pip3 install setuptools
- go get github.com/rakyll/statik
- go mod tidy
- go mod vendor
- make statik-swagger
- make build-linux
services:
- docker
after_success:
- rm ~/.docker/config.json
env:
global:
- CACHE_DIR=$HOME/.cache/docker
script:
- docker build . --tag=coinexchain/cetdtest
- scripts/functional_test.sh 4 0
- <<: *ft_job
script:
- docker build . --tag=coinexchain/cetdtest
- scripts/functional_test.sh 4 1
- <<: *ft_job
script:
- docker build . --tag=coinexchain/cetdtest
- scripts/functional_test.sh 4 2
- <<: *ft_job
script:
- docker build . --tag=coinexchain/cetdtest
- scripts/functional_test.sh 4 3
- <<: *ft_job
script:
- docker build . --tag=coinexchain/cetdtest
- scripts/functional_test.sh -3 0
- <<: *ft_job
script:
- docker build . --tag=coinexchain/cetdtest
- scripts/functional_test.sh -3 1
- <<: *ft_job
script:
- docker build . --tag=coinexchain/cetdtest
- scripts/functional_test.sh -3 2
- language: go
go: 1.13.x
dist: bionic
addons:
apt:
packages:
- g++-6
- gcc-6
cache:
apt: true
directories:
- $HOME/.cache/go-build
- $HOME/gopath/pkg/mod
after_success:
- $HOME/gopath/bin/goveralls -coverprofile=coverage.out -service=travis-pro -repotoken $COVERALLS_TOKEN
before_install:
- curl https://glide.sh/get | sh
- curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b $(go env GOPATH)/bin v1.20.0
# todo cache apt package
# - sudo -E apt-get -yq --no-install-suggests --no-install-recommends install g++-6 gcc-6
- export GO111MODULE=on
- export GOPRIVATE=github.com/coinexchain/*
- export GOROOT=$(go env GOROOT)
- export CXX="g++-6" CC="gcc-6"
- export PATH=$PATH:$HOME/gopath/bin
install:
- cd -
- go mod tidy
- go mod vendor
- echo $PWD
- go get golang.org/x/tools/cmd/cover
- go get github.com/mattn/goveralls
- wget https://github.com/facebook/rocksdb/archive/v6.6.4.tar.gz
- tar -xzvf v6.6.4.tar.gz && cd rocksdb-6.6.4
- pwd
- mkdir build && cd build && cmake .. && make -j4 && sudo make install
- cd ../..
- echo $PWD
script:
- RUN_IN_TRAVIS=true ./scripts/check.sh
notifications:
email:
on_success: change
on_failure: always