Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
Firmware
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alberto Ruiz Garcia
Firmware
Commits
92d288e8
Commit
92d288e8
authored
6 years ago
by
Daniel Agar
Browse files
Options
Downloads
Patches
Plain Diff
Jenkins SITL tests add cmake build type choice
parent
28125aca
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.ci/Jenkinsfile-SITL_tests
+77
-30
77 additions, 30 deletions
.ci/Jenkinsfile-SITL_tests
Jenkinsfile
+0
-106
0 additions, 106 deletions
Jenkinsfile
with
77 additions
and
136 deletions
.ci/Jenkinsfile-SITL_tests
+
77
−
30
View file @
92d288e8
...
...
@@ -2,40 +2,84 @@
pipeline
{
agent
none
stages
{
parameters
{
choice
(
name:
'CMAKE_BUILD_TYPE'
,
choices:
[
'RelWithDebInfo'
,
'Coverage'
,
'AddressSanitizer'
],
description:
"CMake build type"
)
}
stages
{
stage
(
'Build'
)
{
steps
{
script
{
stage
(
'sitl package'
)
{
node
{
docker
.
image
(
"px4io/px4-dev-ros:2018-07-19"
).
inside
(
'-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw -e HOME=$WORKSPACE'
)
{
stage
(
"sitl package"
)
{
try
{
checkout
(
scm
)
sh
(
'export'
)
sh
(
'make distclean'
)
sh
"ccache -z"
sh
(
'make posix_sitl_default'
)
sh
"ccache -s"
sh
(
'make posix_sitl_default sitl_gazebo'
)
sh
"ccache -s"
sh
(
'make posix_sitl_default package'
)
stash
(
name:
"px4_sitl_package"
,
includes:
"build/posix_sitl_default/*.bz2"
)
}
catch
(
exc
)
{
throw
(
exc
)
}
finally
{
sh
(
'make distclean'
)
}
}
}
parallel
{
stage
(
'sitl package'
)
{
agent
{
docker
{
image
'px4io/px4-dev-ros:2018-07-19'
args
'-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw -e HOME=$WORKSPACE'
}
}
}
// script
}
// steps
}
// Build
steps
{
sh
(
'export'
)
sh
(
'make distclean'
)
sh
"ccache -z"
sh
(
'make posix_sitl_default'
)
sh
"ccache -s"
sh
(
'make posix_sitl_default sitl_gazebo'
)
sh
"ccache -s"
sh
(
'make posix_sitl_default package'
)
stash
(
name:
"px4_sitl_package"
,
includes:
"build/posix_sitl_default/*.bz2"
)
sh
'make distclean'
}
}
stage
(
'unit tests'
)
{
agent
{
docker
{
image
'px4io/px4-dev-base:2018-07-19'
args
'-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
}
}
steps
{
sh
'export'
sh
'make distclean'
sh
'ccache -z'
sh
'make posix_sitl_default test_results_junit'
sh
'ccache -s'
junit
'build/posix_sitl_default/JUnitTestResults.xml'
withCredentials
([
string
(
credentialsId:
'FIRMWARE_CODECOV_TOKEN'
,
variable:
'CODECOV_TOKEN'
)])
{
sh
'curl -s https://codecov.io/bash | bash -s - -F unittest'
}
sh
'make distclean'
}
}
stage
(
'code coverage (python)'
)
{
agent
{
docker
{
image
'px4io/px4-dev-base:2018-08-04'
args
'-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
}
}
steps
{
sh
'export'
sh
'make distclean'
sh
'make python_coverage'
withCredentials
([
string
(
credentialsId:
'FIRMWARE_CODECOV_TOKEN'
,
variable:
'CODECOV_TOKEN'
)])
{
sh
'curl -s https://codecov.io/bash | bash -s - -F python'
}
sh
'make distclean'
}
when
{
environment
name:
'CMAKE_BUILD_TYPE'
,
value:
'Coverage'
}
}
}
// parallel
}
// stage Build
stage
(
'ROS Tests'
)
{
steps
{
...
...
@@ -129,6 +173,9 @@ def createTestNode(Map test_def) {
finally
{
sh
(
'px4-posix_sitl_default*/px4/Tools/upload_log.py -q --description "${JOB_NAME}: ${STAGE_NAME}" --feedback "${JOB_NAME} ${CHANGE_TITLE} ${CHANGE_URL}" --source CI .ros/log/*/*.ulg'
)
archiveArtifacts
(
allowEmptyArchive:
false
,
artifacts:
'.ros/**/*.pdf, .ros/**/*.csv'
)
withCredentials
([
string
(
credentialsId:
'FIRMWARE_CODECOV_TOKEN'
,
variable:
'CODECOV_TOKEN'
)])
{
sh
'curl -s https://codecov.io/bash | bash -s - -F mission'
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Jenkinsfile
+
0
−
106
View file @
92d288e8
...
...
@@ -160,115 +160,9 @@ pipeline {
}
}
stage
(
'code coverage (mission test)'
)
{
agent
{
docker
{
image
'px4io/px4-dev-ros:2018-07-19'
args
'-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw -e HOME=$WORKSPACE'
}
}
steps
{
sh
'export'
sh
'make distclean; rm -rf .ros; rm -rf .gazebo'
sh
'ulimit -c unlimited; make tests_mission_coverage'
withCredentials
([
string
(
credentialsId:
'FIRMWARE_CODECOV_TOKEN'
,
variable:
'CODECOV_TOKEN'
)])
{
sh
'curl -s https://codecov.io/bash | bash -s - -F mission'
}
sh
'make distclean'
}
}
stage
(
'code coverage (unit tests)'
)
{
agent
{
docker
{
image
'px4io/px4-dev-base:2018-07-19'
args
'-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
}
}
steps
{
sh
'export'
sh
'make distclean'
sh
'ulimit -c unlimited; make tests_coverage || true'
// always pass for now
withCredentials
([
string
(
credentialsId:
'FIRMWARE_CODECOV_TOKEN'
,
variable:
'CODECOV_TOKEN'
)])
{
sh
'curl -s https://codecov.io/bash | bash -s - -F unittests'
}
sh
'make distclean'
}
post
{
failure
{
sh
(
'ls -a'
)
sh
(
'find . -name core'
)
sh
(
'gdb --batch --quiet -ex "thread apply all bt full" -ex "quit" build/posix_sitl_default/px4 core || true'
)
// always pass for now
}
}
}
stage
(
'code coverage (python)'
)
{
agent
{
docker
{
image
'px4io/px4-dev-base:2018-08-04'
args
'-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
}
}
steps
{
sh
'export'
sh
'make distclean'
sh
'make python_coverage'
withCredentials
([
string
(
credentialsId:
'FIRMWARE_CODECOV_TOKEN'
,
variable:
'CODECOV_TOKEN'
)])
{
sh
'curl -s https://codecov.io/bash | bash -s - -F python'
}
sh
'make distclean'
}
}
}
// parallel
}
// stage Analysis
stage
(
'Test'
)
{
parallel
{
stage
(
'unit tests'
)
{
agent
{
docker
{
image
'px4io/px4-dev-base:2018-07-19'
args
'-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
}
}
steps
{
sh
'export'
sh
'make distclean'
sh
'ccache -z'
sh
'make posix_sitl_default test_results_junit'
sh
'ccache -s'
junit
'build/posix_sitl_default/JUnitTestResults.xml'
sh
'make distclean'
}
}
stage
(
'unit tests (address sanitizer)'
)
{
agent
{
docker
{
image
'px4io/px4-dev-base:2018-07-19'
args
'-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
}
}
environment
{
PX4_ASAN
=
1
ASAN_OPTIONS
=
"color=always:check_initialization_order=1:detect_stack_use_after_return=1"
}
steps
{
sh
'export'
sh
'make distclean'
sh
'ccache -z'
sh
'make tests || true'
// always pass for now, TODO: PX4 sitl clean shutdown
sh
'ccache -s'
sh
'make distclean'
}
}
}
// parallel
}
// stage Test
stage
(
'Generate Metadata'
)
{
parallel
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment