name: Go on: [push, pull_request] jobs: build: timeout-minutes: 30 runs-on: ubuntu-latest strategy: matrix: go-version: [ '1.16', '1.17' ] fail-fast: false steps: - uses: actions/checkout@v2 - name: Set up Go uses: actions/setup-go@v2 with: go-version: ${{ matrix.go-version }} - name: Test run: go test -race -count 2 ./... - name: Test Benchmarks run: go test -race -run @ -bench . -benchtime 2x ./... - name: Bench run: go test -run @ -bench . ./... - name: Test on 386 run: GOARCH=386 go test ./... -bench . continue-on-error: true - name: Some packages compile for WebAssembly run: GOOS=js GOARCH=wasm go build . ./storage ./tracker/... - name: Install godo run: | # Need master for cross-compiling fix go install -v -x github.com/anacrolix/godo@master echo $PATH - name: Apt packages run: sudo apt install pv fuse - name: torrentfs end-to-end test # Test on 386 for atomic alignment and other bad 64-bit assumptions run: GOARCH=386 fs/test.sh timeout-minutes: 10