diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 00000000..2c864953 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,19 @@ +version: 2 +jobs: + build: + docker: + - image: circleci/golang:latest + environment: + PROJECT_GO_PACKAGE: github.com/anacrolix/torrent + working_directory: /go/src/$PROJECT_GO_PACKAGE + steps: + - run: echo $PROJECT_GO_PACKAGE + - checkout + - run: sudo apt install fuse + - run: go get -t -d -v -race $PROJECT_GO_PACKAGE/... + - run: go test -v -race $PROJECT_GO_PACKAGE/... + - run: CGO_ENABLED=0 go get -t -d -v $PROJECT_GO_PACKAGE/... + - run: CGO_ENABLED=0 go test -v $PROJECT_GO_PACKAGE/... + - run: go get golang.org/x/mobile/cmd/gomobile + - run: gomobile init + - run: gomobile build -target=android $PROJECT_GO_PACKAGE diff --git a/tracker/udp_test.go b/tracker/udp_test.go index 4bff2f85..55946aae 100644 --- a/tracker/udp_test.go +++ b/tracker/udp_test.go @@ -47,7 +47,7 @@ func TestMarshalAnnounceResponse(t *testing.T) { // Failure to write an entire packet to UDP is expected to given an error. func TestLongWriteUDP(t *testing.T) { t.Parallel() - l, err := net.ListenUDP("udp", nil) + l, err := net.ListenUDP("udp4", nil) defer l.Close() if err != nil { t.Fatal(err)