summaryrefslogtreecommitdiff
path: root/Jenkinsfile
blob: 9a99f2d44453f6002028515b615a76675ab51edd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
pipeline {
	agent { label 'c++20' }

	stages {
		stage('Clean') {
			steps {
				echo 'Cleaning workspace ...'
				sh 'rm -Rf build build-gcc build-clang'
			}
		}
		stage('Build-gcc') {
			steps {
				echo 'Building (gcc) ...'
				sh './bootstrap.sh'
			}
		}
		stage('Test-gcc') {
			steps {
				echo 'Testing (gcc) ...'
				sh './ctor check'
			}
			post {
				always {
					sh 'mv build build-gcc'
				}
			}
		}
		stage('Build-clang') {
			steps {
				echo 'Building (clang) ...'
				sh 'CXX=clang++ ./bootstrap.sh'
			}
		}
		stage('Test-clang') {
			steps {
				echo 'Testing (clang) ...'
				sh './ctor check'
			}
			post {
				always {
					sh 'mv build build-clang'
				}
			}
		}
	}

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