Now that the build has become reliable - remove some debug; Refactor clean up and build set up
This commit is contained in:
parent
6efe9ade3d
commit
e5aa2bc640
1 changed files with 25 additions and 8 deletions
|
|
@ -61,7 +61,27 @@ def doExport(exportfolder, exportpathlist, project = "", build_variant = "") {
|
|||
}
|
||||
|
||||
// Build and export files
|
||||
def doBuild(apps, exportfolder = "${WORKSPACE}/bin") {
|
||||
def doRegisterToolchain(ds5folder, toolchainfolder) {
|
||||
# Register toolchain (if it is not already)
|
||||
if (isUnix()) {
|
||||
sh """
|
||||
"${ds5folder}/bin/add_toolchain" --non-interactive "${toolchainfolder}"
|
||||
"""
|
||||
env.PATH = env.TOOLCHAIN_FOLDER + ":" + env.PATH
|
||||
}
|
||||
else {
|
||||
bat """
|
||||
"%ds5folder%\\bin\\add_toolchain" --non-interactive "%toolchainfolder%"
|
||||
"""
|
||||
env.PATH = env.TOOLCHAIN_FOLDER + ";" + env.PATH
|
||||
}
|
||||
echo "Path is: ${PATH}"
|
||||
}
|
||||
|
||||
// Build and export files
|
||||
def doBuild(apps, ds5folder, toolchainfolder, ds5shellcommand, buildcommand, exportfolder = "${WORKSPACE}/bin") {
|
||||
doKillLeftovers()
|
||||
doRegisterToolchain(ds5folder, toolchainfolder
|
||||
for (appInfo in apps ) {
|
||||
(build, cleanbuild, project, variants, exportpathlist) = appInfo
|
||||
if (build) {
|
||||
|
|
@ -73,20 +93,17 @@ def doBuild(apps, exportfolder = "${WORKSPACE}/bin") {
|
|||
}
|
||||
for (build_variant in variants) {
|
||||
retry(maxprojectbuildretries) { // Eclipse occasionally raises exceptions (rather than the builds failing)
|
||||
echo "Build command: ${DS5SHELL} \'${BUILD_COMMAND} ${buildtype} \"${project}/${build_variant}\"\'"
|
||||
doKillLeftovers()
|
||||
echo "Build command: ${ds5shellcommand} \'${buildcommand} ${buildtype} \"${project}/${build_variant}\"\'"
|
||||
if (isUnix()) {
|
||||
sh """
|
||||
# Register toolchain (if it is not already)
|
||||
"${DS5_FOLDER}/bin/add_toolchain" --non-interactive "${TOOLCHAIN_FOLDER}"
|
||||
echo Start time: `date`
|
||||
${DS5SHELL} \'${BUILD_COMMAND} ${buildtype} \"${project}/${build_variant}\"\'
|
||||
${ds5shellcommand} \'${buildcommand} ${buildtype} \"${project}/${build_variant}\"\'
|
||||
echo End time: `date`
|
||||
"""
|
||||
}
|
||||
else {
|
||||
bat """
|
||||
"%DS5SHELL%" "%BUILD_COMMAND%" ${buildtype} "${project}\\${build_variant}"
|
||||
"%ds5shellcommand%" "%buildcommand%" ${buildtype} "${project}\\${build_variant}"
|
||||
"""
|
||||
}
|
||||
doExport(exportfolder, exportpathlist, "", build_variant)
|
||||
|
|
@ -102,4 +119,4 @@ def doBuild(apps, exportfolder = "${WORKSPACE}/bin") {
|
|||
}
|
||||
}
|
||||
|
||||
return this;
|
||||
return this;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue