Skip to content

Commit

Permalink
CI: add option to pass USE_LIBURSA flag on Linux
Browse files Browse the repository at this point in the history
Signed-off-by: Andrei Lebedev <lebdron@gmail.com>
  • Loading branch information
lebdron committed Aug 23, 2019
1 parent 093abe1 commit f6f69a9
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .jenkinsci/builders/x64-linux-build-steps.groovy
Expand Up @@ -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'
Expand Down Expand Up @@ -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)
}
Expand Down
11 changes: 11 additions & 0 deletions .jenkinsci/text-variables.groovy
Expand Up @@ -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>
Expand Down
14 changes: 11 additions & 3 deletions Jenkinsfile
Expand Up @@ -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)

Expand Down Expand Up @@ -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)}],
Expand Down

0 comments on commit f6f69a9

Please sign in to comment.