torrent/.circleci/config.yml

35 lines
1.6 KiB
YAML
Raw Normal View History

version: 2
jobs:
build:
2017-08-29 04:02:30 +00:00
machine: true
environment:
PROJECT_GO_PACKAGE: github.com/anacrolix/torrent
# Should use PROJECT_GO_PACKAGE here but it's not interpolated for this
# field. https://discuss.circleci.com/t/environment-variable-expansion-in-
# working-directory/11322/4
working_directory: ~/go/src/github.com/anacrolix/torrent
steps:
- run: echo $PROJECT_GO_PACKAGE
2017-08-29 04:02:30 +00:00
- run: echo $CIRCLE_WORKING_DIRECTORY
- run: echo $PWD
- run: echo 'export GOPATH=$HOME/go' >> $BASH_ENV
- run: echo 'export PATH="$GOPATH/bin:$PATH"' >> $BASH_ENV
- run: echo $GOPATH
- run: go version
- 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
- run: go version
- checkout
2017-10-12 05:32:11 +00:00
- run: sudo apt-get update
2017-08-29 04:02:30 +00:00
- run: sudo apt install fuse pv
- run: go get -t -d -v -race $PROJECT_GO_PACKAGE/...
- run: go test -v -race $PROJECT_GO_PACKAGE/...
2018-01-25 05:57:38 +00:00
- run: go test -bench $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
2017-08-29 04:02:30 +00:00
- run: go get github.com/anacrolix/godo
- run: sudo modprobe fuse
- run: fs/test.sh