forked from harmsm/coraxlib
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJenkinsfile
More file actions
141 lines (141 loc) · 5.68 KB
/
Jenkinsfile
File metadata and controls
141 lines (141 loc) · 5.68 KB
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
pipeline {
agent {
label 'cme-eastwatch'
}
stages {
stage('BuildAndTest') {
matrix {
axes {
axis {
name 'DOCKERFILE'
values 'dockerfile-gcc-7', 'dockerfile-gcc-8', 'dockerfile-gcc-9', 'dockerfile-gcc-10', 'dockerfile-gcc-11', 'dockerfile-gcc-12', 'dockerfile-clang'
}
axis {
name 'RELEASE_TYPE'
values 'debug', 'release'
}
axis {
name 'BUILD_DIFFICULTY'
values '0', '1'
}
}
excludes {
exclude {
axis {
name 'DOCKERFILE'
values 'dockerfile-gcc-7', 'dockerfile-gcc-8', 'dockerfile-gcc-9', 'dockerfile-gcc-10'
}
axis {
name 'RELEASE_TYPE'
values 'release'
}
axis {
name 'BUILD_DIFFICULTY'
values '0'
}
}
}
agent {
dockerfile {
reuseNode true
filename "${DOCKERFILE}"
dir 'ci'
}
}
environment {
BUILD_DIR = "BUILD_DIR_${DOCKERFILE}_${RELEASE_TYPE}_${BUILD_DIFFICULTY}"
}
stages {
stage('Submodules') {
steps {
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
sh """#!/bin/bash
echo Get submodules for ${DOCKERFILE} - ${RELEASE_TYPE} - DIFFICULTY_PRED=${BUILD_DIFFICULTY}
set -exo pipefail
git submodule update --recursive --init
"""
}
}
}
stage('Build') {
steps {
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
sh """#!/bin/bash
echo Do Build for ${DOCKERFILE} - ${RELEASE_TYPE} - DIFFICULTY_PRED=${BUILD_DIFFICULTY}
set -exo pipefail
rm -fr ${BUILD_DIR} && mkdir -p ${BUILD_DIR} && cd ${BUILD_DIR}
cmake -DCMAKE_BUILD_TYPE=${RELEASE_TYPE} -DCORAX_BUILD_TESTS=1 -DCORAX_BUILD_DIFFICULTY_PREDICTION=${BUILD_DIFFICULTY} -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY=${BUILD_DIR}/bin -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=${BUILD_DIR}/bin .. 2>&1 |tee cmake.out
make 2>&1 |tee make.out"""
}
}
}
stage('Test') {
steps {
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
sh """#!/bin/bash
echo Run Tests for ${DOCKERFILE} - ${RELEASE_TYPE} - DIFFICULTY_PRED=${BUILD_DIFFICULTY}
set -exo pipefail
cd ${BUILD_DIR}/test && make test"""
}
}
}
}
}
}
stage('Benchmark') {
agent {
dockerfile {
reuseNode true
filename 'dockerfile-gcc-11-bench'
dir 'ci'
}
}
environment {
BUILD_DIR = "BUILD_DIR_benchmark" // for now, only use gcc-11 to build and run the benchmark
}
stages {
stage('Build Benchmark') {
steps {
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
sh """#!/bin/bash
echo Do Build for Benchmark
set -exo pipefail
rm -fr ${BUILD_DIR} && mkdir -p ${BUILD_DIR} && cd ${BUILD_DIR}
cmake -DCORAX_BUILD_BENCHMARKS=1 .. 2>&1 |tee cmake.out
make 2>&1 |tee make.out"""
}
}
}
stage('Run Benchmark') {
steps {
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
sh """#!/bin/bash
echo Run Benchmarks
set -exo pipefail
cd ${BUILD_DIR}
./bench/corax-bench 2>&1 |tee bench.out"""
}
}
}
}
}
stage('Softwipe') {
agent {
dockerfile {
reuseNode true
filename 'dockerfile-softwipe'
dir 'ci'
}
}
stages {
stage('Run Softwipe') {
steps {
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
sh 'softwipe.py -CM . 2>&1 |tee softwipe_general.txt'
}
}
}
}
}
}
}