-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
31 lines (29 loc) · 743 Bytes
/
.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
variables:
GO_VERSION: "1.11"
stages:
- bench
- stat
bench:
stage: bench
image: golang:${GO_VERSION}
artifacts:
paths:
- bench.txt
script:
- go test -count 10 -bench . -benchmem > bench.txt
#
#benchstat:
# stage: stat
# image: golang:${GO_VERSION}
# cache:
# paths:
# - benchstat
# dependencies:
# - bench
# script:
# - |
# curl -fsSL -o artifacts.zip --header "JOB-TOKEN: ${CI_JOB_TOKEN}" \
# "https://gitlab.com/api/v4/projects/${CI_PROJECT_ID}/jobs/artifacts/master/download?job=bench"
# - python -m zipfile -e artifacts.zip prev
# - test -e ./benchstat || (go get -u golang.org/x/perf/cmd/benchstat && mv $GOPATH/bin/benchstat .)
# - ./benchstat prev/bench.txt bench.txt