/
pipeline.yml
132 lines (122 loc) · 3.68 KB
/
pipeline.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
steps:
- label: go-docker
agents:
queue: "bigcores"
commands:
- cd go
- docker build .
- label: go-generate
plugins:
- n0izn0iz/docker#v3.5.4:
image: bertytech/protoc:22
propagate-uid-gid: true
workdir: /go/src/berty.tech
environment: ["GO111MODULE=on", "GOPATH=/go"]
volumes: ["~/go/pkg/mod:/go/pkg/mod"]
commands:
- go version
- find . -name gen.sum -delete
- cd go
- time go mod vendor
- make generate_local
- make tidy
- cd ../docs
- make generate_local
- cd ..
- git status | cat
- git diff -w | cat
- git diff-index -w --quiet HEAD --
- label: githooks
plugins:
- n0izn0iz/docker#v3.5.4:
image: bertytech/githooks:v1
propagate-uid-gid: true
workdir: /go/src/berty.tech
environment: ["GO111MODULE=on", "GOPATH=/go"]
commands:
- ./githooks/pre-commit
- git status | cat
- git diff -w | cat
- git diff-index -w --quiet HEAD --
- label: js-generate
plugins:
- n0izn0iz/docker#v3.5.4:
image: bertytech/protoc:22
propagate-uid-gid: true
workdir: /go/src/berty.tech
environment:
["GO111MODULE=on", "GOPATH=/go", "HOME=/home/buildkite-agent"]
volumes: ["~:/home/buildkite-agent", "~/go/pkg/mod:/go/pkg/mod"]
agents:
queue: "bigcores"
commands:
- cd js
- make gen.clean
- make gen
- cd ..
- git status | cat
- git diff -w | cat
- git diff-index -w --quiet HEAD --
- label: js-lint
plugins:
- n0izn0iz/docker#v3.5.4:
image: bertytech/protoc:22
propagate-uid-gid: true
workdir: /go/src/berty.tech
environment:
["GO111MODULE=on", "GOPATH=/go", "HOME=/home/buildkite-agent"]
volumes: ["~:/home/buildkite-agent", "~/go/pkg/mod:/go/pkg/mod"]
agents:
queue: "bigcores"
commands:
- cd js
- make lint
- label: go-build
key: go-build
plugins:
- n0izn0iz/docker#v3.5.4:
image: bertytech/protoc:22
propagate-uid-gid: true
workdir: /go/src/berty.tech
environment:
["GO111MODULE=on", "GOPATH=/go", "HOME=/home/buildkite-agent"]
volumes: ["~:/home/buildkite-agent", "~/go/pkg/mod:/go/pkg/mod"]
commands:
- set -x
- go version
- cd go
# TODO: cache $GOPATH/pkg/mod
- go mod download
# https://circleci.com/orbs/registry/orb/gotest/tools#commands-mod-tidy-check
- go mod tidy -v
- git --no-pager diff go.mod go.sum
- git --no-pager diff --quiet go.mod go.sum
- make go.install
- SKIP_SLOW_TESTS=1 make go.unittest GO_TEST_OPTS="-v -test.timeout=120s -count 10"
- SKIP_SLOW_TESTS=0 make go.unittest GO_TEST_OPTS="-v -test.timeout=120s -count 2"
- make tidy
# we can do this rm because we're in special queue
- rm -f /tmp/golangci-lint.lock
- make lint
- cd ..
- codecov -f ./go/coverage.txt
- label: bazel-go
plugins:
- n0izn0iz/docker#v3.5.4:
image: bertytech/bazel:0.29.1-buster-r3
propagate-uid-gid: true
workdir: /go/src/berty.tech
environment:
[
"GO111MODULE=on",
"GOPATH=/go",
"HOME=/home/buildkite-agent",
'BAZEL_CMD_ARGS=--test_output=errors --action_env="GTEST_COLOR=1"',
]
volumes: ["~:/home/buildkite-agent", "~/go/pkg/mod:/go/pkg/mod"]
commands:
- bazel --version
- go version
- cd go
- make bazel.unittest
- make bazel.build