6 # PROJECT_GO_PACKAGE: github.com/anacrolix/torrent
7 # Should use PROJECT_GO_PACKAGE here but it's not interpolated for this
8 # field. https://discuss.circleci.com/t/environment-variable-expansion-in-
9 # working-directory/11322/4
10 # working_directory: ~/go/src/github.com/anacrolix/torrent
12 # - run: echo $PROJECT_GO_PACKAGE
13 - run: echo $CIRCLE_WORKING_DIRECTORY
16 - run: echo 'export GOPATH=$HOME/go' >> $BASH_ENV
17 - run: echo 'export PATH="$GOPATH/bin:$PATH"' >> $BASH_ENV
24 sudo chown `whoami` go.master
29 git clone git://github.com/golang/go go.master || true
32 [[ -x bin/go && `git rev-parse HEAD` == `cat anacrolix.built` ]] && exit
35 git rev-parse HEAD > ../anacrolix.built
37 paths: /usr/local/go.master
38 key: go-root-{{ checksum "/usr/local/go.master/anacrolix.built" }}
39 - run: echo 'export PATH="/usr/local/go.master/bin:$PATH"' >> $BASH_ENV
42 - run: sudo apt-get update
43 - run: sudo apt install fuse pv
50 - run: go get -d ./...
51 - run: go test -v -race ./... -count 2
52 - run: go test -bench . ./...
53 - run: set +e; CGO_ENABLED=0 go test -v ./...; true
54 - run: go install ./cmd/torrentfs
56 key: go-pkg-{{ checksum "go.mod" }}
59 - run: sudo modprobe fuse
62 key: go-cache-{{ .Revision }}