Skip to content

Commit 0c4126b

Browse files
liuguo09xiaoxiang781216
authored andcommitted
Split check testlist to enable multiple jobs in CI build
In github action free version, up to 20 jobs could be run to speed up CI build. Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
1 parent 3707b10 commit 0c4126b

20 files changed

+210
-46
lines changed

cibuild.sh

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -129,15 +129,16 @@ function c-cache {
129129

130130
function usage {
131131
echo ""
132-
echo "USAGE: $0 [-i] [-s] [-c] [-b <check|full>]"
132+
echo "USAGE: $0 [-i] [-s] [-c] [-*] <testlist>"
133133
echo " $0 -h"
134134
echo ""
135135
echo "Where:"
136136
echo " -i install tools"
137137
echo " -s setup repos"
138138
echo " -c enable ccache"
139-
echo " -b <check|full> do check or full CI Job"
139+
echo " -* support all options in testbuild.sh"
140140
echo " -h will show this help test and terminate"
141+
echo " <testlist> select testlist file"
141142
echo ""
142143
exit 1
143144
}
@@ -172,13 +173,14 @@ function install_tools {
172173

173174
function run_builds {
174175
local ncpus=`grep -c ^processor /proc/cpuinfo`
175-
local options="-j $ncpus"
176+
options+="-j $ncpus"
176177

177-
if [ "X$build" = "Xcheck" ]; then
178-
options="$options -x"
179-
fi
178+
for build in $builds; do
179+
local builddir=$(cd $(dirname $build) && pwd)
180+
local buildfile=$(basename $build)
180181

181-
$nuttx/tools/testbuild.sh $options $WD/testlist/${build}list.dat
182+
$nuttx/tools/testbuild.sh $options $builddir/$buildfile
183+
done
182184
}
183185

184186
if [ -z "$1" ]; then
@@ -196,18 +198,18 @@ while [ ! -z "$1" ]; do
196198
-c )
197199
enable_ccache
198200
;;
199-
-b )
200-
shift
201-
build="$1"
202-
run_builds
203-
break
204-
;;
205201
-s )
206202
setup_repos
207203
;;
204+
-* )
205+
options+="$1 "
206+
;;
208207
* )
209-
usage
208+
builds=$@
209+
break
210210
;;
211211
esac
212212
shift
213213
done
214+
215+
run_builds

testlist/arm-01.dat

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/arm/a1x,CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL
2+
3+
/arm/am335x,CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL
4+
5+
/arm/c5471,CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL
6+
7+
/arm/cxd56xx,CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL
8+
9+
/arm/dm320,CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL
10+
11+
/arm/efm32,CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL

testlist/arm-02.dat

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/arm/imx6,CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL
2+
3+
/arm/imxrt,CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL
4+
-imxrt1050-evk:libcxxtest
5+
-imxrt1060-evk:libcxxtest
6+
7+
/arm/kinetis,CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL
8+
9+
/arm/kl,CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL

testlist/arm-03.dat

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/arm/lc823450,CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL
2+
3+
/arm/lpc17xx_40xx/lincoln60,CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL
4+
-lincoln60:thttpd-binfs
5+
6+
/arm/lpc17xx_40xx/lpc4088-devkit,CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL
7+
8+
/arm/lpc17xx_40xx/lpc4088-quickstart,CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL
9+
10+
/arm/lpc17xx_40xx/lpcxpresso-lpc1768,CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL
11+
-lpcxpresso-lpc1768:thttpd
12+
13+
/arm/lpc17xx_40xx/lx_cpu,CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL
14+
15+
/arm/lpc17xx_40xx/mbed,CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL
16+
17+
/arm/lpc17xx_40xx/mcb1700,CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL

testlist/arm-04.dat

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/arm/lpc17xx_40xx/olimex-lpc1766stk,CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL
2+
-olimex-lpc1766stk:slip-httpd
3+
-olimex-lpc1766stk:thttpd-nxflat
4+
5+
/arm/lpc17xx_40xx/open1788,CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL
6+
7+
/arm/lpc17xx_40xx/pnev5180b,CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL
8+
9+
/arm/lpc17xx_40xx/u-blox-c027,CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL
10+
11+
/arm/lpc17xx_40xx/zkit-arm-1769,CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL
12+
-zkit-arm-1769:thttpd

testlist/arm-05.dat

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/arm/lpc214x,CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL
2+
3+
/arm/lpc2378,CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL
4+
5+
/arm/lpc31xx,CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL
6+
-ea3131:pgnsh
7+
8+
/arm/lpc43xx,CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL
9+
10+
/arm/lpc54xx,CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL

testlist/arm-06.dat

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/arm/max326xx,CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL
2+
3+
/arm/moxart,CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL
4+
-moxa:nsh
5+
6+
/arm/nrf52,CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL
7+
8+
/arm/nuc1xx,CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL
9+
10+
/arm/s32k1xx,CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL
11+
12+
/arm/sam34,CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL

testlist/arm-07.dat

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/arm/sama5,CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL
2+
-sama5d3x-ek:nxwm
3+
-sama5d4-ek:dramboot
4+
-sama5d4-ek:elf
5+
6+
/arm/samd2l2,CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL
7+
8+
/arm/samd5e5,CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL

testlist/arm-08.dat

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/arm/samv7,CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL
2+
3+
/arm/stm32/axoloti,CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL
4+
5+
/arm/stm32/clicker2-stm32,CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL
6+
7+
/arm/stm32/cloudctrl,CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL
8+
9+
/arm/stm32/fire-stm32v2,CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL
10+
11+
/arm/stm32/hymini-stm32v,CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL
12+
13+
/arm/stm32/maple,CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL

testlist/arm-09.dat

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/arm/stm32/mikroe-stm32f4,CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL
2+
-mikroe-stm32f4:fulldemo
3+
4+
/arm/stm32/nucleo-f103rb,CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL
5+
6+
/arm/stm32/nucleo-f207zg,CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL
7+
8+
/arm/stm32/nucleo-f302r8,CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL
9+
10+
/arm/stm32/nucleo-f303re,CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL
11+
12+
/arm/stm32/nucleo-f303ze,CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL
13+
14+
/arm/stm32/nucleo-f334r8,CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL
15+
16+
/arm/stm32/nucleo-f410rb,CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL
17+
18+
/arm/stm32/nucleo-f446re,CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL
19+
20+
/arm/stm32/nucleo-f4x1re,CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL
21+
22+
/arm/stm32/nucleo-l152re,CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL

0 commit comments

Comments
 (0)