2
0
mirror of synced 2025-02-24 14:48:27 +00:00
2022-04-11 14:53:02 +10:00

86 lines
2.0 KiB
YAML

name: Go
on: [push, pull_request]
jobs:
test:
timeout-minutes: 30
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [ 'tip' ]
fail-fast: false
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/go-common
- run: go test -race -count 2 ./...
test-benchmarks:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [ 'tip' ]
fail-fast: false
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/go-common
- run: go test -race -run @ -bench . -benchtime 2x ./...
bench:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [ 'tip' ]
fail-fast: false
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/go-common
- run: go test -run @ -bench . ./...
test-386:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [ 'tip' ]
fail-fast: false
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/go-common
- run: GOARCH=386 go test ./...
- run: GOARCH=386 go test ./... -run @ -bench .
build-wasm:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [ 'tip' ]
fail-fast: false
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/go-common
- name: Some packages compile for WebAssembly
run: GOOS=js GOARCH=wasm go build . ./storage ./tracker/...
torrentfs:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [ 'tip' ]
fail-fast: false
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/go-common
- 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