-
Notifications
You must be signed in to change notification settings - Fork 76
/
circle.yml
254 lines (229 loc) · 7.26 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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
defaults:
upload-hunter-cache: &upload-hunter-cache
run:
name: "Upload Hunter cache"
working_directory: ~/build
command: | # Upload Hunter cache if not PR build.
if [ ! "$CIRCLE_PR_NUMBER" ]; then
cmake --build . --target hunter_upload_cache
fi
environment-info: &environment-info
run:
name: "Environment info"
command: |
echo CXX: $CXX
$CXX --version
$CXX --version > compiler.version
configure: &configure
run:
name: "Configure"
# Build "out-of-source" to have better coverage report
# (ninja is using relative paths otherwise).
working_directory: ~/build
command: |
cmake ../project -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCOVERAGE=OFF $CMAKE_OPTIONS
configureMac: &configureMac
run:
name: "ConfigureMac"
working_directory: ~/build
command: |
cmake ../project -DCMAKE_BUILD_TYPE=$BUILD_TYPE $CMAKE_OPTIONS -DCMAKE_TOOLCHAIN_FILE=~/project/toolchain.cmake
build: &build
run:
name: "Build"
working_directory: ~/build
command: make -j $BUILD_PARALLEL_JOBS
linuxInstallGO: &linuxInstallGO
run:
name: "LinuxInstallGO and Tests"
working_directory: ~/project
command: |
curl -L --output go1.20.linux-amd64.tar.gz "https://dl.google.com/go/go1.20.linux-amd64.tar.gz"
tar -xf go1.20.linux-amd64.tar.gz
sudo mv go /usr/local
sudo ln -s /usr/local/go/bin/go /usr/local/bin/go
git clone --depth 1 https://github.com/ethereum/go-ethereum.git
git clone --depth 1 https://github.com/ethereum/tests.git
cd go-ethereum
make all
sudo ln -s ~/project/go-ethereum/build/bin/evm /usr/local/bin/evm
test-retesteth: &test-retesteth
run:
name: "Test-retesteth"
working_directory: ~/build/retesteth
command: |
./retesteth -t GeneralStateTests/stExample -- --testpath ~/project/tests
./retesteth -t BlockchainTests/ValidBlocks/bcExample -- --testpath ~/project/tests
./retesteth -t GeneralStateTests -- --checkhash --testpath ~/project/tests
./retesteth -t BlockchainTests -- --checkhash --testpath ~/project/tests
test: &test
run:
name: "Test"
working_directory: ~/build/retesteth
command: |
if [ $(uname) = Linux ]; then
export TMPDIR=/dev/shm
fi
./retesteth -t TestHelperSuite
./retesteth -t EthObjectsSuite
./retesteth -t DataObjectTestSuite
./retesteth -t OptionsSuite
./retesteth -t ExpectSectionSuite
./retesteth -t StructTest
./retesteth -t MemoryLeak
# ./retesteth -t LLLCSuite
# ./retesteth -t trDataCompileSuite
# git clone --depth 1 https://github.com/ethereum/tests.git
# export ETHEREUM_TEST_PATH=~/build/testeth/tests
# ctest --output-on-failure -j $TEST_PARALLEL_JOBS
store-retesteth: &store-retesteth
store_artifacts:
path: ~/build/retesteth
destination: retesteth
store-log: &store-log
store_artifacts:
path: /home/builder/build/deps/src/secp256k1-stamp
destination: log
upload-coverage-data: &upload-coverage-data
run:
name: "Upload coverage data"
command: |
pwd
$GCOV --version
codecov --required --gcov-exec "$GCOV" --gcov-root ~/build
install-solidity-mac: &install-solidity-mac
run:
name: "Install solidity"
command: |
brew update
brew install wget
wget -O boost_1_67_0.tar.gz https://sourceforge.net/projects/boost/files/boost/1.67.0/boost_1_67_0.tar.gz/download
tar xzvf boost_1_67_0.tar.gz
cd boost_1_67_0
./bootstrap.sh
sudo ./b2 install
cd ..
git clone https://github.com/ethereum/solidity.git
cd solidity
mkdir build
cd build
cmake .. -DLLL=1 -DUSE_Z3=0
sudo make install lllc -j $BUILD_PARALLEL_JOBS
install-solidity: &install-solidity
run:
name: "Install solidity"
command: |
sudo apt-get update
sudo apt-get -y install wget python-dev
wget -O boost_1_67_0.tar.gz https://sourceforge.net/projects/boost/files/boost/1.67.0/boost_1_67_0.tar.gz/download
tar xzvf boost_1_67_0.tar.gz
cd boost_1_67_0
./bootstrap.sh
sudo ./b2 install
cd ..
git clone https://github.com/ethereum/solidity.git
cd solidity
mkdir build
cd build
cmake .. -DLLL=1 -DUSE_Z3=0 -DTESTS=0
sudo make install lllc -j $BUILD_PARALLEL_JOBS
linux-steps: &linux-steps
- checkout
- *environment-info
- *configure
# - *upload-hunter-cache
# - *install-solidity
- *linuxInstallGO
- *build
- *store-retesteth
- *store-log
- *test
- *test-retesteth
# - *upload-coverage-data
mac-steps: &mac-steps
- checkout
- run:
name: "Install macOS dependencies"
# Python3 and requests are needed for Hunter upload.
command: |
HOMEBREW_NO_AUTO_UPDATE=1 brew install -q cmake ninja git
git clone --depth 1 https://github.com/ethereum/go-ethereum.git
git clone --depth 1 https://github.com/ethereum/tests.git
curl -L https://go.dev/dl/go1.20.1.darwin-amd64.pkg -o go1.20.pkg
chmod +x go1.20.pkg
sudo installer -pkg go1.20.pkg -target /
sudo ln -s /usr/local/go/bin/go /usr/local/bin
cd go-ethereum
make all
ln -s ~/project/go-ethereum/build/bin/evm /usr/local/bin/evm
- *environment-info
- *configureMac
# - *install-solidity-mac
- *build
- *store-retesteth
- *store-log
- *test
- *test-retesteth
# - *upload-coverage-data
version: 2
jobs:
Linux-Clang11:
environment:
- BUILD_TYPE: Release
- CXX: clang++
- CC: clang
- GCOV: llvm-cov gcov
- GENERATOR: Ninja
- BUILD_PARALLEL_JOBS: 8
- TEST_PARALLEL_JOBS: 8
docker:
- image: ethereum/cpp-build-env:18-clang-11
steps: *linux-steps
Linux-GCC9:
environment:
- BUILD_TYPE: Release
- CXX: g++-9
- CC: gcc-9
- GCOV: gcov-9
- GENERATOR: Ninja
- BUILD_PARALLEL_JOBS: 4
- TEST_PARALLEL_JOBS: 4
# TODO: Fix memory leaks reported in leveldb.
# - CMAKE_OPTIONS: -DSANITIZE=address
# - ASAN_OPTIONS: detect_leaks=0
docker:
- image: ethereum/cpp-build-env:18-gcc-9
steps: *linux-steps
Linux-GCC12:
environment:
- BUILD_TYPE: Release
- CXX: g++-12
- CC: gcc-12
- GCOV: gcov-12
- GENERATOR: Ninja
- BUILD_PARALLEL_JOBS: 4
- TEST_PARALLEL_JOBS: 4
docker:
- image: ethereum/cpp-build-env:19-gcc-12
steps: *linux-steps
macOS-XCode14:
environment:
- BUILD_TYPE: Release
- CXX: clang++
- GENERATOR: Ninja
- BUILD_PARALLEL_JOBS: 4
- TEST_PARALLEL_JOBS: 4
macos:
xcode: "14.2.0"
steps: *mac-steps
# TODO: Run GCC6 build only in develop branch.
# TODO: Enabled nightly builds and add more configs.
# TODO: Separate builds from testing jobs.
workflows:
version: 2
cpp-ethereum:
jobs:
- macOS-XCode14
- Linux-Clang11
- Linux-GCC9
- Linux-GCC12