File tree Expand file tree Collapse file tree 4 files changed +24
-20
lines changed Expand file tree Collapse file tree 4 files changed +24
-20
lines changed Original file line number Diff line number Diff line change 88
99jobs :
1010 test :
11- runs-on : ubuntu-latest
12- name : CPP
11+ strategy :
12+ fail-fast : false
13+ matrix :
14+ os : [ubuntu-latest, windows-latest, macosx-latest]
15+ runs-on : ${{ matrix.os }}
1316 env :
1417 CPLUS_INCLUDE_PATH : " /usr/local/include/:/usr/include/jsoncpp/:/usr/local/opt/openssl/include/:/usr/lib/"
1518 steps :
1619 - uses : actions/checkout@v3
17- - run : sudo apt-get install lcov libcurl4-openssl-dev libssl-dev uuid-dev libjson-c-dev libjsoncpp-dev nodejs npm
20+ - if : ${{ matrix.os == 'ubuntu-latest' }}
21+ run : sudo apt-get install lcov libcurl4-openssl-dev libssl-dev uuid-dev libjson-c-dev libjsoncpp-dev nodejs npm
1822 - run : bash ./unit_test.sh
19- - run : bash ./generate_code_cov.sh
23+ - run : bash ./generate_code_cov.sh
2024 - run : bash ./function_test.sh
2125 - run : bash <(curl -s https://codecov.io/bash)
Original file line number Diff line number Diff line change @@ -7,11 +7,11 @@ if command -v python > /dev/null ; then
77 MAKE=" make -j $( python -c ' import multiprocessing as mp; print(int(mp.cpu_count()))' ) "
88fi
99
10- echo $MAKE
10+ echo " $MAKE "
1111
1212rm -rf sdk_build
1313mkdir sdk_build
14- cd sdk_build
14+ cd sdk_build || exit
1515cmake -DBUILD_PRODUCT=" $product " -DBUILD_FUNCTION_TESTS=OFF -DBUILD_UNIT_TESTS=OFF -DENABLE_COVERAGE=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr ..
1616$MAKE
1717
Original file line number Diff line number Diff line change 11#! /bin/bash
22
3- cd ` dirname $0 `
3+ cd $( dirname " $0 " ) || exit
44echo ' -------build function test----------'
55
66MAKE=make
77if command -v python > /dev/null ; then
88 MAKE=" make -j $( python -c ' import multiprocessing as mp; print(int(mp.cpu_count()))' ) "
99fi
1010
11- echo $MAKE
11+ echo " $MAKE "
1212
1313FT_BUILD_DIR=ft_build
1414rm -rf $FT_BUILD_DIR
1515mkdir $FT_BUILD_DIR
16- cd $FT_BUILD_DIR
16+ cd $FT_BUILD_DIR || exit
1717cmake -DBUILD_FUNCTION_TESTS=ON -DBUILD_UNIT_TESTS=OFF ..
1818$MAKE cdn core cs ecs rds slb vpc cdn_ft core_ft cs_ft ecs_ft nlp_ft rds_ft slb_ft vpc_ft
1919
Original file line number Diff line number Diff line change 11#! /bin/bash
22
3- cd ` dirname $0 `
3+ cd $( dirname " $0 " ) || exit
44echo ' -------build unit test----------'
55
66echo ' start a test http server'
7- NODE=` which nodejs`
7+ NODE=$( which nodejs)
88
99if [ " $NODE " ]
1010then
1111 echo ' '
1212else
13- NODE=` which node`
13+ NODE=$( which node)
1414fi
1515
16- echo ' node binary path: ' $NODE
16+ echo ' node binary path: ' " $NODE "
1717
18- server=` ps -ef | grep http_test_server | grep -v grep`
19- echo " check server: " $server
18+ server=$( ps -ef | grep http_test_server | grep -v grep)
19+ echo " check server: " " $server "
2020if [ " $server " ]
2121then
2222 echo " server is on"
2323else
2424 echo " server is off, start it"
25- cd test/httpserver
25+ cd test/httpserver || exit
2626 npm i
27- nohup $NODE http_test_server.js &
28- cd -
27+ nohup " $NODE " http_test_server.js &
28+ cd - || exit
2929fi
3030
3131MAKE=make
3232if command -v python > /dev/null ; then
3333 MAKE=" make -j $( python -c ' import multiprocessing as mp; print(int(mp.cpu_count()))' ) "
3434fi
3535
36- echo $MAKE
36+ echo " $MAKE "
3737
3838UT_BUILD_DIR=ut_build
3939rm -rf $UT_BUILD_DIR
4040mkdir $UT_BUILD_DIR
41- cd $UT_BUILD_DIR
41+ cd $UT_BUILD_DIR || exit
4242cmake -DBUILD_FUNCTION_TESTS=OFF -DBUILD_UNIT_TESTS=ON -DENABLE_COVERAGE=ON ..
4343$MAKE core_ut
4444
You can’t perform that action at this time.
0 commit comments