Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jenkins split eagle_default build and print bloaty top 100 comparison #9228

Merged
merged 3 commits into from
Apr 2, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
branch = master
[submodule "cmake/cmake_hexagon"]
path = cmake/cmake_hexagon
url = https://github.com/ATLFlight/cmake_hexagon
url = https://github.com/ATLFlight/cmake_hexagon.git
branch = master
[submodule "src/drivers/gps/devices"]
path = src/drivers/gps/devices
Expand Down
69 changes: 39 additions & 30 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,12 @@ pipeline {

def docker_base = "px4io/px4-dev-base:2018-03-30"
def docker_nuttx = "px4io/px4-dev-nuttx:2018-03-30"
def docker_ros = "px4io/px4-dev-ros:2018-03-30"
def docker_rpi = "px4io/px4-dev-raspi:2018-03-30"
def docker_armhf = "px4io/px4-dev-armhf:2017-12-30"
def docker_arch = "px4io/px4-dev-base-archlinux:2018-03-30"
def docker_snapdragon = "lorenzmeier/px4-dev-snapdragon:2017-12-29"
def docker_clang = "px4io/px4-dev-clang:2018-03-30"

// fmu-v2_{default, lpe} and fmu-v3_{default, rtps}
// bloaty compare to last successful master build
Expand All @@ -38,14 +41,14 @@ pipeline {
sh "make px4io-v2_default"
sh "make nuttx_px4fmu-v2_default"
// bloaty output and compare with last successful master
sh "bloaty -n 100 -d symbols -s file build/nuttx_px4fmu-v2_default/nuttx_px4fmu-v2_default.elf"
sh "bloaty -n 100 -d compileunits -s file build/nuttx_px4fmu-v2_default/nuttx_px4fmu-v2_default.elf"
sh "bloaty -d symbols -n 100 -s file build/nuttx_px4fmu-v2_default/nuttx_px4fmu-v2_default.elf"
sh "bloaty -d compileunits -n 100 -s file build/nuttx_px4fmu-v2_default/nuttx_px4fmu-v2_default.elf"
sh "wget --no-verbose -N https://s3.amazonaws.com/px4-travis/Firmware/master/nuttx_px4fmu-v2_default.elf"
sh "bloaty -d symbols -C full -s file build/nuttx_px4fmu-v2_default/nuttx_px4fmu-v2_default.elf -- nuttx_px4fmu-v2_default.elf"
sh "bloaty -d symbols -n 100 -C full -s file build/nuttx_px4fmu-v2_default/nuttx_px4fmu-v2_default.elf -- nuttx_px4fmu-v2_default.elf"
sh "make nuttx_px4fmu-v2_lpe"
sh "make nuttx_px4fmu-v3_default"
sh "wget --no-verbose -N https://s3.amazonaws.com/px4-travis/Firmware/master/nuttx_px4fmu-v3_default.elf"
sh "bloaty -d symbols -C full -s file build/nuttx_px4fmu-v3_default/nuttx_px4fmu-v3_default.elf -- nuttx_px4fmu-v3_default.elf"
sh "bloaty -d symbols -n 100 -C full -s file build/nuttx_px4fmu-v3_default/nuttx_px4fmu-v3_default.elf -- nuttx_px4fmu-v3_default.elf"
sh "make nuttx_px4fmu-v3_rtps"
sh "make sizes"
sh "ccache -s"
Expand All @@ -69,35 +72,18 @@ pipeline {
builds[node_name] = createBuildNode(docker_nuttx, "${node_name}_default")
}

builds["sitl"] = createBuildNode(docker_base, "posix_sitl_default")
builds["sitl_rtps"] = createBuildNode(docker_base, "posix_sitl_rtps")
builds["sitl (GCC 7)"] = createBuildNode(docker_arch, "posix_sitl_default")
builds["sitl"] = createBuildNode(docker_base, 'posix_sitl_default')
builds["sitl_rtps"] = createBuildNode(docker_base, 'posix_sitl_rtps')
builds["sitl (GCC 7)"] = createBuildNode(docker_arch, 'posix_sitl_default')

builds["rpi"] = createBuildNode(docker_rpi, "posix_rpi_cross")
builds["bebop"] = createBuildNode(docker_rpi, "posix_bebop_default")
builds["rpi"] = createBuildNode(docker_rpi, 'posix_rpi_cross')
builds["bebop"] = createBuildNode(docker_rpi, 'posix_bebop_default')

builds["ocpoc"] = createBuildNode(docker_armhf, "posix_ocpoc_ubuntu")
builds["ocpoc"] = createBuildNode(docker_armhf, 'posix_ocpoc_ubuntu')

// snapdragon eagle (posix + qurt)
builds["eagle"] = {
node {
stage("Build Test eagle_default") {
docker.withRegistry('https://registry.hub.docker.com', 'docker_hub_dagar') {
docker.image("lorenzmeier/px4-dev-snapdragon:2017-12-29").inside('-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw') {
stage("eagle_default") {
checkout scm
sh "export"
sh "make distclean"
sh "ccache -z"
sh "make eagle_default"
sh "ccache -s"
sh "make distclean"
}
}
}
}
}
}
// snapdragon (eagle_default)
builds["eagle (linux)"] = createBuildNodeDockerLogin(docker_snapdragon, 'docker_hub_dagar', 'posix_eagle_default')
builds["eagle (qurt)"] = createBuildNodeDockerLogin(docker_snapdragon, 'docker_hub_dagar', 'qurt_eagle_default')

parallel builds
} // script
Expand Down Expand Up @@ -529,3 +515,26 @@ def createBuildNode(String docker_repo, String target) {
}
}
}

def createBuildNodeDockerLogin(String docker_repo, String docker_credentials, String target) {
return {
node {
docker.withRegistry('https://registry.hub.docker.com', docker_credentials) {
docker.image(docker_repo).inside('-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw') {
stage(target) {
sh('export')
checkout scm
sh('make distclean')
sh('git fetch --tags')
sh('ccache -z')
sh('make ' + target)
sh('ccache -s')
sh('make sizes')
archiveArtifacts(allowEmptyArchive: true, artifacts: 'build/**/*.px4, build/**/*.elf', fingerprint: true, onlyIfSuccessful: true)
sh('make distclean')
}
}
}
}
}
}