Use Workflows (#169)

* Use Workflows
* Go 1.17 build tags
* Do races separately.
master
Klaus Post 2021-09-01 18:55:02 +02:00 committed by GitHub
parent 69e2f21ffd
commit 7761c8f7cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
19 changed files with 140 additions and 52 deletions

88
.github/workflows/go.yml vendored Normal file
View File

@ -0,0 +1,88 @@
name: Go
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
strategy:
matrix:
go-version: [1.15.x, 1.16.x, 1.17.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@v2
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v2
- name: Vet
run: go vet ./...
- name: Test
run: go test ./...
- name: Test Noasm
run: go test -tags=noasm&&go test -no-avx512&&go test -no-avx512 -no-avx2&&go test -no-avx512 -no-avx2 -no-ssse3
- name: Test Race
env:
CGO_ENABLED: 1
run: go test -cpu="1,4" -short -race -v .
build-special:
env:
CGO_ENABLED: 0
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17.x
- name: Checkout code
uses: actions/checkout@v2
- name: fmt
run: diff <(gofmt -d .) <(printf "")
- name: Test 386
run: GOOS=linux GOARCH=386 go test -short ./...
- name: Build examples
run: go build examples/simple-decoder.go&&go build examples/simple-encoder.go&&go build examples/stream-decoder.go&&go build examples/stream-encoder.go
- name: Test Races, noasm, 1 cpu
env:
CGO_ENABLED: 1
run: go test -tags=noasm -cpu=1 -short -race .
- name: Test Races, noasm, 4 cpu
env:
CGO_ENABLED: 1
run: go test -tags=noasm -cpu=4 -short -race .
- name: Test Races, no avx512
env:
CGO_ENABLED: 1
run: go test -no-avx512 -short -race .
- name: Test Races, no avx2
env:
CGO_ENABLED: 1
run: go test -no-avx512 -no-avx2 -short -race .
- name: Test Races, no ssse3
env:
CGO_ENABLED: 1
run: go test -no-avx512 -no-avx2 -no-ssse3 -short -race .

View File

@ -1,4 +1,5 @@
//+build generate
//go:build generate
// +build generate
//go:generate go run gen.go -out ../galois_gen_amd64.s -stubs ../galois_gen_amd64.go -pkg=reedsolomon
//go:generate gofmt -w ../galois_gen_switch_amd64.go

View File

@ -1,4 +1,5 @@
//+build ignore
//go:build ignore
// +build ignore
// Copyright 2015, Klaus Post, see LICENSE for details.
//

View File

@ -1,4 +1,5 @@
//+build ignore
//go:build ignore
// +build ignore
// Copyright 2015, Klaus Post, see LICENSE for details.
//

View File

@ -1,4 +1,5 @@
//+build ignore
//go:build ignore
// +build ignore
// Copyright 2015, Klaus Post, see LICENSE for details.
//

View File

@ -1,4 +1,5 @@
//+build ignore
//go:build ignore
// +build ignore
// Copyright 2015, Klaus Post, see LICENSE for details.
//

View File

@ -76,7 +76,7 @@ func galSub(a, b byte) byte {
// Table from https://github.com/templexxx/reedsolomon
var invTable = [256]byte{0x0, 0x1, 0x8e, 0xf4, 0x47, 0xa7, 0x7a, 0xba, 0xad, 0x9d, 0xdd, 0x98, 0x3d, 0xaa, 0x5d, 0x96, 0xd8, 0x72, 0xc0, 0x58, 0xe0, 0x3e, 0x4c, 0x66, 0x90, 0xde, 0x55, 0x80, 0xa0, 0x83, 0x4b, 0x2a, 0x6c, 0xed, 0x39, 0x51, 0x60, 0x56, 0x2c, 0x8a, 0x70, 0xd0, 0x1f, 0x4a, 0x26, 0x8b, 0x33, 0x6e, 0x48, 0x89, 0x6f, 0x2e, 0xa4, 0xc3, 0x40, 0x5e, 0x50, 0x22, 0xcf, 0xa9, 0xab, 0xc, 0x15, 0xe1, 0x36, 0x5f, 0xf8, 0xd5, 0x92, 0x4e, 0xa6, 0x4, 0x30, 0x88, 0x2b, 0x1e, 0x16, 0x67, 0x45, 0x93, 0x38, 0x23, 0x68, 0x8c, 0x81, 0x1a, 0x25, 0x61, 0x13, 0xc1, 0xcb, 0x63, 0x97, 0xe, 0x37, 0x41, 0x24, 0x57, 0xca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xb0, 0xb9, 0xba, 0xbf, 0xbc, 0xfd, 0xfe, 0xfb, 0xf8, 0xf1, 0xf2, 0xf7, 0xf4, 0xe5, 0xe6, 0xe3, 0xe0, 0xe9, 0xea, 0xef, 0xec, 0xcd, 0xce, 0xcb, 0xc8, 0xc1, 0xc2, 0xc7, 0xc4, 0xd5, 0xd6, 0xd3, 0xd0, 0xd9, 0xda, 0xdf, 0xdc, 0x5d, 0x5e, 0x5b, 0x58, 0x51, 0x52, 0x57, 0x54, 0x45, 0x46, 0x43, 0x40, 0x49, 0x4a, 0x4f, 0x4c, 0x6d, 0x6e, 0x6b, 0x68, 0x61, 0x62, 0x67, 0x64, 0x75, 0x76, 0x73, 0x70, 0x79, 0x7a, 0x7f, 0x7c, 0x3d, 0x3e, 0x3b, 0x38, 0x31, 0x32, 0x37, 0x34, 0x25, 0x26, 0x23, 0x20, 0x29, 0x2a, 0x2f, 0x2c, 0xd, 0xe, 0xb, 0x8, 0x1, 0x2, 0x7, 0x4, 0x15, 0x16, 0x13, 0x10, 0x19, 0x1a, 0x1f, 0x1c},

View File

@ -1,6 +1,5 @@
//+build !noasm
//+build !appengine
//+build !gccgo
//go:build !noasm && !appengine && !gccgo
// +build !noasm,!appengine,!gccgo
// Copyright 2015, Klaus Post, see LICENSE for details.
// Copyright 2019, Minio, Inc.

View File

@ -1,6 +1,5 @@
//+build !noasm
//+build !appengine
//+build !gccgo
//go:build !noasm && !appengine && !gccgo
// +build !noasm,!appengine,!gccgo
// Copyright 2015, Klaus Post, see LICENSE for details.
// Copyright 2019, Minio, Inc.

View File

@ -1,6 +1,5 @@
//+build !noasm
//+build !appengine
//+build !gccgo
//go:build !noasm && !appengine && !gccgo
// +build !noasm,!appengine,!gccgo
// Copyright 2015, Klaus Post, see LICENSE for details.

View File

@ -1,6 +1,5 @@
//+build !noasm
//+build !appengine
//+build !gccgo
//go:build !noasm && !appengine && !gccgo
// +build !noasm,!appengine,!gccgo
// Copyright 2015, Klaus Post, see LICENSE for details.
// Copyright 2017, Minio, Inc.

View File

@ -1,9 +1,7 @@
// Code generated by command: go run gen.go -out ../galois_gen_amd64.s -stubs ../galois_gen_amd64.go -pkg=reedsolomon. DO NOT EDIT.
// +build !appengine
// +build !noasm
// +build !nogen
// +build gc
//go:build !appengine && !noasm && !nogen && gc
// +build !appengine,!noasm,!nogen,gc
package reedsolomon

View File

@ -1,4 +1,5 @@
//+build !amd64 noasm appengine gccgo nogen
//go:build !amd64 || noasm || appengine || gccgo || nogen
// +build !amd64 noasm appengine gccgo nogen
package reedsolomon

View File

@ -1,9 +1,7 @@
// Code generated by command: go generate gen.go. DO NOT EDIT.
// +build !appengine
// +build !noasm
// +build gc
// +build !nogen
//go:build !appengine && !noasm && gc && !nogen
// +build !appengine,!noasm,gc,!nogen
package reedsolomon

View File

@ -1,6 +1,7 @@
//+build !amd64 noasm appengine gccgo
//+build !arm64 noasm appengine gccgo
//+build !ppc64le noasm appengine gccgo
//go:build (!amd64 || noasm || appengine || gccgo) && (!arm64 || noasm || appengine || gccgo) && (!ppc64le || noasm || appengine || gccgo)
// +build !amd64 noasm appengine gccgo
// +build !arm64 noasm appengine gccgo
// +build !ppc64le noasm appengine gccgo
// Copyright 2015, Klaus Post, see LICENSE for details.

View File

@ -1,4 +1,5 @@
//+build !amd64 noasm appengine gccgo
//go:build !amd64 || noasm || appengine || gccgo
// +build !amd64 noasm appengine gccgo
// Copyright 2020, Klaus Post, see LICENSE for details.

View File

@ -1,6 +1,5 @@
//+build !noasm
//+build !appengine
//+build !gccgo
//go:build !noasm && !appengine && !gccgo
// +build !noasm,!appengine,!gccgo
// Copyright 2015, Klaus Post, see LICENSE for details.
// Copyright 2018, Minio, Inc.

View File

@ -1,4 +1,5 @@
//+build ignore
//go:build ignore
// +build ignore
package main

View File

@ -90,8 +90,8 @@ func TestMatrixIdentity(t *testing.T) {
func TestMatrixMultiply(t *testing.T) {
m1, err := newMatrixData(
[][]byte{
[]byte{1, 2},
[]byte{3, 4},
{1, 2},
{3, 4},
})
if err != nil {
t.Fatal(err)
@ -99,8 +99,8 @@ func TestMatrixMultiply(t *testing.T) {
m2, err := newMatrixData(
[][]byte{
[]byte{5, 6},
[]byte{7, 8},
{5, 6},
{7, 8},
})
if err != nil {
t.Fatal(err)
@ -131,9 +131,9 @@ func TestMatrixInverse(t *testing.T) {
{
// input data to construct the matrix.
[][]byte{
[]byte{56, 23, 98},
[]byte{3, 100, 200},
[]byte{45, 201, 123},
{56, 23, 98},
{3, 100, 200},
{45, 201, 123},
},
// expected Inverse matrix.
"[[175, 133, 33], [130, 13, 245], [112, 35, 126]]",
@ -146,11 +146,11 @@ func TestMatrixInverse(t *testing.T) {
{
// input data to construct the matrix.
[][]byte{
[]byte{1, 0, 0, 0, 0},
[]byte{0, 1, 0, 0, 0},
[]byte{0, 0, 0, 1, 0},
[]byte{0, 0, 0, 0, 1},
[]byte{7, 7, 6, 6, 1},
{1, 0, 0, 0, 0},
{0, 1, 0, 0, 0},
{0, 0, 0, 1, 0},
{0, 0, 0, 0, 1},
{7, 7, 6, 6, 1},
},
// expectedInverse matrix.
"[[1, 0, 0, 0, 0]," +
@ -166,9 +166,9 @@ func TestMatrixInverse(t *testing.T) {
// expected to fail with errNotSquare.
{
[][]byte{
[]byte{56, 23},
[]byte{3, 100},
[]byte{45, 201},
{56, 23},
{3, 100},
{45, 201},
},
"",
false,
@ -179,8 +179,8 @@ func TestMatrixInverse(t *testing.T) {
{
[][]byte{
[]byte{4, 2},
[]byte{12, 6},
{4, 2},
{12, 6},
},
"",
false,