This repository has been archived by the owner on Dec 10, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathcircle.yml
154 lines (133 loc) · 3.83 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
defaults:
update-submodules: &update-submodules
run:
name: "Update git submodules"
command: |
git submodule update --init
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 -G "$GENERATOR" -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCOVERAGE=ON $CMAKE_OPTIONS
build: &build
run:
name: "Build"
working_directory: ~/build
command: cmake --build . -- -j $BUILD_PARALLEL_JOBS
test: &test
run:
name: "Test"
working_directory: ~/build
command: |
if [ $(uname) = Linux ]; then
export TMPDIR=/dev/shm
fi
export ETHEREUM_TEST_PATH=~/project/test/jsontests
# If the DAG file does not exist, we have to run a single test with mining
# to create it before we can run tests in parallel.
if [ ! -f ~/.ethash/full-R23-0000000000000000 ]; then
test/testeth -t BlockChainSuite/updateStats
fi
ctest --output-on-failure -j $TEST_PARALLEL_JOBS
store-eth: &store-eth
store_artifacts:
path: ~/build/eth/eth
destination: eth
store_artifacts:
path: ~/build/test/testeth
destination: testeth
store-testeth: &store-testeth
store_artifacts:
path: ~/build/test/testeth
destination: testeth
store-randomcode-seed: &store-randomcode-seed
store_artifacts:
path: ~/build/test/randomCodeSeed.txt
destination: randomCodeSeed.txt
save-deps-cache: &save-deps-cache
cache-save:
name: "Save dependencies cache"
key: &deps-cache-key deps-2-{{arch}}-{{checksum "compiler.version"}}-{{checksum "cmake/ProjectLibFF.cmake"}}
paths:
- build/deps
restore-deps-cache: &restore-deps-cache
cache-restore:
name: "Restore dependencies cache"
key: *deps-cache-key
save-ethash-dag: &save-ethash-dag
cache-save:
name: "Save Ethash DAG file"
key: ðash-dag-key ethash-dag0-{{arch}}
paths:
- ~/.ethash/full-R23-0000000000000000
restore-ethash-dag: &restore-ethash-dag
cache-restore:
name: "Restore Ethash DAG file"
key: *ethash-dag-key
upload-coverage-data: &upload-coverage-data
run:
name: "Upload coverage data"
command: |
pwd
$GCOV --version
codecov --required --gcov-exec "$GCOV" --gcov-root ~/build
linux-steps: &linux-steps
- checkout
- *update-submodules
- *environment-info
- *restore-deps-cache
- *configure
- *build
- *save-deps-cache
- *store-eth
- *store-testeth
- *restore-ethash-dag
- *test
- *save-ethash-dag
- *upload-coverage-data
version: 2
jobs:
linux-clang6:
environment:
- CXX: clang++-6.0
- CC: clang-6.0
- GCOV: llvm-cov-6.0 gcov
- GENERATOR: Ninja
- BUILD_PARALLEL_JOBS: 8
- TEST_PARALLEL_JOBS: 8
docker:
- image: ethereum/cpp-build-env
steps: *linux-steps
Linux-GCC6-Debug:
environment:
- BUILD_TYPE: Debug
- CXX: g++-6
- CC: gcc-6
- GCOV: gcov-6
- 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
steps: *linux-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
testeth:
jobs:
- linux-clang6