-
Notifications
You must be signed in to change notification settings - Fork 19
135 lines (107 loc) · 3.14 KB
/
Copy pathgo.yml
File metadata and controls
135 lines (107 loc) · 3.14 KB
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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
name: Go
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
permissions: read-all
jobs:
build:
strategy:
matrix:
go-version: [1.22.x, 1.23.x, 1.24.x]
os: [ubuntu-latest, macos-latest, windows-latest]
env:
CGO_ENABLED: 0
runs-on: ${{ matrix.os }}
steps:
- name: Set up Go
uses: actions/setup-go@v5.5.0
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v5
- name: Vet
run: go vet ./...
- name: Test
run: go test ./...
- name: Test No-asm
run: go test -tags=noasm ./...
- name: Test No-unsafe
run: go test -tags=nounsafe ./...
- name: Test No-unsafe, noasm
run: go test -tags="nounsafe,noasm" ./...
- name: Test purego
run: go test -tags="purego" ./...
- name: Test Race 1 CPU
env:
CGO_ENABLED: 1
run: go test -cpu=1 -short -race -tags=nounsafe -v ./...
- name: Test Race 4 CPU
env:
CGO_ENABLED: 1
run: go test -cpu=4 -short -race -tags=nounsafe -v ./...
generate:
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v5.5.0
with:
go-version: 1.23.x
- name: Checkout code
uses: actions/checkout@v5
- name: Generate
working-directory: ./_generate
run: go generate -v -x
- name: Git Status
run: |
git diff
test -z "$(git status --porcelain)"
build-special:
env:
CGO_ENABLED: 0
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v5.5.0
with:
go-version: 1.24.x
- name: Checkout code
uses: actions/checkout@v5
- name: fmt
run: diff <(gofmt -d .) <(printf "")
- name: Test 386
run: GOOS=linux GOARCH=386 go test -short ./...
- name: Build mz
run: go build github.com/minio/minlz/cmd/mz&&./mz c -verify -o=comp.mz mz&&./mz d -rm comp.mz&&rm ./mz&&rm comp
- name: goreleaser deprecation
run: curl -sfL https://git.io/goreleaser | VERSION=v2.3.2 sh -s -- check
- name: goreleaser snapshot
run: curl -sL https://git.io/goreleaser | VERSION=v2.3.2 sh -s -- --snapshot --clean
- name: Test GOAMD64 v3
env:
GOAMD64: v3
shell: bash {0}
run: go test . -test.run=None;if [ $? -eq 0 ]; then go test .; else true; fi
- name: Test GOAMD64 v4
env:
GOAMD64: v4
shell: bash {0}
run: go test . -test.run=None;if [ $? -eq 0 ]; then go test .; else true; fi
fuzz:
env:
CGO_ENABLED: 0
runs-on: ubuntu-latest
strategy:
matrix:
tags: [ 'nounsafe', '"noasm,nounsafe"' ]
tests: ['FuzzEncodingBlocks', 'FuzzDecode', 'FuzzStreamEncode', 'FuzzStreamDecode', 'FuzzLZ4Block']
steps:
- name: Set up Go
uses: actions/setup-go@v5.5.0
with:
go-version: 1.24.x
- name: Checkout code
uses: actions/checkout@v5
- name: mz/${{ matrix.tests }}/${{ matrix.tags }}
run: go test -tags=${{ matrix.tags }} -run=none -fuzz=${{ matrix.tests }} -fuzztime=100000x -test.fuzzminimizetime=10ms