代码拉取完成,页面将自动刷新
#!/bin/bash
cd /__w/signalwire-c/signalwire-c
sed -i '/cotire/d' ./CMakeLists.txt
sed -i '/cotire/d' ./swclt_test/CMakeLists.txt
mkdir -p scan-build
scan-build-7 -o ./scan-build/ cmake .
scan-build-7 -o ./scan-build/ make -j`nproc --all` |& tee ./scan-build-result.txt
exitstatus=${PIPESTATUS[0]}
echo "*** Exit status is $exitstatus";
export SubString="scan-build: No bugs found";
export COMPILATION_FAILED=false;
export BUGS_FOUND=false;
if [ "0" -ne $exitstatus ] ; then
export COMPILATION_FAILED=true;
echo MESSAGE="compilation failed" >> $GITHUB_OUTPUT;
fi
export RESULTFILE="/__w/signalwire-c/signalwire-c/scan-build-result.txt";
cat $RESULTFILE;
if ! grep -sq "$SubString" $RESULTFILE; then
export BUGS_FOUND=true;
echo MESSAGE="found bugs" >> $GITHUB_OUTPUT;
fi
echo "COMPILATION_FAILED=$COMPILATION_FAILED" >> $GITHUB_OUTPUT;
echo "BUGS_FOUND=$BUGS_FOUND" >> $GITHUB_OUTPUT;
if [ "0" -ne $exitstatus ] || ! grep -sq "$SubString" $RESULTFILE; then
exit 1;
fi
exit 0;
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。