2
0
mirror of synced 2025-02-23 06:08:07 +00:00
torrent/.circleci/config.yml
2019-01-09 11:21:49 +11:00

48 lines
1.9 KiB
YAML

version: 2
jobs:
build:
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
- run: echo $CIRCLE_WORKING_DIRECTORY
- run: echo $PWD
- run: echo $GOPATH
- run: echo 'export GOPATH=$HOME/go' >> $BASH_ENV
- run: echo 'export PATH="$GOPATH/bin:$PATH"' >> $BASH_ENV
- run: echo $GOPATH
- run: which go
- run: go version
- run: cd /usr/local && sudo rm -r go && sudo mkdir go go1.4 && sudo chown `whoami` go go1.4
- run: cd /usr/local && git clone git://github.com/golang/go
- run: cd /usr/local/go && git branch -f -t go1.4 origin/release-branch.go1.4 && cd .. && git clone --single-branch -b go1.4 go go1.4
- run: cd /usr/local/go1.4/src && ./make.bash
- run: cd /usr/local/go/src && GOROOT_BOOTSTRAP=/usr/local/go1.4 ./make.bash
- run: go version
- checkout
- run: sudo apt-get update
- run: sudo apt install fuse pv
- restore_cache:
keys:
- go-mod
- run: go get -d ./...
- run: go test -v -race ./... -count 2
- run: go test -bench . ./...
- run: set +e; CGO_ENABLED=0 go test -v ./...; true
- run: go install golang.org/x/mobile/cmd/gomobile
- run: gomobile init
- run: gomobile build -target=android $PROJECT_GO_PACKAGE
# - run: GO111MODULE=off go install github.com/anacrolix/godo
- run: go install ./cmd/torrentfs
- save_cache:
key: go-mod-{{ epoch }}
paths:
- ~/go/pkg/mod
- run: sudo modprobe fuse
- run: fs/test.sh