]> Sergey Matveev's repositories - btrtrc.git/commitdiff
Add CircleCI 2.0 turd
authorMatt Joiner <anacrolix@gmail.com>
Sat, 26 Aug 2017 16:10:17 +0000 (02:10 +1000)
committerMatt Joiner <anacrolix@gmail.com>
Sat, 26 Aug 2017 16:10:17 +0000 (02:10 +1000)
Adds tests for https://github.com/anacrolix/utp/issues/24, and mobile on the master branch. The UDP tracker test uses udp4 because of some bad behaviour on CircleCI.

.circleci/config.yml [new file with mode: 0644]
tracker/udp_test.go

diff --git a/.circleci/config.yml b/.circleci/config.yml
new file mode 100644 (file)
index 0000000..2c86495
--- /dev/null
@@ -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
index 4bff2f85dc1974eb33364f402527d36bde4f10cc..55946aae220dc1fe2cb7408f339c3e7db74a87a6 100644 (file)
@@ -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)