-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathJenkinsfile
More file actions
147 lines (144 loc) · 5.97 KB
/
Jenkinsfile
File metadata and controls
147 lines (144 loc) · 5.97 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
142
143
144
145
146
147
pipeline{
agent none
options {
timeout(time: 2, unit: 'HOURS')
}
triggers {
cron('30 07 * * *') // run at 07:30
}
stages {
stage('PRAJNA CI'){
// failFast true
parallel {
stage('x64-linux-release') {
agent {
dockerfile {
label 'Sunny'
filename 'ubuntu_dev_jenkins.dockerfile'
dir 'dockerfiles'
// 参数由宿主主机的jenkins账号决定
additionalBuildArgs '''\
--build-arg GID=125 \
--build-arg UID=124 \
--build-arg UNAME=jenkins \
'''
}
}
environment {
CXX = 'clang++'
CC = 'clang'
BUILD_TYPE = 'release'
}
stages {
stage('env') {
steps {
sh 'uname -a'
sh 'echo $USER'
sh 'echo $PATH'
sh 'cmake --version'
sh 'clang++ --version'
sh 'pwd'
sh 'git --version'
}
}
stage('clean') {
when {
anyOf {
branch 'main'
branch 'dev'
}
}
steps {
sh 'git submodule deinit --force --all'
sh 'git clean -xdf .'
}
}
stage('build') {
steps {
sh './scripts/clone_submodules.sh -f --jobs=4 --depth=50'
sh './scripts/configure.sh ${BUILD_TYPE} -DPRAJNA_WITH_JUPYTER=OFF -DPRAJNA_DISABLE_ASSERTS=OFF'
sh './scripts/build.sh ${BUILD_TYPE} install'
}
}
stage('test') {
steps {
sh './scripts/test.sh ${BUILD_TYPE}'
}
}
stage("leak-check") {
steps {
sh 'valgrind --leak-check=full --num-callers=10 --trace-children=yes ./scripts/test.sh ${BUILD_TYPE} --gtest_filter=*TestMatrixMultiplyGemm/f32_500_500_50*'
}
}
}
}
stage('aarch64-osx-release') {
agent {
label 'Mac'
}
environment {
CXX = 'clang++'
CC = 'clang'
BUILD_TYPE = 'release'
}
stages {
stage('env') {
steps {
sh 'echo $USER'
sh 'uname -a'
sh 'cmake --version'
sh 'clang++ --version'
sh 'pwd'
sh 'git --version'
sh 'git config --global --list'
}
}
stage('clean') {
when {
anyOf {
branch 'main'
branch 'dev'
}
}
steps {
sh 'git submodule deinit --force --all'
sh 'git clean -xdf .'
}
}
stage('large-files-check') {
steps {
sh 'echo "Checking for large files..."'
sh 'chmod +x ./scripts/check_large_files.sh'
sh './scripts/check_large_files.sh'
}
}
stage('format') {
steps {
sh 'clang-format --version'
sh 'echo "Running clang-format check..."'
sh './scripts/check_clang_format.sh'
}
}
stage('build') {
steps {
sh './scripts/clone_submodules.sh -f --jobs=4 --depth=50'
sh './scripts/configure.sh ${BUILD_TYPE} -DPRAJNA_WITH_JUPYTER=OFF -DPRAJNA_DISABLE_ASSERTS=OFF'
sh './scripts/build.sh ${BUILD_TYPE} install'
}
}
stage('test') {
steps {
sh './scripts/test.sh ${BUILD_TYPE} --gtest_filter=-*gpu*'
}
}
// stage("leak-check") {
// steps {
// sh 'valgrind --leak-check=full --num-callers=10 --trace-children=yes ./scripts/test.sh ${BUILD_TYPE}'
// }
// }
}
}
}
}
}
}