forked from holiman/uint256
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcircle.yml
130 lines (118 loc) · 2.76 KB
/
circle.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
122
123
124
125
126
127
128
129
130
version: 2.1
commands:
test:
parameters:
arch:
default: "amd64"
description: The target architecture.
type: enum
enum: ["amd64", "386"]
steps:
- run:
name: "Test (<<parameters.arch>>)"
command: |
export GOARCH=<<parameters.arch>>
go version
go env
go test -v -coverprofile=coverage-<<parameters.arch>>.txt -covermode=count
jobs:
go117:
docker:
- image: cimg/go:1.17
steps:
- run:
name: "Install tools"
command: |
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.42.0
- checkout
- run:
name: "Lint"
command: golangci-lint run
- test:
arch: "amd64"
- test:
arch: "386"
- run:
name: "Codecov upload"
command: bash <(curl -s https://codecov.io/bash)
- restore_cache:
keys:
- corpus-v2
- run:
name: "Fuzzing"
command: |
go get -u github.com/dvyukov/go-fuzz/go-fuzz github.com/dvyukov/go-fuzz/go-fuzz-build
go-fuzz-build
timeout --preserve-status --signal INT 1m go-fuzz -procs=2
test ! "$(ls crashers)"
- save_cache:
key: corpus-v2-{{ epoch }}
paths:
- corpus
- run:
name: "Benchmark"
command: go test -run=- -bench=. -benchmem
- run:
name: "Build tests for PPC64"
command: |
GOARCH=ppc64 go test -c
mv uint256.test uint256.test.ppc64
- persist_to_workspace:
root: .
paths:
- uint256.test.*
bigendian:
docker:
- image: circleci/buildpack-deps:bullseye
steps:
- run:
name: "Install QEMU"
command: sudo apt-get -q update && sudo apt-get -qy install qemu-user-static --no-install-recommends
- attach_workspace:
at: .
- run:
name: "Test (PPC64 emulation)"
command: qemu-ppc64-static uint256.test.ppc64 -test.v
go116:
docker:
- image: cimg/go:1.16
steps:
- checkout
- test
go115:
docker:
- image: cimg/go:1.15
steps:
- checkout
- test
go114:
docker:
- image: cimg/go:1.14
steps:
- checkout
- test
go113:
docker:
- image: cimg/go:1.13
steps:
- checkout
- test
go112:
docker:
- image: cimg/go:1.12
steps:
- checkout
- test
workflows:
version: 2
uint256:
jobs:
- go117
- go116
- go115
- go114
- go113
- go112
- bigendian:
requires:
- go117