From 1a25a34c5dd117409771414d5b0e2ebf5ddd15fd Mon Sep 17 00:00:00 2001 From: Stephen J Day Date: Fri, 5 Dec 2014 19:04:00 -0800 Subject: [PATCH] Use circleci for continuous builds --- circle.yml | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 circle.yml diff --git a/circle.yml b/circle.yml new file mode 100644 index 000000000..96fa911a2 --- /dev/null +++ b/circle.yml @@ -0,0 +1,63 @@ +machine: + pre: + - curl -o go.tar.gz -sL https://golang.org/dl/go1.4rc2.linux-amd64.tar.gz + - sudo rm -rf /usr/local/go + - sudo tar -C /usr/local -xzf go.tar.gz + - sudo chmod a+w /usr/local/go/src/ + + hosts: + fancy: 127.0.0.1 + +dependencies: + post: + - go get github.com/axw/gocov/gocov + - go get github.com/mattn/goveralls + - go get github.com/golang/lint/golint + +test: + pre: + - go version + override: + - test -z $(gofmt -s -l . | tee /dev/stderr) + - go vet ./... + - test -z $(golint ./... | tee /dev/stderr) + - go test -race -test.v ./...: + timeout: 600 + + # TODO(stevvooe): The following is an attempt at using goveralls but it + # just doesn't work. goveralls requires a single profile file to be + # submitted at once, but can't run all of the tests for all the packages + # at once. The command below attempts to fix this but fails because it + # creates a new "job" for run of coveralls, making it so that the coverage + # is partially reported a large number of times. + + # - cd $HOME/.go_project/src/github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME && go list ./... | xargs -I{} goveralls -service circleci -repotoken $COVERALLS_TOKEN -race {} + +general: + branches: + ignore: + - master + - 0.7 + - 0.8 + - 0.9 + - 1.0 + # This doesn't work, but it would be nice if it did. + # build_dir: ../.go_project/src/github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME + +# notify: +# email: +# recipients: +# - distribution@docker.com + +# slack: +# team: docker +# channel: "#dt" +# username: mom +# token: {{SLACK_TOKEN}} +# on_success: false +# on_failure: true + + # Do we want these as well? + # - go get code.google.com/p/go.tools/cmd/goimports + # - test -z "$(goimports -l -w ./... | tee /dev/stderr)" + # http://labix.org/gocheck