]> Sergey Matveev's repositories - btrtrc.git/blob - .github/workflows/go.yml
Re-enable CI wasm/js package build checks
[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
38     - name: Install godo
39       run: |
40         # Need master for cross-compiling fix
41         go install -v -x github.com/anacrolix/godo@master
42         echo $PATH
43
44     - name: Apt packages
45       run: sudo apt install pv fuse
46
47     - name: torrentfs end-to-end test
48       # Test on 386 for atomic alignment and other bad 64-bit assumptions
49       run: GOARCH=386 fs/test.sh
50       timeout-minutes: 10