Skip to content
Permalink
Browse files

CI: add option to pass USE_LIBURSA flag on Linux

Signed-off-by: Andrei Lebedev <lebdron@gmail.com>
  • Loading branch information...
lebdron committed Aug 21, 2019
1 parent 093abe1 commit f6f69a9755707b572005fcd8dcf8734de646f8a2
Showing with 24 additions and 4 deletions.
  1. +2 −1 .jenkinsci/builders/x64-linux-build-steps.groovy
  2. +11 −0 .jenkinsci/text-variables.groovy
  3. +11 −3 Jenkinsfile
@@ -42,7 +42,7 @@ def testSteps(String buildDir, List environment, String testList) {

def buildSteps(int parallelism, List compilerVersions, String build_type, boolean build_shared_libs, boolean specialBranch, boolean coverage,
boolean testing, String testList, boolean cppcheck, boolean sonar, boolean codestyle, boolean docs, boolean packagebuild,
boolean sanitize, boolean fuzzing, boolean coredumps, boolean useBTF, boolean forceDockerDevelopBuild, List environment) {
boolean sanitize, boolean fuzzing, boolean coredumps, boolean useBTF, boolean use_libursa, boolean forceDockerDevelopBuild, List environment) {
withEnv(environment) {
scmVars = checkout scm
def build = load '.jenkinsci/build.groovy'
@@ -109,6 +109,7 @@ def buildSteps(int parallelism, List compilerVersions, String build_type, boolea
-DPACKAGE_DEB=${cmakeBooleanOption[packagebuild]} \
-DPACKAGE_TGZ=${cmakeBooleanOption[packagebuild]} \
-DUSE_BTF=${cmakeBooleanOption[useBTF]} \
-DUSE_LIBURSA=${cmakeBooleanOption[use_libursa]} \
-DCMAKE_TOOLCHAIN_FILE=/opt/dependencies/scripts/buildsystems/vcpkg.cmake ${cmakeOptions}")
build.cmakeBuild(buildDir, cmakeBuildOptions, parallelism)
}
@@ -255,6 +255,17 @@ cmd_description = """
</li>
</ul>
</li>
<li>
<p><strong>use_libursa</strong> = false </p>
<ul>
<li>
<p>use Hyperledger Ursa-provided ed25519 with SHA-2 instead of iroha-ed25519 with SHA-3</p>
</li>
<li>
<p>Ex:use_libursa=true</p>
</li>
</ul>
</li>
<li>
<p><strong>forceDockerDevelopBuild</strong> = false </p>
<ul>
@@ -159,6 +159,7 @@ node ('master') {
specialBranch = false
parallelism = 0
useBTF = false
use_libursa = false
forceDockerDevelopBuild = false
checkTag = sh(script: "git describe --tags --exact-match ${scmVars.GIT_COMMIT}", returnStatus: true)

@@ -288,18 +289,25 @@ node ('master') {
if(!x64linux_compiler_list.isEmpty()){
x64LinuxBuildSteps = [{x64LinuxBuildScript.buildSteps(
parallelism==0 ?x64LinuxWorker.cpusAvailable : parallelism, x64linux_compiler_list, build_type, build_shared_libs, specialBranch, coverage,
testing, testList, cppcheck, sonar, codestyle, doxygen, packageBuild, sanitize, fuzzing, coredumps, useBTF, forceDockerDevelopBuild, environmentList)}]
testing, testList, cppcheck, sonar, codestyle, doxygen, packageBuild, sanitize, fuzzing, coredumps, useBTF, use_libursa, forceDockerDevelopBuild, environmentList)}]
//If "master" also run Release build
if(specialBranch && build_type == 'Debug'){
x64LinuxBuildSteps += [{x64LinuxBuildScript.buildSteps(
parallelism==0 ?x64LinuxWorker.cpusAvailable : parallelism, x64linux_compiler_list, 'Release', build_shared_libs, specialBranch, false,
false, testList, false, false, false, false, true, false, false, false, false, false, environmentList)}]
false, testList, false, false, false, false, true, false, false, false, false, use_libursa, false, environmentList)}]
}
if (build_scenario == 'Before merge to trunk') {
// TODO 2019-08-14 lebdron: IR-600 Fix integration tests execution when built with shared libraries
// Build with shared libraries
x64LinuxBuildSteps += [{x64LinuxBuildScript.buildSteps(
parallelism==0 ?x64LinuxWorker.cpusAvailable : parallelism, ['gcc5'], build_type, true, false, false,
false, testList, false, false, false, false, false, false, false, false, false, false, environmentList)}]
false, testList, false, false, false, false, false, false, fuzzing, false, useBTF, use_libursa, false, environmentList)}]
if (!use_libursa) {
// Force build with libursa
x64LinuxBuildSteps += [{x64LinuxBuildScript.buildSteps(
parallelism==0 ?x64LinuxWorker.cpusAvailable : parallelism, ['gcc5'], build_type, build_shared_libs, false, false,
testing, testList, false, false, false, false, false, false, fuzzing, coredumps, useBTF, true, false, environmentList)}]
}
}
x64LinuxPostSteps = new Builder.PostSteps(
always: [{x64LinuxBuildScript.alwaysPostSteps(scmVars, environmentList, coredumps)}],

0 comments on commit f6f69a9

Please sign in to comment.
You can’t perform that action at this time.