@@ -32,18 +32,24 @@ jobs:
32
32
- name : Test
33
33
run : go test ./...
34
34
35
- - name : Test Noasm
35
+ - name : Test No-asm
36
36
run : go test -tags=noasm ./...
37
37
38
+ - name : Test No-unsafe
39
+ run : go test -tags=nounsafe ./...
40
+
41
+ - name : Test No-unsafe, noasm
42
+ run : go test -tags="nounsafe,noasm" ./...
43
+
38
44
- name : Test Race 1 CPU
39
45
env :
40
46
CGO_ENABLED : 1
41
- run : go test -cpu=1 -short -race -v ./...
47
+ run : go test -cpu=1 -short -race -tags=nounsafe - v ./...
42
48
43
49
- name : Test Race 4 CPU
44
50
env :
45
51
CGO_ENABLED : 1
46
- run : go test -cpu=4 -short -race -v ./...
52
+ run : go test -cpu=4 -short -race -tags=nounsafe - v ./...
47
53
48
54
generate :
49
55
strategy :
@@ -112,6 +118,9 @@ jobs:
112
118
env :
113
119
CGO_ENABLED : 0
114
120
runs-on : ubuntu-latest
121
+ strategy :
122
+ matrix :
123
+ tags : [ 'nounsafe', '"noasm,nounsafe"' ]
115
124
steps :
116
125
- name : Set up Go
117
126
@@ -121,28 +130,23 @@ jobs:
121
130
- name : Checkout code
122
131
uses : actions/checkout@v4
123
132
124
- - name : S2/FuzzDictBlocks
125
- run : go test -run=none -fuzz=FuzzDictBlocks -fuzztime=100000x -test.fuzzminimizetime=10ms ./s2/.
133
+ - name : S2/FuzzDictBlocks/${{ matrix.tags }}
134
+ run : go test -tags=${{ matrix.tags }} - run=none -fuzz=FuzzDictBlocks -fuzztime=100000x -test.fuzzminimizetime=10ms ./s2/.
126
135
127
- - name : S2/FuzzEncodingBlocks
128
- run : go test -run=none -fuzz=FuzzEncodingBlocks -fuzztime=500000x -test.fuzzminimizetime=10ms ./s2/.
136
+ - name : S2/FuzzEncodingBlocks/${{ matrix.tags }}
137
+ run : go test -tags=${{ matrix.tags }} - run=none -fuzz=FuzzEncodingBlocks -fuzztime=500000x -test.fuzzminimizetime=10ms ./s2/.
129
138
130
- - name : S2/FuzzLZ4Block
131
- run : go test -run=none -fuzz=FuzzLZ4Block -fuzztime=500000x -test.fuzzminimizetime=10ms ./s2/.
139
+ - name : S2/FuzzLZ4Block/${{ matrix.tags }}
140
+ run : go test -tags=${{ matrix.tags }} - run=none -fuzz=FuzzLZ4Block -fuzztime=500000x -test.fuzzminimizetime=10ms ./s2/.
132
141
133
- - name : S2/FuzzDictBlocks/noasm
134
- run : go test -tags=noasm -run=none -fuzz=FuzzDictBlocks -fuzztime=100000x -test.fuzzminimizetime=10ms ./s2/.
135
-
136
- - name : S2/FuzzEncodingBlocks/noasm
137
- run : go test -tags=noasm -run=none -fuzz=FuzzEncodingBlocks -fuzztime=500000x -test.fuzzminimizetime=10ms ./s2/.
138
-
139
- - name : S2/FuzzLZ4Block/noasm
140
- run : go test -tags=noasm -run=none -fuzz=FuzzLZ4Block -fuzztime=500000x -test.fuzzminimizetime=10ms ./s2/.
141
142
142
143
fuzz-zstd :
143
144
env :
144
145
CGO_ENABLED : 0
145
146
runs-on : ubuntu-latest
147
+ strategy :
148
+ matrix :
149
+ tags : [ 'nounsafe', '"noasm,nounsafe"' ]
146
150
steps :
147
151
- name : Set up Go
148
152
@@ -152,57 +156,44 @@ jobs:
152
156
- name : Checkout code
153
157
uses : actions/checkout@v4
154
158
155
- - name : zstd/FuzzDecodeAll
156
- run : go test -run=none -fuzz=FuzzDecodeAll -fuzztime=500000x -test.fuzzminimizetime=10ms ./zstd/.
159
+ - name : zstd/FuzzDecodeAll/${{ matrix.tags }}
160
+ run : go test -tags=${{ matrix.tags }} - run=none -fuzz=FuzzDecodeAll -fuzztime=500000x -test.fuzzminimizetime=10ms ./zstd/.
157
161
158
- - name : zstd/FuzzDecAllNoBMI2
159
- run : go test -run=none -fuzz=FuzzDecAllNoBMI2 -fuzztime=500000x -test.fuzzminimizetime=10ms ./zstd/.
162
+ - name : zstd/FuzzDecAllNoBMI2/${{ matrix.tags }}
163
+ run : go test -tags=${{ matrix.tags }} - run=none -fuzz=FuzzDecAllNoBMI2 -fuzztime=500000x -test.fuzzminimizetime=10ms ./zstd/.
160
164
161
- - name : zstd/FuzzDecoder
162
- run : go test -run=none -fuzz=FuzzDecoder -fuzztime=500000x -test.fuzzminimizetime=10ms ./zstd/.
165
+ - name : zstd/FuzzDecoder/${{ matrix.tags }}
166
+ run : go test -tags=${{ matrix.tags }} - run=none -fuzz=FuzzDecoder -fuzztime=500000x -test.fuzzminimizetime=10ms ./zstd/.
163
167
164
- - name : zstd/FuzzNoBMI2Dec
165
- run : go test -run=none -fuzz=FuzzNoBMI2Dec -fuzztime=500000x -test.fuzzminimizetime=10ms ./zstd/.
168
+ - name : zstd/FuzzNoBMI2Dec/${{ matrix.tags }}
169
+ run : go test -tags=${{ matrix.tags }} - run=none -fuzz=FuzzNoBMI2Dec -fuzztime=500000x -test.fuzzminimizetime=10ms ./zstd/.
166
170
167
- - name : zstd/FuzzEncoding
168
- run : cd zstd&&go test -run=none -fuzz=FuzzEncoding -fuzztime=250000x -test.fuzzminimizetime=10ms -fuzz-end=3&&cd ..
169
-
170
- - name : zstd/FuzzDecodeAll/noasm
171
- run : go test -tags=noasm -run=none -fuzz=FuzzDecodeAll -fuzztime=500000x -test.fuzzminimizetime=10ms ./zstd/.
172
-
173
- - name : zstd/FuzzDecoder/noasm
174
- run : go test -tags=noasm -run=none -fuzz=FuzzDecoder -fuzztime=500000x -test.fuzzminimizetime=10ms ./zstd/.
175
-
176
- - name : zstd/FuzzEncoding/noasm
177
- run : cd zstd&&go test -tags=noasm -run=none -fuzz=FuzzEncoding -fuzztime=250000x -test.fuzzminimizetime=10ms -fuzz-end=3&&cd ..
178
-
179
- - name : zstd/FuzzEncodingBest
180
- run : cd zstd&&go test -run=none -fuzz=FuzzEncoding -fuzztime=25000x -test.fuzzminimizetime=10ms -fuzz-start=4&&cd ..
171
+ - name : zstd/FuzzEncoding/${{ matrix.tags }}
172
+ run : cd zstd&&go test -tags=${{ matrix.tags }} -run=none -fuzz=FuzzEncoding -fuzztime=250000x -test.fuzzminimizetime=10ms -fuzz-end=3&&cd ..
181
173
182
174
fuzz-other :
183
175
env :
184
176
CGO_ENABLED : 0
185
177
runs-on : ubuntu-latest
178
+ strategy :
179
+ matrix :
180
+ tags : [ 'nounsafe', '"noasm,nounsafe"' ]
186
181
steps :
187
182
- name : Set up Go
188
183
189
184
with :
190
185
go-version : 1.23.x
191
-
192
186
- name : Checkout code
193
187
uses : actions/checkout@v4
194
188
195
- - name : flate/FuzzEncoding
196
- run : go test -run=none -fuzz=FuzzEncoding -fuzztime=100000x -test.fuzzminimizetime=10ms ./flate/.
197
-
198
- - name : flate/FuzzEncoding/noasm
199
- run : go test -run=none -tags=noasm -fuzz=FuzzEncoding -fuzztime=100000x -test.fuzzminimizetime=10ms ./flate/.
189
+ - name : flate/FuzzEncoding/${{ matrix.tags }}
190
+ run : go test -tags=${{ matrix.tags }} -run=none -fuzz=FuzzEncoding -fuzztime=100000x -test.fuzzminimizetime=10ms ./flate/.
200
191
201
- - name : zip/FuzzReader
202
- run : go test -run=none -fuzz=FuzzReader -fuzztime=500000x -test.fuzzminimizetime=10ms ./zip/.
192
+ - name : zip/FuzzReader/${{ matrix.tags }}
193
+ run : go test -tags=${{ matrix.tags }} - run=none -fuzz=FuzzReader -fuzztime=500000x -test.fuzzminimizetime=10ms ./zip/.
203
194
204
- - name : fse/FuzzCompress
205
- run : go test -run=none -fuzz=FuzzCompress -fuzztime=1000000x -test.fuzzminimizetime=10ms ./fse/.
195
+ - name : fse/FuzzCompress/${{ matrix.tags }}
196
+ run : go test -tags=${{ matrix.tags }} - run=none -fuzz=FuzzCompress -fuzztime=1000000x -test.fuzzminimizetime=10ms ./fse/.
206
197
207
- - name : fse/FuzzDecompress
208
- run : go test -run=none -fuzz=FuzzDecompress -fuzztime=1000000x -test.fuzzminimizetime=10ms ./fse/.
198
+ - name : fse/FuzzDecompress/${{ matrix.tags }}
199
+ run : go test -tags=${{ matrix.tags }} - run=none -fuzz=FuzzDecompress -fuzztime=1000000x -test.fuzzminimizetime=10ms ./fse/.
0 commit comments