]> Sergey Matveev's repositories - btrtrc.git/blob - .github/workflows/go.yml
Debug CI godo installation
[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: [ '1.16', '1.17' ]
13       fail-fast: false
14     steps:
15     - uses: actions/checkout@v2
16
17     - name: Set up Go
18       uses: actions/setup-go@v2
19       with:
20         go-version: ${{ matrix.go-version }}
21
22     - name: Test
23       run: go test -race -count 2 ./...
24
25     - name: Test Benchmarks
26       run: go test -race -run @ -bench . -benchtime 2x ./...
27
28     - name: Bench
29       run: go test -run @ -bench . ./...
30
31     - name: Test on 386
32       run: GOARCH=386 go test ./... -bench .
33       continue-on-error: true
34
35     - name: Some packages compile for WebAssembly
36       run: GOOS=js GOARCH=wasm go build . ./storage ./tracker/...
37       # https://github.com/pion/webrtc/issues/2099
38       continue-on-error: true
39
40     - name: Install godo
41       run: |
42         # Need master for cross-compiling fix
43         go install -v -x github.com/anacrolix/godo@master
44         echo $PATH
45
46     - name: Apt packages
47       run: sudo apt install pv fuse
48
49     - name: torrentfs end-to-end test
50       # Test on 386 for atomic alignment and other bad 64-bit assumptions
51       run: GOARCH=386 fs/test.sh
52       timeout-minutes: 10