5 # This would be for if we didn't have machine: true. Could help with circleci local execute, which doesn't support VMs?
7 # - image: cimg/go:1.13
9 GO_BRANCH: release-branch.go1.16
11 - run: echo $CIRCLE_WORKING_DIRECTORY
14 - run: echo 'export GOPATH=$HOME/go' >> $BASH_ENV
15 - run: echo 'export PATH="$GOPATH/bin:$PATH"' >> $BASH_ENV
17 - run: which go || sudo apt install golang-go
22 sudo chown `whoami` go.local
27 git clone git://github.com/golang/go go.local || true
30 git checkout "$GO_BRANCH"
31 [[ -x bin/go && `git rev-parse HEAD` == `cat anacrolix.built` ]] && exit
34 git rev-parse HEAD > ../anacrolix.built
36 paths: /usr/local/go.local
37 key: go-local-{{ checksum "/usr/local/go.local/anacrolix.built" }}
38 - run: echo 'export PATH="/usr/local/go.local/bin:$PATH"' >> $BASH_ENV
41 - run: sudo apt-get update
42 - run: sudo apt install fuse pv
49 - run: go get -d ./...
50 - run: go test -v -race ./... -count 2
51 - run: go test -bench . ./...
52 - run: set +e; CGO_ENABLED=0 go test -v ./...; true
53 - run: GOARCH=386 go test ./... -count 2 -bench . || true
54 - run: go install github.com/anacrolix/godo@latest
56 key: go-pkg-{{ checksum "go.mod" }}
59 - run: sudo modprobe fuse
62 key: go-cache-{{ .Revision }}