]> Sergey Matveev's repositories - btrtrc.git/blob - .circleci/config.yml
f1919a1a31e2a5220b808ff4f4ee5a60a7716445
[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 'export GOPATH=$HOME/go' >> $BASH_ENV
16       - run: echo 'export PATH="$GOPATH/bin:$PATH"' >> $BASH_ENV
17       - run: echo $GOPATH
18       - run: go version
19       - 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
20       - run: go version
21       - checkout
22       - run: sudo apt-get update
23       - run: sudo apt install fuse pv
24       # - run: go get -t -d -v -race $PROJECT_GO_PACKAGE/...
25       - run: go test -v -race ./... -count 2
26       - run: go test -bench . ./...
27       # - run: CGO_ENABLED=0 go get -t -d -v $PROJECT_GO_PACKAGE/...
28       - run: set +e; CGO_ENABLED=0 go test -v ./...; true
29       - run: go install golang.org/x/mobile/cmd/gomobile
30       - run: gomobile init
31       - run: gomobile build -target=android $PROJECT_GO_PACKAGE
32       - run: go get github.com/anacrolix/godo
33       - run: sudo modprobe fuse
34       - run: fs/test.sh