-
Notifications
You must be signed in to change notification settings - Fork 385
/
Copy path.travis.yml
65 lines (57 loc) · 1.65 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
sudo: false
language: go
os:
- linux
go:
- 1.7.1
env:
- GOFLAGS=
- GOFLAGS=-race
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-4.8
- g++-4.8
install:
- |
if [ ! -d $HOME/gopath/src/github.com/google ]; then
mkdir -p $HOME/gopath/src/github.com/google
ln -s $TRAVIS_BUILD_DIR $HOME/gopath/src/github.com/google/trillian
fi
- mkdir protoc
- |
(
cd protoc
wget https://github.com/google/protobuf/releases/download/v3.0.0/protoc-3.0.0-${TRAVIS_OS_NAME}-x86_64.zip
unzip protoc-3.0.0-${TRAVIS_OS_NAME}-x86_64.zip
)
- export PATH=$(pwd)/protoc/bin:$PATH
- go get -d ./...
- if [[ $TRAVIS_OS_NAME == "osx" ]]; then brew update > /dev/null && brew install mariadb && mysql.server start; fi
- go get -u github.com/client9/misspell/cmd/misspell
- go get -u github.com/fzipp/gocyclo
- go get -u github.com/gordonklaus/ineffassign
- go get -u github.com/golang/lint/golint
- go get -u github.com/golang/protobuf/proto
- go get -u github.com/golang/protobuf/protoc-gen-go
- go get -u github.com/kisielk/errcheck
- go install github.com/golang/{mock/mockgen,protobuf/protoc-gen-go}
script:
- export CXX="g++-4.8"
- export CC="gcc-4.8"
- ./scripts/presubmit.sh
- |
# Check re-generation didn't change anything
status=$(git status --porcelain) || :
if [[ -n ${status} ]]; then
echo "Regenerated files differ from checked-in versions: ${status}"
git status
git diff
exit 1
fi
- ./integration/integration_test.sh
services: mysql
before_script:
- yes | ./scripts/resetdb.sh