81 lines (63 loc) · 1.86 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
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 ./...
- 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 s2c
run: go build github.com/klauspost/compress/s2/cmd/s2c && go build github.com/klauspost/compress/s2/cmd/s2d&&./s2c -verify s2c &&./s2d s2c.s2&&rm ./s2c&&rm s2d&&rm s2c.s2
- name: install garble
run: go install mvdan.cc/garble@latest
- name: goreleaser deprecation
run: curl -sfL https://git.io/goreleaser | VERSION=v1.5.0 sh -s -- check
- name: goreleaser snapshot
run: curl -sL https://git.io/goreleaser | VERSION=v1.5.0 sh -s -- --snapshot --skip-publish --rm-dist
- name: Test S2 GOAMD64 v3
env:
GOAMD64: v3
run: go test -asmflags=-D=GOAMD64_v3 ./s2/...
- name: Test S2 GOAMD64 v4
env:
GOAMD64: v4
run: go test -asmflags=-D=GOAMD64_v4 ./s2/...