Skip to content

Commit 374269a

Browse files
committed
[add]Jenkinsfile for CI.
1 parent fe67df3 commit 374269a

File tree

1 file changed

+157
-0
lines changed

1 file changed

+157
-0
lines changed

Jenkinsfile

Lines changed: 157 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,157 @@
1+
pipeline {
2+
agent {
3+
docker {
4+
image 'ubuntu_ci:latest'
5+
}
6+
}
7+
stages {
8+
stage('build') {
9+
steps {
10+
sh '''
11+
12+
uname -a
13+
cat /etc/issue
14+
apt-get update
15+
apt-get install -y -qq lib32ncurses5 lib32z1 > /dev/null
16+
17+
curl -s http://download.isrc.rt-thread.com/download/gcc-arm-none-eabi-5_4-2016q3-20160926-linux.tar.bz2 | sudo tar xjf - -C /opt
18+
/opt/gcc-arm-none-eabi-5_4-2016q3/bin/arm-none-eabi-gcc --version
19+
'''
20+
21+
script {
22+
def bsp_array = [
23+
['CME_M7', 'sourcery-arm'],
24+
// ['apollo2', 'sourcery-arm'], /* CI compile not support */
25+
['asm9260t', 'sourcery-arm'],
26+
['at91sam9260', 'sourcery-arm'],
27+
['allwinner_tina', 'sourcery-arm'],
28+
['efm32', 'sourcery-arm'],
29+
// ['gd32e230k-start', 'sourcery-arm'], /* CI compile not support */
30+
['gd32303e-eval', 'sourcery-arm'],
31+
// ['gd32450z-eval', 'sourcery-arm'], /* CI link not support */
32+
['gkipc', 'sourcery-arm'],
33+
['imx6sx/cortex-a9', 'sourcery-arm'],
34+
// ['imxrt/imxrt1052-atk-commander', 'sourcery-arm'], /* CI compile not support */
35+
// ['imxrt/imxrt1052-fire-pro', 'sourcery-arm'], /* CI compile not support */
36+
// ['imxrt/imxrt1052-nxp-evk', 'sourcery-arm'], /* CI compile not support */
37+
['lm3s8962', 'sourcery-arm'],
38+
['lm3s9b9x', 'sourcery-arm'],
39+
['lm4f232', 'sourcery-arm'],
40+
['tm4c129x', 'sourcery-arm'],
41+
// ['lpc43xx/M4', 'sourcery-arm'], /* CI compile not support */
42+
['lpc176x', 'sourcery-arm'],
43+
['lpc178x', 'sourcery-arm'],
44+
['lpc408x', 'sourcery-arm'],
45+
['lpc1114', 'sourcery-arm'],
46+
['lpc2148', 'sourcery-arm'],
47+
['lpc2478', 'sourcery-arm'],
48+
['lpc5410x', 'sourcery-arm'],
49+
// ['lpc54114-lite', 'sourcery-arm'], /* CI link not support */
50+
['mb9bf500r', 'sourcery-arm'],
51+
['mb9bf506r', 'sourcery-arm'],
52+
['mb9bf618s', 'sourcery-arm'],
53+
['mb9bf568r', 'sourcery-arm'],
54+
['mini2440', 'sourcery-arm'],
55+
['nuvoton_nuc472', 'sourcery-arm'],
56+
['nuvoton_m05x', 'sourcery-arm'],
57+
['qemu-vexpress-a9', 'sourcery-arm'],
58+
['qemu-vexpress-gemini', 'sourcery-arm'],
59+
['sam7x', 'sourcery-arm'],
60+
// ['stm32/stm32f072-st-nucleo', 'sourcery-arm'], /* CI compile C99 not support */
61+
// ['stm32/stm32f091-st-nucleo', 'sourcery-arm'], /* CI compile C99 not support */
62+
// ['stm32/stm32f103-atk-nano', 'sourcery-arm'], /* CI compile C99 not support */
63+
// ['stm32/stm32f103-atk-warshipv3', 'sourcery-arm'], /* CI compile C99 not support */
64+
// ['stm32/stm32f103-dofly-lyc8', 'sourcery-arm'], /* CI compile C99 not support */
65+
// ['stm32/stm32f103-dofly-M3S', 'sourcery-arm'], /* CI compile C99 not support */
66+
// ['stm32/stm32f103-fire-arbitrary', 'sourcery-arm'], /* CI compile C99 not support */
67+
// ['stm32/stm32f103-hw100k-ibox', 'sourcery-arm'], /* CI compile C99 not support */
68+
// ['stm32/stm32f103-mini-system', 'sourcery-arm'], /* CI compile C99 not support */
69+
// ['stm32/stm32f103-onenet-nbiot', 'sourcery-arm'], /* CI compile C99 not support */
70+
// ['stm32/stm32f103-yf-ufun', 'sourcery-arm'], /* CI compile C99 not support */
71+
// ['stm32/stm32f107-uc-eval', 'sourcery-arm'], /* CI compile C99 not support */
72+
// ['stm32/stm32f401-st-nucleo', 'sourcery-arm'], /* CI compile C99 not support */
73+
// ['stm32/stm32f405-smdz-breadfruit', 'sourcery-arm'], /* CI compile C99 not support */
74+
// ['stm32/stm32f407-atk-explorer', 'sourcery-arm'], /* CI compile C99 not support */
75+
// ['stm32/stm32f407-st-discovery', 'sourcery-arm'], /* CI compile C99 not support */
76+
// ['stm32/stm32f410-st-nucleo', 'sourcery-arm'], /* CI compile C99 not support */
77+
// ['stm32/stm32f411-st-nucleo', 'sourcery-arm'], /* CI compile C99 not support */
78+
// ['stm32/stm32f411-weact-MiniF4', 'sourcery-arm'], /* CI compile C99 not support */
79+
// ['stm32/stm32f413-st-nucleo', 'sourcery-arm'], /* CI compile C99 not support */
80+
// ['stm32/stm32f427-robomaster-a', 'sourcery-arm'], /* CI compile C99 not support */
81+
// ['stm32/stm32f429-armfly-v6', 'sourcery-arm'], /* CI compile C99 not support */
82+
// ['stm32/stm32f429-atk-apollo', 'sourcery-arm'], /* CI compile C99 not support */
83+
// ['stm32/stm32f429-fire-challenger', 'sourcery-arm'], /* CI compile C99 not support */
84+
// ['stm32/stm32f429-st-disco', 'sourcery-arm'], /* CI compile C99 not support */
85+
// ['stm32/stm32f446-st-nucleo', 'sourcery-arm'], /* CI compile C99 not support */
86+
// ['stm32/stm32f469-st-disco', 'sourcery-arm'], /* CI compile C99 not support */
87+
// ['stm32/stm32f746-st-disco', 'sourcery-arm'], /* CI compile -mcpu= not support */
88+
// ['stm32/stm32f767-atk-apollo', 'sourcery-arm'], /* CI compile -mcpu= not support */
89+
// ['stm32/stm32f767-fire-challenger', 'sourcery-arm'], /* CI compile -mcpu= not support */
90+
// ['stm32/stm32f767-st-nucleo', 'sourcery-arm'], /* CI compile -mcpu= not support */
91+
// ['stm32/stm32g071-st-nucleo', 'sourcery-arm'], /* CI compile C99 not support */
92+
// ['stm32/stm32g431-st-nucleo', 'sourcery-arm'], /* CI compile C99 not support */
93+
// ['stm32/stm32h743-atk-apollo', 'sourcery-arm'], /* CI compile -mcpu= not support */
94+
// ['stm32/stm32h743-st-nucleo', 'sourcery-arm'], /* CI compile -mcpu= not support */
95+
// ['stm32/stm32h747-st-discovery', 'sourcery-arm'], /* CI compile -mcpu= not support */
96+
// ['stm32/stm32l4r9-st-eval', 'sourcery-arm'], /* CI compile C99 not support */
97+
// ['stm32/stm32l010-st-nucleo', 'sourcery-arm'], /* CI compile C99 not support */
98+
// ['stm32/stm32l053-st-nucleo', 'sourcery-arm'], /* CI compile C99 not support */
99+
// ['stm32/stm32l412-st-nucleo', 'sourcery-arm'], /* CI compile C99 not support */
100+
// ['stm32/stm32l432-st-nucleo', 'sourcery-arm'], /* CI compile C99 not support */
101+
// ['stm32/stm32l433-st-nucleo', 'sourcery-arm'], /* CI compile C99 not support */
102+
// ['stm32/stm32l475-atk-pandora', 'sourcery-arm'], /* CI compile C99 not support */
103+
// ['stm32/stm32l475-st-discovery', 'sourcery-arm'], /* CI compile C99 not support */
104+
// ['stm32/stm32l476-st-nucleo', 'sourcery-arm'], /* CI compile C99 not support */
105+
// ['stm32/stm32l496-ali-developer', 'sourcery-arm'], /* CI compile C99 not support */
106+
// ['stm32/stm32l496-st-nucleo', 'sourcery-arm'], /* CI compile C99 not support */
107+
['stm32f20x', 'sourcery-arm'],
108+
['swm320-lq100', 'sourcery-arm'],
109+
['beaglebone', 'sourcery-arm'],
110+
['zynq7000', 'sourcery-arm'],
111+
['frdm-k64f', 'sourcery-arm'],
112+
['fh8620', 'sourcery-arm'],
113+
['xplorer4330/M4', 'sourcery-arm'],
114+
// ['at32/at32f403a-start', 'sourcery-arm'],/* CI link not support */
115+
// ['at32/at32f407-start', 'sourcery-arm']/* CI compile C99 not support */
116+
]
117+
118+
for (int i in bsp_array) {
119+
120+
sh """
121+
122+
export RTT_BSP=${i.getAt(0)}
123+
export RTT_TOOL_CHAIN=${i.getAt(1)}
124+
export RTT_EXEC_PATH=/opt/gcc-arm-none-eabi-5_4-2016q3/bin/
125+
export RTT_CC='gcc'
126+
export RTT_ROOT=`pwd`
127+
128+
echo \$RTT_EXEC_PATH
129+
130+
scons -C bsp/\$RTT_BSP
131+
"""
132+
}
133+
}
134+
}
135+
}
136+
}
137+
post {
138+
failure {
139+
addGiteeMRComment(comment: """:x: Jenkins CI 构建失败。\n\n \
140+
查看更多日志详细信息: \
141+
<a href="${env.RUN_DISPLAY_URL}">Jenkins[${env.JOB_NAME} # ${env.BUILD_NUMBER}]</a> \
142+
<hr /> \
143+
:x: The Jenkins CI build failed.\n\n \
144+
Results available at: \
145+
<a href="${env.RUN_DISPLAY_URL}">Jenkins[${env.JOB_NAME} # ${env.BUILD_NUMBER}]</a>""")
146+
}
147+
success {
148+
addGiteeMRComment(comment: """:white_check_mark: Jenkins CI 构建通过。\n\n \
149+
查看更多日志详细信息: \
150+
<a href="${env.RUN_DISPLAY_URL}">Jenkins[${env.JOB_NAME} # ${env.BUILD_NUMBER}]</a> \
151+
<hr /> \
152+
:white_check_mark: The Jenkins CI build passed.\n\n \
153+
Results available at: \
154+
<a href="${env.RUN_DISPLAY_URL}">Jenkins[${env.JOB_NAME} # ${env.BUILD_NUMBER}]</a>""")
155+
}
156+
}
157+
}

0 commit comments

Comments
 (0)