-
-
Notifications
You must be signed in to change notification settings - Fork 628
121 lines (108 loc) · 3.11 KB
/
go.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
name: Go
on: [push, pull_request]
jobs:
test:
timeout-minutes: 10
runs-on: ${{ matrix.os }}
strategy:
matrix:
go-version: [ '1.22' ]
os: [windows-latest, macos-latest, ubuntu-latest]
fail-fast: false
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/go-common
- run: go test -race $(go list ./... | grep -v /fs | grep -v /possum)
continue-on-error: true
- run: go test -race ./fs/...
if: ${{ ! contains(matrix.os, 'windows') }}
continue-on-error: true
test-benchmarks:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [ '1.22' ]
fail-fast: false
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/go-common
- run: go test -race -run @ -bench . -benchtime 2x $(go list ./... | grep -v /possum)
bench:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [ '1.22' ]
fail-fast: false
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/go-common
- run: go test -run @ -bench . $(go list ./... | grep -v /possum)
test-386:
timeout-minutes: 5
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [ '1.22' ]
fail-fast: false
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/go-common
- run: GOARCH=386 go test $(go list ./... | grep -v /possum)
continue-on-error: true
- run: GOARCH=386 go test -run @ -bench . $(go list ./... | grep -v /possum)
build-wasm:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [ '1.22' ]
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-linux:
continue-on-error: true
timeout-minutes: 5
runs-on: ${{ matrix.os }}
strategy:
matrix:
go-version: [ '1.22' ]
os: [ubuntu-latest]
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@v1
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
- run: mount
# Github broke FUSE on MacOS, I'm not sure what the state is.
# torrentfs-macos:
# timeout-minutes: 15
# runs-on: ${{ matrix.os }}
# strategy:
# matrix:
# go-version: [ '1.20' ]
# os: [macos-latest]
# fail-fast: false
# steps:
# - uses: actions/checkout@v2
# - uses: ./.github/actions/go-common
#
# - run: brew install macfuse pv md5sha1sum bash
#
# - name: Install godo
# run: go install -v github.com/anacrolix/godo@master
#
# - name: torrentfs end-to-end test
# run: fs/test.sh
# # Pretty sure macos on GitHub CI has issues with the fuse driver now.
# continue-on-error: true