]> Sergey Matveev's repositories - btrtrc.git/blob - .github/workflows/go.yml
Merge branch 'master' into lazylog
[btrtrc.git] / .github / workflows / go.yml
1 name: Go
2
3 on: [push, pull_request]
4
5 jobs:
6
7   build:
8     timeout-minutes: 30
9     runs-on: ubuntu-latest
10     strategy:
11       matrix:
12         go-version: [ 'tip' ]
13       fail-fast: false
14     steps:
15     - uses: actions/checkout@v2
16
17     - name: Set up Go
18       if: matrix.go-version != 'tip'
19       uses: actions/setup-go@v2
20       with:
21         go-version: ${{ matrix.go-version }}
22
23     - name: Install gotip
24       if: matrix.go-version == 'tip'
25       run: |
26         git clone --depth=1 https://go.googlesource.com/go "$HOME/gotip"
27         cd "$HOME/gotip/src"
28         ./make.bash
29         echo "GOROOT=$HOME/gotip" >> "$GITHUB_ENV"
30         echo "$HOME/gotip/bin:$PATH" >> "$GITHUB_PATH"
31
32     - name: Test
33       run: go test -race -count 2 ./...
34
35     - name: Test Benchmarks
36       run: go test -race -run @ -bench . -benchtime 2x ./...
37
38     - name: Bench
39       run: go test -run @ -bench . ./...
40
41     - name: Test on 386
42       run: GOARCH=386 go test ./... -bench .
43       continue-on-error: true
44
45     - name: Some packages compile for WebAssembly
46       run: GOOS=js GOARCH=wasm go build . ./storage ./tracker/...
47
48     - name: Install godo
49       run: go install github.com/anacrolix/godo@latest
50
51     - name: Apt packages
52       run: sudo apt install pv fuse
53
54     - name: torrentfs end-to-end test
55       run: fs/test.sh
56       timeout-minutes: 10