forked from google/certificate-transparency-go
/
.travis.yml
77 lines (67 loc) · 2.12 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
sudo: true # required for CI push into Kubernetes.
os: linux
dist: xenial
language: go
go: "1.11.x"
go_import_path: github.com/google/certificate-transparency-go
env:
global:
- GO111MODULE=on
- GOPROXY=https://proxy.golang.org
matrix:
- GOFLAGS=
- GOFLAGS=-race PRESUBMIT_OPTS="--no-linters"
- GOFLAGS= WITH_ETCD=true PRESUBMIT_OPTS="--no-linters --coverage"
- GOFLAGS=-race WITH_ETCD=true PRESUBMIT_OPTS="--no-linters"
# The CT integration tests do not currently use a pkcs11 key. This only tests the build.
- GOFLAGS='-race --tags=pkcs11' WITH_PKCS11=true PRESUBMIT_OPTS="--no-linters"
matrix:
fast_finish: true
cache:
directories:
- "$HOME/gopath/pkg/mod"
services:
- docker
- mysql
install:
- mkdir ../protoc
- |
(
cd ../protoc
wget https://github.com/google/protobuf/releases/download/v3.5.1/protoc-3.5.1-${TRAVIS_OS_NAME}-x86_64.zip
unzip protoc-3.5.1-${TRAVIS_OS_NAME}-x86_64.zip
)
- export PATH=$(pwd)/../protoc/bin:$PATH
- GOPROXY=direct go install
github.com/golangci/golangci-lint/cmd/golangci-lint
github.com/golang/protobuf/proto
github.com/golang/protobuf/protoc-gen-go
github.com/golang/mock/mockgen
go.etcd.io/etcd
go.etcd.io/etcd/etcdctl
before_script:
- bash $(go list -f '{{.Dir}}' github.com/google/trillian)/scripts/resetdb.sh --force
- ./scripts/resetctdb.sh --force
script:
- set -e
- cd $HOME/gopath/src/github.com/google/certificate-transparency-go
- ./scripts/presubmit.sh ${PRESUBMIT_OPTS}
- |
# Check re-generation didn't change anything
status=$(git status --porcelain | grep -v coverage) || :
if [[ -n ${status} ]]; then
echo "Regenerated files differ from checked-in versions: ${status}"
git status
git diff
exit 1
fi
- |
if [[ "${WITH_ETCD}" == "true" ]]; then
export ETCD_DIR="${GOPATH}/bin"
fi
- ./trillian/integration/integration_test.sh
- HAMMER_OPTS="--operations=1500" ./trillian/integration/ct_hammer_test.sh
- set +e
after_success:
- cp /tmp/coverage.txt .
- bash <(curl -s https://codecov.io/bash)