Skip to content
This repository was archived by the owner on Apr 17, 2019. It is now read-only.

Commit ed665de

Browse files
authored
Merge pull request #1144 from hyperledger/develop
Hyperledger Iroha v1.0 beta release
2 parents 78f152a + e13a37e commit ed665de

File tree

952 files changed

+42299
-15632
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

952 files changed

+42299
-15632
lines changed

.circleci/config.yml

Lines changed: 56 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -15,25 +15,27 @@ jobs:
1515
<<: *defaults
1616
<<: *version
1717
docker:
18-
- image: hyperledger/iroha-docker-develop
18+
- image: hyperledger/iroha-docker-develop:v1
1919
- image: postgres:9.5
20-
- image: redis:3.2.8
2120
steps:
2221
- checkout
2322
- run: echo $(eval echo "$IROHA_VERSION")
2423
- restore_cache:
2524
keys:
26-
- build-cache-debug-{{ arch }}-{{ .Branch }}-
27-
- build-cache-debug-{{ arch }}-
25+
- build-linux-debug-{{ arch }}-{{ .Branch }}-
26+
- build-linux-debug-{{ arch }}-
27+
- build-linux-debug-
2828
paths:
2929
- ~/.ccache
30+
3031
- run:
3132
name: ccache setup
3233
command: |
3334
ccache --version
3435
ccache --show-stats
3536
ccache --zero-stats
36-
ccache --max-size=1G
37+
# debug/coverage builds produce 2G cache
38+
ccache --max-size=2G
3739
- run:
3840
name: cmake
3941
command: >
@@ -46,16 +48,8 @@ jobs:
4648
- run:
4749
name: make
4850
command: |
49-
cmake --build $IROHA_BUILD -- -j4
50-
- run:
51-
name: ccache teardown
52-
command: |
53-
ccache --cleanup
54-
ccache --show-stats
55-
- save_cache:
56-
key: build-cache-debug-{{ arch }}-{{ .Branch }}-{{ epoch }}
57-
paths:
58-
- ~/.ccache
51+
cmake --build $IROHA_BUILD -- -j2
52+
- run: ccache --show-stats
5953
- run:
6054
name: unit tests, generate xunit-*.xml
6155
command: cmake --build $IROHA_BUILD --target test
@@ -65,6 +59,14 @@ jobs:
6559
- run:
6660
name: cppcheck
6761
command: cmake --build $IROHA_BUILD --target cppcheck
62+
- run:
63+
name: codecov.io
64+
command: bash <(curl -s https://codecov.io/bash) -f $IROHA_BUILD/reports/gcovr.xml || echo "Codecov did not collect coverage reports"
65+
- save_cache:
66+
key: build-linux-debug-{{ arch }}-{{ .Branch }}-{{ epoch }}
67+
paths:
68+
- ~/.ccache
69+
when: always
6870
- persist_to_workspace:
6971
root: /opt/iroha/build
7072
paths:
@@ -77,13 +79,14 @@ jobs:
7779
<<: *defaults
7880
<<: *version
7981
docker:
80-
- image: hyperledger/iroha-docker-develop
82+
- image: hyperledger/iroha-docker-develop:v1
8183
steps:
8284
- checkout
8385
- restore_cache:
8486
keys:
85-
- build-cache-release-{{ arch }}-{{ .Branch }}-
86-
- build-cache-release-{{ arch }}-
87+
- build-linux-release-{{ arch }}-{{ .Branch }}-
88+
- build-linux-release-{{ arch }}-
89+
- build-linux-release-
8790
paths:
8891
- ~/.ccache
8992
- run:
@@ -92,7 +95,8 @@ jobs:
9295
ccache --version
9396
ccache --show-stats
9497
ccache --zero-stats
95-
ccache --max-size=1G
98+
# release builds produce cache <100M
99+
ccache --max-size=500M
96100
- run:
97101
name: cmake
98102
command: >
@@ -108,16 +112,13 @@ jobs:
108112
- run:
109113
name: make and package
110114
command: |
111-
cmake --build $IROHA_BUILD --target package -- -j4
112-
- run:
113-
name: ccache teardown
114-
command: |
115-
ccache --cleanup
116-
ccache --show-stats
115+
cmake --build $IROHA_BUILD --target package -- -j$(nproc --all)
116+
- run: ccache --show-stats
117117
- save_cache:
118-
key: build-cache-release-{{ arch }}-{{ .Branch }}-{{ epoch }}
118+
key: build-linux-release-{{ arch }}-{{ .Branch }}-{{ epoch }}
119119
paths:
120120
- ~/.ccache
121+
when: always
121122
- run:
122123
name: copy deb file
123124
command: |
@@ -148,7 +149,7 @@ jobs:
148149
<<: *defaults
149150
<<: *version
150151
docker:
151-
- image: hyperledger/iroha-docker-develop
152+
- image: hyperledger/iroha-docker-develop:v1
152153
- image: docker:17.05.0-ce-git
153154
steps:
154155
- checkout
@@ -186,17 +187,14 @@ jobs:
186187
<<: *defaults
187188
<<: *version
188189
docker:
189-
- image: hyperledger/iroha-docker-develop
190+
- image: hyperledger/iroha-docker-develop:v1
190191
steps:
191192
- checkout
192193
- restore_cache:
193194
keys:
194-
- sonar-
195+
- v3-sonar-
195196
- attach_workspace:
196197
at: /opt/iroha/build
197-
- run:
198-
name: codecov.io
199-
command: bash <(curl -s https://codecov.io/bash) -f $IROHA_BUILD/reports/gcovr.xml || echo "Codecov did not collect coverage reports"
200198
- run:
201199
name: execute sonar-scanner to analyze PR
202200
command: >
@@ -216,27 +214,25 @@ jobs:
216214
echo "required env vars not found"
217215
fi
218216
- save_cache:
219-
key: sonar-{{ epoch }}
217+
key: v3-sonar-{{ epoch }}
220218
paths:
221219
- ~/.sonar
220+
when: always
222221

223222

224223
# executed only for develop, master and release branches
225224
sonar-release:
226225
<<: *defaults
227226
<<: *version
228227
docker:
229-
- image: hyperledger/iroha-docker-develop
228+
- image: hyperledger/iroha-docker-develop:v1
230229
steps:
231230
- checkout
232231
- restore_cache:
233232
keys:
234-
- sonar-
233+
- v3-sonar-
235234
- attach_workspace:
236235
at: /opt/iroha/build
237-
- run:
238-
name: codecov.io
239-
command: bash <(curl -s https://codecov.io/bash) -f $IROHA_BUILD/reports/gcovr.xml || echo "Codecov did not collect coverage reports"
240236
- run:
241237
name: execute sonar-scanner
242238
command: >
@@ -251,9 +247,10 @@ jobs:
251247
echo "required env vars not found"
252248
fi
253249
- save_cache:
254-
key: sonar-{{ epoch }}
250+
key: v3-sonar-{{ epoch }}
255251
paths:
256252
- ~/.sonar
253+
when: always
257254

258255

259256
build-macos-release:
@@ -264,25 +261,29 @@ jobs:
264261
- checkout
265262
- restore_cache:
266263
keys:
267-
- brew-{{ arch }}
264+
- brew-
268265
paths:
269-
- Library/Caches/Homebrew
266+
- ~/Library/Caches/Homebrew
270267
- run:
271268
name: install dev dependencies
272-
command: brew install cmake boost postgres grpc autoconf automake libtool ccache
269+
command: brew install cmake boost postgres grpc autoconf automake libtool ccache || true
273270
- save_cache:
274-
key: brew-{{ arch }}-{{ epoch }}
271+
key: brew-{{ epoch }}
275272
paths:
276-
- Library/Caches/Homebrew
273+
- ~/Library/Caches/Homebrew
274+
when: always
277275
- restore_cache:
278276
keys:
279-
- build-cache-{{ arch }}-{{ .Branch }}
277+
- build-mac-release-{{ arch }}-{{ .Branch }}-
278+
- build-mac-release-{{ arch }}-
279+
- build-mac-release-
280280
paths:
281281
- ~/.ccache
282282
- restore_cache:
283283
keys:
284-
- v0-external-{{ arch }}-{{ .Branch }}
285-
- v0-external-{{ arch }}
284+
- mac-external-{{ arch }}-{{ .Branch }}-
285+
- mac-external-{{ arch }}-
286+
- mac-external-
286287
paths:
287288
- external
288289
- run:
@@ -291,7 +292,8 @@ jobs:
291292
ccache --version
292293
ccache --show-stats
293294
ccache --zero-stats
294-
ccache --max-size=1G
295+
# release build produces <20M cache per build
296+
ccache --max-size=100M
295297
- run:
296298
name: cmake
297299
command: >
@@ -305,20 +307,17 @@ jobs:
305307
name: make
306308
command: |
307309
cmake --build build --target package -- -j$(sysctl -n hw.ncpu)
308-
- run:
309-
name: ccache teardown
310-
command: |
311-
ccache --cleanup
312-
ccache --show-stats
310+
- run: ccache --show-stats
313311
- save_cache:
314-
key: build-cache-{{ arch }}-{{ .Branch }}-{{ epoch }}
312+
key: build-mac-release-{{ arch }}-{{ .Branch }}-{{ epoch }}
315313
paths:
316314
- ~/.ccache
315+
when: always
317316
- save_cache:
318-
key: v0-external-{{ arch }}-{{ .Branch }}-{{ epoch }}
317+
key: mac-external-{{ arch }}-{{ .Branch }}-{{ epoch }}
319318
paths:
320319
- external
321-
- run: ccache --show-stats
320+
when: always
322321
- run:
323322
name: rename artifacts
324323
command: |
@@ -364,7 +363,7 @@ workflows:
364363
only:
365364
- develop
366365
- master
367-
- trunk/.*
366+
- /trunk\/.*/
368367
tags:
369368
only: /v[\.0-9]+.*/
370369

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,5 @@ cmake-build*
3535
cmake-build*
3636
.gtm
3737
/.gtm/
38+
39+
*.deb

.jenkinsci/bindings.groovy

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/usr/bin/env groovy
2+
3+
def doBindings() {
4+
def cmake_options = ""
5+
if (params.JavaBindings) {
6+
cmake_options += " -DSWIG_JAVA=ON "
7+
}
8+
if (params.PythonBindings) {
9+
cmake_options += " -DSWIG_PYTHON=ON "
10+
}
11+
// In case language specific options were not set,
12+
// build for each language
13+
if (!params.JavaBindings && !params.PythonBindings) {
14+
cmake_options += " -DSWIG_JAVA=ON -DSWIG_PYTHON=ON "
15+
}
16+
sh """
17+
cmake \
18+
-H. \
19+
-Bbuild \
20+
-DCMAKE_BUILD_TYPE=Release \
21+
${cmake_options}
22+
"""
23+
sh "cmake --build build --target python_tests"
24+
sh "cd build; make -j${params.PARALLELISM} irohajava irohapy"
25+
}
26+
27+
return this
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/usr/bin/env groovy
2+
3+
def cancelSameJobBuilds() {
4+
def jobname = env.JOB_NAME
5+
def buildnum = env.BUILD_NUMBER.toInteger()
6+
def job = Jenkins.instance.getItemByFullName(jobname)
7+
8+
if (jobname =~ /^.*\/${job.name}$/) {
9+
for (build in job.builds) {
10+
if (!build.isBuilding()) { continue; }
11+
if (buildnum == build.getNumber().toInteger()) { continue; }
12+
build.doStop();
13+
}
14+
}
15+
}
16+
return this
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/usr/bin/env groovy
2+
3+
def cancelThisJob() {
4+
def jobname = env.JOB_NAME
5+
def buildnum = env.BUILD_NUMBER.toInteger()
6+
def job = Jenkins.instance.getItemByFullName(jobname)
7+
8+
if (jobname =~ /^.*\/${job.name}$/) {
9+
for (build in job.builds) {
10+
if (!build.isBuilding()) { continue; }
11+
if (buildnum == build.getNumber().toInteger()) { build.doStop(); }
12+
}
13+
}
14+
}
15+
return this

0 commit comments

Comments
 (0)