pipeline { environment { BUILDDIR_HOST = 'cmake-build-tests-host' BUILDDIR_LINUX = 'cmake-build-tests-linux' BUILDDIR_FREERTOS = 'cmake-build-tests-freertos' BUILDDIR_RTEMS = 'cmake-build-tests-rtems' BUILDDIR_WIN = 'cmake-build-tests-windows' DOCDDIR = 'cmake-build-documentation' } agent { docker { image 'fsfw-ci:d9' args '--network host --sysctl fs.mqueue.msg_max=100' } } stages { stage('x64-linux-clang-host') { steps { sh 'rm -rf $BUILDDIR_HOST' dir(BUILDDIR_HOST) { 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' } } } stage('x64-linux-gcc') { steps { sh 'rm -rf $BUILDDIR_LINUX' 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' } } } 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' } } } stage('aarch64-rtems6-gcc') { steps { sh 'rm -rf $BUILDDIR_RTEMS' dir(BUILDDIR_RTEMS) { 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 ..' 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' } } } stage('x64-windows-msvc-host') { steps { sh 'rm -rf $BUILDDIR_WIN' dir(BUILDDIR_WIN) { 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 ..' sh 'cmake --build . -j4' sh 'wine64 fsfw-tests.exe' } } } stage('Documentation') { when { branch 'development' } steps { dir(DOCDDIR) { sh 'cmake -DFSFW_BUILD_DOCS=ON -DFSFW_OSAL=host ..' sh 'make Sphinx' sshagent(credentials: ['documentation-buildfix']) { sh 'rsync -r --delete docs/sphinx/* buildfix@documentation.irs.uni-stuttgart.de:/fsfw/development' } } dir(BUILDDIR_LINUX) { sshagent(credentials: ['documentation-buildfix']) { sh 'rsync -r --delete fsfw-tests_coverage/* buildfix@documentation.irs.uni-stuttgart.de:/fsfw/coverage/development' } } } } stage('Master Documentation') { when { branch 'master' } steps { dir(DOCDDIR) { sh 'cmake -DFSFW_BUILD_DOCS=ON -DFSFW_OSAL=host ..' sh 'make Sphinx' sshagent(credentials: ['documentation-buildfix']) { sh 'rsync -r --delete docs/sphinx/* buildfix@documentation.irs.uni-stuttgart.de:/fsfw/master' } } dir(BUILDDIR_LINUX) { sshagent(credentials: ['documentation-buildfix']) { sh 'rsync -r --delete fsfw-tests_coverage/* buildfix@documentation.irs.uni-stuttgart.de:/fsfw/coverage/master' } } } } } }