torrent/.circleci/config.yml

62 lines
1.9 KiB
YAML
Raw Normal View History

version: 2
jobs:
build:
2017-08-29 04:02:30 +00:00
machine: true
environment:
2019-09-24 06:50:17 +00:00
GO_BRANCH: release-branch.go1.13
steps:
2017-08-29 04:02:30 +00:00
- run: echo $CIRCLE_WORKING_DIRECTORY
- run: echo $PWD
2019-01-08 05:37:40 +00:00
- run: echo $GOPATH
2017-08-29 04:02:30 +00:00
- run: echo 'export GOPATH=$HOME/go' >> $BASH_ENV
- run: echo 'export PATH="$GOPATH/bin:$PATH"' >> $BASH_ENV
- run: echo $GOPATH
2019-01-08 05:37:40 +00:00
- run: which go
2017-08-29 04:02:30 +00:00
- run: go version
- run: |
cd /usr/local
sudo mkdir go.local
sudo chown `whoami` go.local
- restore_cache:
key: go-local-
- run: |
cd /usr/local
git clone git://github.com/golang/go go.local || true
cd go.local
git fetch
git checkout "$GO_BRANCH"
[[ -x bin/go && `git rev-parse HEAD` == `cat anacrolix.built` ]] && exit
cd src
./make.bash || exit
git rev-parse HEAD > ../anacrolix.built
- save_cache:
paths: /usr/local/go.local
key: go-local-{{ checksum "/usr/local/go.local/anacrolix.built" }}
- run: echo 'export PATH="/usr/local/go.local/bin:$PATH"' >> $BASH_ENV
2017-08-29 04:02:30 +00:00
- 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
2019-01-08 05:57:33 +00:00
- restore_cache:
keys:
- go-pkg-
- restore_cache:
keys:
- go-cache-
2019-01-09 00:21:49 +00:00
- run: go get -d ./...
2019-10-01 08:10:00 +00:00
- run: go test -v -race ./... -count 2 -bench .
2018-07-25 08:57:49 +00:00
- run: go test -bench . ./...
- run: set +e; CGO_ENABLED=0 go test -v ./...; true
- run: GOARCH=386 go test ./... -count 2 -bench .
2018-07-27 00:44:26 +00:00
- run: go install ./cmd/torrentfs
2019-01-08 05:57:33 +00:00
- save_cache:
key: go-pkg-{{ checksum "go.mod" }}
paths:
2019-01-09 00:23:07 +00:00
- ~/go/pkg
2017-08-29 04:02:30 +00:00
- run: sudo modprobe fuse
- run: fs/test.sh
- save_cache:
key: go-cache-{{ .Revision }}
paths:
- ~/.cache/go-build