fsfw/automation/Jenkinsfile

114 lines
4.4 KiB
Plaintext
Raw Normal View History

2021-10-25 14:59:16 +02:00
pipeline {
2021-10-26 20:30:22 +02:00
environment {
2023-01-12 15:40:52 +01:00
BUILDDIR_HOST = 'cmake-build-tests-host'
BUILDDIR_LINUX = 'cmake-build-tests-linux'
BUILDDIR_FREERTOS = 'cmake-build-tests-freertos'
2023-01-19 17:32:23 +01:00
BUILDDIR_RTEMS = 'cmake-build-tests-rtems'
2023-02-06 22:45:00 +01:00
BUILDDIR_WIN = 'cmake-build-tests-windows'
2022-09-13 13:54:23 +02:00
DOCDDIR = 'cmake-build-documentation'
2021-10-26 20:30:22 +02:00
}
agent {
2022-09-13 14:46:12 +02:00
docker {
2023-02-08 14:08:09 +01:00
image 'fsfw-ci:d9'
2023-01-12 15:40:52 +01:00
args '--network host --sysctl fs.mqueue.msg_max=100'
2022-09-13 14:46:12 +02:00
}
}
stages {
2023-02-09 13:32:38 +01:00
stage('x64-linux-clang-host') {
steps {
sh 'rm -rf $BUILDDIR_HOST'
2023-01-13 17:37:22 +01:00
dir(BUILDDIR_HOST) {
2023-02-06 22:45:00 +01:00
sh 'CC=clang CXX=clang++ cmake -DFSFW_OSAL=host -DFSFW_BUILD_TESTS=ON -DFSFW_CICD_BUILD=ON ..'
sh 'cmake --build . -j4'
sh 'valgrind --leak-check=full --error-exitcode=1 ./fsfw-tests'
2021-10-25 14:59:16 +02:00
}
}
}
2023-02-09 13:32:38 +01:00
stage('x64-linux-gcc') {
steps {
2023-01-13 17:37:22 +01:00
sh 'rm -rf $BUILDDIR_LINUX'
2023-01-13 17:37:22 +01:00
dir(BUILDDIR_LINUX) {
sh 'cmake -DFSFW_OSAL=linux -DFSFW_BUILD_TESTS=ON -DFSFW_CICD_BUILD=ON ..'
sh 'cmake --build . -j4'
sh 'cmake --build . -- fsfw-tests_coverage -j4'
sh 'valgrind --leak-check=full --error-exitcode=1 ./fsfw-tests'
2023-01-12 15:40:52 +01:00
}
}
}
2023-02-09 13:32:38 +01:00
stage('x64-FreeRTOS-gcc') {
steps {
sh 'rm -rf $BUILDDIR_FREERTOS'
dir(BUILDDIR_FREERTOS) {
sh 'cmake -DFSFW_OSAL=freertos -DFSFW_BUILD_TESTS=ON -DFSFW_CICD_BUILD=ON ..'
sh 'cmake --build . -j4'
sh './fsfw-tests'
//sh 'valgrind --leak-check=full --error-exitcode=1 ./fsfw-tests'
2021-10-27 21:32:40 +02:00
}
}
}
2023-02-09 13:32:38 +01:00
stage('aarch64-rtems6-gcc') {
2023-01-19 17:32:23 +01:00
steps {
sh 'rm -rf $BUILDDIR_RTEMS'
dir(BUILDDIR_RTEMS) {
2023-02-09 13:32:38 +01:00
sh 'cmake -DFSFW_OSAL=rtems -DFSFW_BUILD_TESTS=ON -DFSFW_TESTS_GEN_COV=OFF -DFSFW_CICD_BUILD=ON -DCMAKE_TOOLCHAIN_FILE=../cmake/aarch64-rtems6-gcc.cmake ..'
2023-01-19 17:32:23 +01:00
sh 'cmake --build . -j4'
sh 'qemu-system-aarch64 -no-reboot -nographic -serial mon:stdio -semihosting -machine virt,gic-version=3 -cpu cortex-a72 -m 4000 -kernel fsfw-tests'
}
}
}
2023-02-09 13:32:38 +01:00
stage('x64-windows-msvc-host') {
2023-02-06 22:45:00 +01:00
steps {
sh 'rm -rf $BUILDDIR_WIN'
dir(BUILDDIR_WIN) {
2023-02-09 13:32:38 +01:00
sh 'cmake -DFSFW_OSAL=host -DFSFW_BUILD_TESTS=ON -DFSFW_TESTS_GEN_COV=OFF -DFSFW_CICD_BUILD=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=../cmake/x64-windows-msvc.cmake -GNinja ..'
2023-02-06 22:45:00 +01:00
sh 'cmake --build . -j4'
2023-02-08 14:08:09 +01:00
sh 'wine64 fsfw-tests.exe'
2023-02-06 22:45:00 +01:00
}
}
}
2022-09-13 13:54:23 +02:00
stage('Documentation') {
2022-09-13 14:20:30 +02:00
when {
2022-09-30 14:40:59 +02:00
branch 'development'
2022-09-13 14:20:30 +02:00
}
2022-09-13 13:54:23 +02:00
steps {
dir(DOCDDIR) {
sh 'cmake -DFSFW_BUILD_DOCS=ON -DFSFW_OSAL=host ..'
sh 'make Sphinx'
sshagent(credentials: ['documentation-buildfix']) {
2022-09-23 20:26:45 +02:00
sh 'rsync -r --delete docs/sphinx/* buildfix@documentation.irs.uni-stuttgart.de:/fsfw/development'
2022-09-13 13:54:23 +02:00
}
}
dir(BUILDDIR_LINUX) {
sshagent(credentials: ['documentation-buildfix']) {
2022-09-23 20:26:45 +02:00
sh 'rsync -r --delete fsfw-tests_coverage/* buildfix@documentation.irs.uni-stuttgart.de:/fsfw/coverage/development'
}
}
2022-09-13 13:54:23 +02:00
}
}
2022-09-13 14:20:30 +02:00
stage('Master Documentation') {
when {
2022-09-30 14:40:59 +02:00
branch 'master'
2022-09-13 14:20:30 +02:00
}
steps {
dir(DOCDDIR) {
sh 'cmake -DFSFW_BUILD_DOCS=ON -DFSFW_OSAL=host ..'
sh 'make Sphinx'
sshagent(credentials: ['documentation-buildfix']) {
2022-09-23 20:26:45 +02:00
sh 'rsync -r --delete docs/sphinx/* buildfix@documentation.irs.uni-stuttgart.de:/fsfw/master'
2022-09-13 14:20:30 +02:00
}
}
dir(BUILDDIR_LINUX) {
sshagent(credentials: ['documentation-buildfix']) {
2022-09-23 20:26:45 +02:00
sh 'rsync -r --delete fsfw-tests_coverage/* buildfix@documentation.irs.uni-stuttgart.de:/fsfw/coverage/master'
}
}
2022-09-13 14:20:30 +02:00
}
}
2021-10-25 14:59:16 +02:00
}
}