From 78c5477b3989d67169de2d05665adfb801caab23 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Sun, 22 Dec 2024 17:53:10 +0100 Subject: Refactor Jenkinsfile to be more per-target grouped. --- Jenkinsfile | 66 +++++++++++++++++++++++++++---------------------------------- 1 file changed, 29 insertions(+), 37 deletions(-) (limited to 'Jenkinsfile') diff --git a/Jenkinsfile b/Jenkinsfile index c95b0eb..290f412 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,56 +1,48 @@ pipeline { - agent { label 'c++20' } - + agent any stages { - stage('Clean') { + //////////////////////////////////////////////////// + stage('Linux gcc') { + agent { label 'linux && gcc && c++20' } steps { echo 'Cleaning workspace ...' - sh 'rm -Rf build*' - } - } - stage('Build-gcc') { - steps { + sh 'git clean -d -x -f' echo 'Building (gcc) ...' - sh 'BUILDDIR=build-gcc CXX=g++ ./bootstrap.sh' - } - } - stage('Test-gcc') { - steps { + sh 'CXX=g++ ./bootstrap.sh' echo 'Testing (gcc) ...' sh './ctor check' - } - } - stage('Test-suite-gcc') { - steps { echo 'Testing suite (gcc) ...' - sh '(cd test/suite; CTORDIR=../../build-gcc CXX=g++ ./test.sh)' + sh '(cd test/suite; CTORDIR=../../build CXX=g++ ./test.sh)' } - } - stage('Build-clang') { - steps { - echo 'Building (clang) ...' - sh 'BUILDDIR=build-clang CXX=clang++ ./bootstrap.sh' + post { + always { + xunit(thresholds: [ skipped(failureThreshold: '0'), + failed(failureThreshold: '0') ], + tools: [ CppUnit(pattern: 'build/test/*.xml') ]) + } } } - stage('Test-clang') { + //////////////////////////////////////////////////// + stage('Linux clang') { + agent { label 'linux && clang && c++20' } steps { + echo 'Cleaning workspace ...' + sh 'git clean -d -x -f' + echo 'Building (clang) ...' + sh 'CXX=clang++ ./bootstrap.sh' echo 'Testing (clang) ...' sh './ctor check' - } - } - stage('Test-suite-clang') { - steps { echo 'Testing suite (clang) ...' - sh '(cd test/suite; CTORDIR=../../build-clang CXX=clang++ ./test.sh)' + sh '(cd test/suite; CTORDIR=../../build CXX=clang++ ./test.sh)' + } + post { + always { + xunit(thresholds: [ skipped(failureThreshold: '0'), + failed(failureThreshold: '0') ], + tools: [ CppUnit(pattern: 'build/test/*.xml') ]) + } } } - } - - post { - always { - xunit(thresholds: [ skipped(failureThreshold: '0'), - failed(failureThreshold: '0') ], - tools: [ CppUnit(pattern: 'build-*/test/*.xml') ]) - } + //////////////////////////////////////////////////// } } -- cgit v1.2.3