Skip to content

Commit 0a5494a

Browse files
committed
ci: Optimize status update for travis ci
Signed-off-by: Huaqi Fang <Huaqi.Fang@synopsys.com>
1 parent 715f3eb commit 0a5494a

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

.ci/before_install.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,15 @@ die() {
22

33
echo " *** ERROR: " $*
44

5-
exit 1
5+
exit 1
66

77
}
8+
89
if [ "${TRAVIS}" == "true" ] ; then
10+
if [ "$STATUS" != "" ] && [ "$NAME" != "" ] ; then
11+
bash -c "$STATUS" pending "Local $NAME testing is in progress" || \
12+
die "Not able to post status to github, did you set EMBARC_BOT variable in travis ci setting page"
13+
fi
914
[ "${TRAVIS_OS_NAME}" != "linux" ] || {
1015
sudo apt-get update || die
1116
sudo apt-get install lib32z1 || die
@@ -19,4 +24,4 @@ fi
1924
pip install PrettyTable || die
2025
pip install colorama || die
2126
pip install configparser || die
22-
}
27+
}

.ci/script.sh

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,15 @@ git config --global user.name "${U_NAME}"
2121
git config --global user.email "${U_EMAIL}"
2222
git checkout -- . || die
2323
git archive --format zip -o applications.zip --prefix embarc_applications/ HEAD || die
24-
[ $embARC_OSP_REPO ] || {
25-
embARC_OSP_REPO="https://github.com/foss-for-synopsys-dwc-arc-processors/embarc_osp.git"
26-
}
24+
25+
embARC_OSP_REPO=${embARC_OSP_REPO:="https://github.com/foss-for-synopsys-dwc-arc-processors/embarc_osp.git"}
26+
2727
git clone ${embARC_OSP_REPO} embarc_osp
2828
cd embarc_osp || die
2929
unzip ../applications.zip>/dev/null 2>&1 || die
3030

31-
3231
[ "$TRAVIS" == "true" ] && {
33-
if [ "${TOOLCHAIN}" == "gnu" ]; then
34-
32+
if [ "${TOOLCHAIN}" == "gnu" ] ; then
3533
python .ci/toolchain.py -v $TOOLCHAIN_VER -c $TOOLCHAIN_CACHE_FOLDER || die
3634
if [ -d $TOOLCHAIN_CACHE_FOLDER ] ;then
3735
if [ -d $TOOLCHAIN_CACHE_FOLDER/$TOOLCHAIN_VER ] ; then
@@ -49,19 +47,18 @@ if [ -d $ARC_DEV_TOOL_ROOT ] ; then
4947
source arctool.env || die
5048
rm -rf arctool.env || die
5149
else
52-
die "The toolchain path does not exist "
50+
die "The toolchain path ${ARC_DEV_TOOL_ROOT} does not exist "
5351
fi
5452

5553

56-
if [ "${TOOLCHAIN}" == "gnu" ]; then
54+
if [ "${TOOLCHAIN}" == "gnu" ] ; then
5755
arc-elf32-gcc -v || die "ARC GNU toolchain is not installed correctly"
5856
else
5957
ccac -v || die "MWDT toolchain is not installed correctly"
6058
fi
6159

6260

6361
{
64-
6562
bash apply_embARC_patch.sh || die
6663

6764
EXPECTED="../${EXPECTED}"

0 commit comments

Comments
 (0)