]> Sergey Matveev's repositories - btrtrc.git/blob - .circleci/config.yml
Fix yaml formatting
[btrtrc.git] / .circleci / config.yml
1 version: 2
2 jobs:
3   build:
4     machine: true
5     environment:
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
11     steps:
12       # - run: echo $PROJECT_GO_PACKAGE
13       - run: echo $CIRCLE_WORKING_DIRECTORY
14       - run: echo $PWD
15       - run: echo $GOPATH
16       - run: echo 'export GOPATH=$HOME/go' >> $BASH_ENV
17       - run: echo 'export PATH="$GOPATH/bin:$PATH"' >> $BASH_ENV
18       - run: echo $GOPATH
19       - run: which go
20       - run: go version
21       - run: cd /usr/local && sudo rm -r go && sudo mkdir go go1.4 && sudo chown `whoami` go go1.4 && git clone git://github.com/golang/go && cd go && git branch -f -t go1.4 origin/release-branch.go1.4 && cd .. && git clone --single-branch -b go1.4 go go1.4 && cd go1.4/src && ./make.bash && cd ../../go/src && GOROOT_BOOTSTRAP=/usr/local/go1.4 ./make.bash
22       - run: go version
23       - checkout
24       - run: sudo apt-get update
25       - run: sudo apt install fuse pv
26       - restore_cache:
27           keys:
28             - go-mod
29       - run: go get ./...
30       - run: go test -v -race ./... -count 2
31       - run: go test -bench . ./...
32       - run: set +e; CGO_ENABLED=0 go test -v ./...; true
33       - run: go install golang.org/x/mobile/cmd/gomobile
34       - run: gomobile init
35       - run: gomobile build -target=android $PROJECT_GO_PACKAGE
36       # - run: GO111MODULE=off go install github.com/anacrolix/godo
37       - run: go install ./cmd/torrentfs
38       - save_cache:
39           key: go-mod
40           paths:
41             - $GOPATH/pkg/mod
42       - run: sudo modprobe fuse
43       - run: fs/test.sh