forked from holiman/uint256
-
Notifications
You must be signed in to change notification settings - Fork 0
/
circle.yml
128 lines (117 loc) · 3.3 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
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:
go123:
docker:
- image: cimg/go:1.23
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.61.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-v3
- run:
name: "Fuzzing"
command: |
GOCACHE=/home/circleci/project/corpus-v3 go test . -run - -fuzz FuzzBinaryOperations -fuzztime 20s
GOCACHE=/home/circleci/project/corpus-v3 go test . -run - -fuzz FuzzCompareOperations -fuzztime 20s
GOCACHE=/home/circleci/project/corpus-v3 go test . -run - -fuzz FuzzTernaryOperations -fuzztime 20s
GOCACHE=/home/circleci/project/corpus-v3 go test . -run - -fuzz FuzzBase10StringCompare -fuzztime 10s
GOCACHE=/home/circleci/project/corpus-v3 go test . -run - -fuzz FuzzDecimal -fuzztime 10s
GOCACHE=/home/circleci/project/corpus-v3 go test . -run - -fuzz FuzzFloat64 -fuzztime 10s
GOCACHE=/home/circleci/project/corpus-v3 go test . -run - -fuzz FuzzLog10 -fuzztime 10s
GOCACHE=/home/circleci/project/corpus-v3 go test . -run - -fuzz FuzzSetString -fuzztime 10s
- save_cache:
key: corpus-v3-{{ epoch }}
paths:
- corpus-v3
- 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: cimg/base:current
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
go122:
docker:
- image: cimg/go:1.22
steps:
- checkout
- test
go121:
docker:
- image: cimg/go:1.21
steps:
- checkout
- test
go120:
docker:
- image: cimg/go:1.20
steps:
- checkout
- test
go119:
docker:
- image: cimg/go:1.19
steps:
- checkout
- test
workflows:
version: 2
uint256:
jobs:
- go119
- go120
- go121
- go122
- go123:
requires:
- go122
- bigendian:
requires:
- go123