-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathJenkinsfile
76 lines (75 loc) · 2.22 KB
/
Jenkinsfile
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
/*
Copyright (c) 2021-2024 IAR Systems AB.
See LICENSE for detailed license information.
*/
pipeline {
agent {
/* The Docker image: change it according to your needs. */
docker {
image 'iarsystems/bxarm:9.50.1'
args '-v LMS2:/usr/local/etc/IARSystems -e HOME=${WORKSPACE} --hostname ${NODE_NAME}'
}
}
/* The environment: change it according to your needs. */
environment {
BX_BINDIR = "/opt/iarsystems/bxarm/arm/bin"
BX_COMMON = "/opt/iarsystems/bxarm/common/bin"
TARGET_DIR = "targets/arm"
BUILD_TYPE = 'Release'
}
stages {
stage('Test compiler') {
steps {
echo 'If this stage fails, it is likely there is a license issue.'
sh '${BX_BINDIR}/icc`basename ${TARGET_DIR}` --version'
}
}
/* Build stages */
stage('Build: library') {
steps {
sh '${BX_COMMON}/iarbuild ${TARGET_DIR}/library.ewp -build ${BUILD_TYPE}'
}
}
stage('Build: test-crc16') {
steps {
sh '${BX_COMMON}/iarbuild ${TARGET_DIR}/test-crc16.ewp -build ${BUILD_TYPE}'
}
}
stage('Build: test-crc32') {
steps {
sh '${BX_COMMON}/iarbuild ${TARGET_DIR}/test-crc32.ewp -build ${BUILD_TYPE}'
}
}
/* Analysis stages */
stage('Analyze: library') {
steps {
sh '${BX_COMMON}/iarbuild ${TARGET_DIR}/library.ewp -cstat_analyze ${BUILD_TYPE}'
}
}
stage('Analyze: test-crc16') {
steps {
sh '${BX_COMMON}/iarbuild ${TARGET_DIR}/test-crc16.ewp -cstat_analyze ${BUILD_TYPE}'
}
}
stage('Analyze: test-crc32') {
steps {
sh '${BX_COMMON}/iarbuild ${TARGET_DIR}/test-crc32.ewp -cstat_analyze ${BUILD_TYPE}'
}
}
}
/* Post stages */
post {
always {
echo 'This will always execute at the pipeline ending.'
/* Load the C-STAT warnings for the recordIssues() function from the warnings-ng plugin */
sh '${BX_BINDIR}/icstat --db ${TARGET_DIR}/${BUILD_TYPE}/C-STAT/cstat.db load'
recordIssues(tools: [iar(), iarCstat()])
}
failure {
echo 'This will execute when one or more pipeline stages fail.'
}
success {
echo 'This will execute when all pipeline stages are succesful.'
}
}
}