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

Commit

Permalink
Merge pull request #1144 from hyperledger/develop
Browse files Browse the repository at this point in the history
Hyperledger Iroha v1.0 beta release
  • Loading branch information
tyvision authored Mar 30, 2018
2 parents 78f152a + e13a37e commit ed665de
Show file tree
Hide file tree
Showing 952 changed files with 42,299 additions and 15,632 deletions.
113 changes: 56 additions & 57 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,27 @@ jobs:
<<: *defaults
<<: *version
docker:
- image: hyperledger/iroha-docker-develop
- image: hyperledger/iroha-docker-develop:v1
- image: postgres:9.5
- image: redis:3.2.8
steps:
- checkout
- run: echo $(eval echo "$IROHA_VERSION")
- restore_cache:
keys:
- build-cache-debug-{{ arch }}-{{ .Branch }}-
- build-cache-debug-{{ arch }}-
- build-linux-debug-{{ arch }}-{{ .Branch }}-
- build-linux-debug-{{ arch }}-
- build-linux-debug-
paths:
- ~/.ccache

- run:
name: ccache setup
command: |
ccache --version
ccache --show-stats
ccache --zero-stats
ccache --max-size=1G
# debug/coverage builds produce 2G cache
ccache --max-size=2G
- run:
name: cmake
command: >
Expand All @@ -46,16 +48,8 @@ jobs:
- run:
name: make
command: |
cmake --build $IROHA_BUILD -- -j4
- run:
name: ccache teardown
command: |
ccache --cleanup
ccache --show-stats
- save_cache:
key: build-cache-debug-{{ arch }}-{{ .Branch }}-{{ epoch }}
paths:
- ~/.ccache
cmake --build $IROHA_BUILD -- -j2
- run: ccache --show-stats
- run:
name: unit tests, generate xunit-*.xml
command: cmake --build $IROHA_BUILD --target test
Expand All @@ -65,6 +59,14 @@ jobs:
- run:
name: cppcheck
command: cmake --build $IROHA_BUILD --target cppcheck
- run:
name: codecov.io
command: bash <(curl -s https://codecov.io/bash) -f $IROHA_BUILD/reports/gcovr.xml || echo "Codecov did not collect coverage reports"
- save_cache:
key: build-linux-debug-{{ arch }}-{{ .Branch }}-{{ epoch }}
paths:
- ~/.ccache
when: always
- persist_to_workspace:
root: /opt/iroha/build
paths:
Expand All @@ -77,13 +79,14 @@ jobs:
<<: *defaults
<<: *version
docker:
- image: hyperledger/iroha-docker-develop
- image: hyperledger/iroha-docker-develop:v1
steps:
- checkout
- restore_cache:
keys:
- build-cache-release-{{ arch }}-{{ .Branch }}-
- build-cache-release-{{ arch }}-
- build-linux-release-{{ arch }}-{{ .Branch }}-
- build-linux-release-{{ arch }}-
- build-linux-release-
paths:
- ~/.ccache
- run:
Expand All @@ -92,7 +95,8 @@ jobs:
ccache --version
ccache --show-stats
ccache --zero-stats
ccache --max-size=1G
# release builds produce cache <100M
ccache --max-size=500M
- run:
name: cmake
command: >
Expand All @@ -108,16 +112,13 @@ jobs:
- run:
name: make and package
command: |
cmake --build $IROHA_BUILD --target package -- -j4
- run:
name: ccache teardown
command: |
ccache --cleanup
ccache --show-stats
cmake --build $IROHA_BUILD --target package -- -j$(nproc --all)
- run: ccache --show-stats
- save_cache:
key: build-cache-release-{{ arch }}-{{ .Branch }}-{{ epoch }}
key: build-linux-release-{{ arch }}-{{ .Branch }}-{{ epoch }}
paths:
- ~/.ccache
when: always
- run:
name: copy deb file
command: |
Expand Down Expand Up @@ -148,7 +149,7 @@ jobs:
<<: *defaults
<<: *version
docker:
- image: hyperledger/iroha-docker-develop
- image: hyperledger/iroha-docker-develop:v1
- image: docker:17.05.0-ce-git
steps:
- checkout
Expand Down Expand Up @@ -186,17 +187,14 @@ jobs:
<<: *defaults
<<: *version
docker:
- image: hyperledger/iroha-docker-develop
- image: hyperledger/iroha-docker-develop:v1
steps:
- checkout
- restore_cache:
keys:
- sonar-
- v3-sonar-
- attach_workspace:
at: /opt/iroha/build
- run:
name: codecov.io
command: bash <(curl -s https://codecov.io/bash) -f $IROHA_BUILD/reports/gcovr.xml || echo "Codecov did not collect coverage reports"
- run:
name: execute sonar-scanner to analyze PR
command: >
Expand All @@ -216,27 +214,25 @@ jobs:
echo "required env vars not found"
fi
- save_cache:
key: sonar-{{ epoch }}
key: v3-sonar-{{ epoch }}
paths:
- ~/.sonar
when: always


# executed only for develop, master and release branches
sonar-release:
<<: *defaults
<<: *version
docker:
- image: hyperledger/iroha-docker-develop
- image: hyperledger/iroha-docker-develop:v1
steps:
- checkout
- restore_cache:
keys:
- sonar-
- v3-sonar-
- attach_workspace:
at: /opt/iroha/build
- run:
name: codecov.io
command: bash <(curl -s https://codecov.io/bash) -f $IROHA_BUILD/reports/gcovr.xml || echo "Codecov did not collect coverage reports"
- run:
name: execute sonar-scanner
command: >
Expand All @@ -251,9 +247,10 @@ jobs:
echo "required env vars not found"
fi
- save_cache:
key: sonar-{{ epoch }}
key: v3-sonar-{{ epoch }}
paths:
- ~/.sonar
when: always


build-macos-release:
Expand All @@ -264,25 +261,29 @@ jobs:
- checkout
- restore_cache:
keys:
- brew-{{ arch }}
- brew-
paths:
- Library/Caches/Homebrew
- ~/Library/Caches/Homebrew
- run:
name: install dev dependencies
command: brew install cmake boost postgres grpc autoconf automake libtool ccache
command: brew install cmake boost postgres grpc autoconf automake libtool ccache || true
- save_cache:
key: brew-{{ arch }}-{{ epoch }}
key: brew-{{ epoch }}
paths:
- Library/Caches/Homebrew
- ~/Library/Caches/Homebrew
when: always
- restore_cache:
keys:
- build-cache-{{ arch }}-{{ .Branch }}
- build-mac-release-{{ arch }}-{{ .Branch }}-
- build-mac-release-{{ arch }}-
- build-mac-release-
paths:
- ~/.ccache
- restore_cache:
keys:
- v0-external-{{ arch }}-{{ .Branch }}
- v0-external-{{ arch }}
- mac-external-{{ arch }}-{{ .Branch }}-
- mac-external-{{ arch }}-
- mac-external-
paths:
- external
- run:
Expand All @@ -291,7 +292,8 @@ jobs:
ccache --version
ccache --show-stats
ccache --zero-stats
ccache --max-size=1G
# release build produces <20M cache per build
ccache --max-size=100M
- run:
name: cmake
command: >
Expand All @@ -305,20 +307,17 @@ jobs:
name: make
command: |
cmake --build build --target package -- -j$(sysctl -n hw.ncpu)
- run:
name: ccache teardown
command: |
ccache --cleanup
ccache --show-stats
- run: ccache --show-stats
- save_cache:
key: build-cache-{{ arch }}-{{ .Branch }}-{{ epoch }}
key: build-mac-release-{{ arch }}-{{ .Branch }}-{{ epoch }}
paths:
- ~/.ccache
when: always
- save_cache:
key: v0-external-{{ arch }}-{{ .Branch }}-{{ epoch }}
key: mac-external-{{ arch }}-{{ .Branch }}-{{ epoch }}
paths:
- external
- run: ccache --show-stats
when: always
- run:
name: rename artifacts
command: |
Expand Down Expand Up @@ -364,7 +363,7 @@ workflows:
only:
- develop
- master
- trunk/.*
- /trunk\/.*/
tags:
only: /v[\.0-9]+.*/

Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,5 @@ cmake-build*
cmake-build*
.gtm
/.gtm/

*.deb
27 changes: 27 additions & 0 deletions .jenkinsci/bindings.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/usr/bin/env groovy

def doBindings() {
def cmake_options = ""
if (params.JavaBindings) {
cmake_options += " -DSWIG_JAVA=ON "
}
if (params.PythonBindings) {
cmake_options += " -DSWIG_PYTHON=ON "
}
// In case language specific options were not set,
// build for each language
if (!params.JavaBindings && !params.PythonBindings) {
cmake_options += " -DSWIG_JAVA=ON -DSWIG_PYTHON=ON "
}
sh """
cmake \
-H. \
-Bbuild \
-DCMAKE_BUILD_TYPE=Release \
${cmake_options}
"""
sh "cmake --build build --target python_tests"
sh "cd build; make -j${params.PARALLELISM} irohajava irohapy"
}

return this
16 changes: 16 additions & 0 deletions .jenkinsci/cancel-builds-same-job.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env groovy

def cancelSameJobBuilds() {
def jobname = env.JOB_NAME
def buildnum = env.BUILD_NUMBER.toInteger()
def job = Jenkins.instance.getItemByFullName(jobname)

if (jobname =~ /^.*\/${job.name}$/) {
for (build in job.builds) {
if (!build.isBuilding()) { continue; }
if (buildnum == build.getNumber().toInteger()) { continue; }
build.doStop();
}
}
}
return this
15 changes: 15 additions & 0 deletions .jenkinsci/cancel-nightly-except-develop.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env groovy

def cancelThisJob() {
def jobname = env.JOB_NAME
def buildnum = env.BUILD_NUMBER.toInteger()
def job = Jenkins.instance.getItemByFullName(jobname)

if (jobname =~ /^.*\/${job.name}$/) {
for (build in job.builds) {
if (!build.isBuilding()) { continue; }
if (buildnum == build.getNumber().toInteger()) { build.doStop(); }
}
}
}
return this
Loading

0 comments on commit ed665de

Please sign in to comment.