pipeline {
	agent { label 'c++20' }

	stages {
		stage('Build') {
			steps {
				echo 'Building...'
				sh 'rm -Rf build'
				sh './bootstrap.sh'
			}
		}
		stage('Test') {
			steps {
				echo 'Testing...'
				sh './ctor check'
			}
		}
	}

	post {
		always {
			xunit(thresholds: [ skipped(failureThreshold: '0'),
			                    failed(failureThreshold: '0') ],
			      tools: [ CppUnit(pattern: 'build/test/*.xml') ])
		}
	}
}