-
Notifications
You must be signed in to change notification settings - Fork 10
/
.gitlab-ci.yml
81 lines (69 loc) · 1.41 KB
/
.gitlab-ci.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
image: golang:1.11.0
variables:
BIN_NAME: chainspace
ARTIFACTS_DIR: artifacts
GO_PROJECT: chainspace.io/prototype
ARTIFACTS_BIN: ${CI_PROJECT_DIR}/${ARTIFACTS_DIR}/cmd/${GO_PROJECT}/${BIN_NAME}
cache:
paths:
- /apt-cache
- /go/src/github.com
- /go/src/golang.org
- /go/src/google.golang.org
- /go/src/gopkg.in
stages:
- test
- build
- deploy
before_script:
- echo $GOPATH
- mkdir -p /tmp/src/${GO_PROJECT} /go/src/_/builds/${GO_PROJECT}
- mkdir -p ${CI_PROJECT_DIR}/${ARTIFACTS_DIR}
- mkdir -p /go/src/${GO_PROJECT}
- cp -r ${CI_PROJECT_DIR}/* /go/src/${GO_PROJECT}/
- ln -s /tmp/src/${GO_PROJECT} /go/src/_/builds/${GO_PROJECT}
- cd /go/src/${GO_PROJECT}
- export ARTIFACTS_BIN=${ARTIFACTS_BIN}
unit_tests:
stage: test
script:
- make test
e2e_tests:
stage: test
script:
- apt-get update && apt-get install -y jq bc
- make install
- ./ci/blockmaniatest.sh
#race_detector:
# stage: test
# script:
# - make race
# FUTURE:
# Requires custom GCC based docker image
#
# memory_sanitizer:
# stage: test
# script:
# - make msan
code_coverage:
stage: test
script:
- make coverage
code_coverage_report:
stage: test
script:
- make coverhtml
only:
- master
#lint_code:
# stage: test
# script:
# - make lint
build_chainspace:
stage: build
script:
- make
artifacts:
paths:
- ${ARTIFACTS_DIR}
expire_in: 2 weeks