You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/09/16 17:51:07 UTC

[GitHub] [incubator-nuttx] W-Mai opened a new pull request, #7114: Add CodeChecker to CI

W-Mai opened a new pull request, #7114:
URL: https://github.com/apache/incubator-nuttx/pull/7114

   ## Summary
   
   Add CodeChecker to CI
   
   ## Impact
   
   Increase the rigor with which code is reviewed
   It may increase the time of CI
   
   ## Testing
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] W-Mai commented on a diff in pull request #7114: Add CodeChecker to CI

Posted by GitBox <gi...@apache.org>.
W-Mai commented on code in PR #7114:
URL: https://github.com/apache/incubator-nuttx/pull/7114#discussion_r992973348


##########
tools/testbuild.sh:
##########
@@ -218,6 +236,32 @@ function makefunc {
   return $fail
 }
 
+function checkfunc {
+  build_cmd="${MAKE} ${MAKE_FLAGS} \"${EXTRA_FLAGS}\" ${JOPTION} 1>/dev/null"
+
+  local config_sub_path=$(echo "$config" | sed "s/:/\//")
+  local sub_target_name=${config_sub_path#$(dirname "${config_sub_path}")/}
+  local codechecker_logs_dir=${ARTIFACTDIR}/codechecker_logs/${config_sub_path}

Review Comment:
   If there are multiple targets in codechecker.dat, the results of the checking may make the folder look disordered.
   Now it's a separate folder for each target.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] W-Mai commented on a diff in pull request #7114: Add CodeChecker to CI

Posted by GitBox <gi...@apache.org>.
W-Mai commented on code in PR #7114:
URL: https://github.com/apache/incubator-nuttx/pull/7114#discussion_r992977997


##########
tools/testbuild.sh:
##########
@@ -218,6 +236,32 @@ function makefunc {
   return $fail
 }
 
+function checkfunc {
+  build_cmd="${MAKE} ${MAKE_FLAGS} \"${EXTRA_FLAGS}\" ${JOPTION} 1>/dev/null"
+
+  local config_sub_path=$(echo "$config" | sed "s/:/\//")
+  local sub_target_name=${config_sub_path#$(dirname "${config_sub_path}")/}
+  local codechecker_logs_dir=${ARTIFACTDIR}/codechecker_logs/${config_sub_path}

Review Comment:
   that's ok



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] xiaoxiang781216 merged pull request #7114: Add CodeChecker to CI

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 merged PR #7114:
URL: https://github.com/apache/incubator-nuttx/pull/7114


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] W-Mai commented on a diff in pull request #7114: Add CodeChecker to CI

Posted by GitBox <gi...@apache.org>.
W-Mai commented on code in PR #7114:
URL: https://github.com/apache/incubator-nuttx/pull/7114#discussion_r990784194


##########
tools/testbuild.sh:
##########
@@ -57,7 +62,7 @@ esac
 
 function showusage {
   echo ""
-  echo "USAGE: $progname [-l|m|c|g|n] [-d] [-e <extraflags>] [-x] [-j <ncpus>] [-a <appsdir>] [-t <topdir>] [-p] [-G] <testlist-file>"
+  echo "USAGE: $progname [-l|m|c|g|n] [-d] [-e <extraflags>] [-x] [-j <ncpus>] [-a <appsdir>] [-t <topdir>] [-p] [-G] [--codechecker] [--codechecker-failed] <testlist-file>"

Review Comment:
   that's ok



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] W-Mai commented on pull request #7114: Add CodeChecker to CI

Posted by GitBox <gi...@apache.org>.
W-Mai commented on PR #7114:
URL: https://github.com/apache/incubator-nuttx/pull/7114#issuecomment-1272499568

   > @W-Mai please remove the merge patch.
   
   I'll rebase it later.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a diff in pull request #7114: Add CodeChecker to CI

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #7114:
URL: https://github.com/apache/incubator-nuttx/pull/7114#discussion_r990776970


##########
.github/workflows/build.yml:
##########
@@ -157,17 +158,35 @@ jobs:
             export CCACHE_DIR=`pwd`/ccache
             mkdir $CCACHE_DIR
             export ARTIFACTDIR=`pwd`/buildartifacts
+            export CODECHECKERLOGSDIR=`pwd`/codecheckerlogs

Review Comment:
   let's reuse ARTIFACTDIR to save the codechecker output



##########
tools/testbuild.sh:
##########
@@ -57,7 +62,7 @@ esac
 
 function showusage {
   echo ""
-  echo "USAGE: $progname [-l|m|c|g|n] [-d] [-e <extraflags>] [-x] [-j <ncpus>] [-a <appsdir>] [-t <topdir>] [-p] [-G] <testlist-file>"
+  echo "USAGE: $progname [-l|m|c|g|n] [-d] [-e <extraflags>] [-x] [-j <ncpus>] [-a <appsdir>] [-t <topdir>] [-p] [-G] [--codechecker] [--codechecker-failed] <testlist-file>"

Review Comment:
   remove  [--codechecker-failed]



##########
.github/workflows/build.yml:
##########
@@ -157,17 +158,35 @@ jobs:
             export CCACHE_DIR=`pwd`/ccache
             mkdir $CCACHE_DIR
             export ARTIFACTDIR=`pwd`/buildartifacts
+            export CODECHECKERLOGSDIR=`pwd`/codecheckerlogs
+            export BOARDSEL=${{matrix.boards}}

Review Comment:
   don't need temp variable



##########
tools/testbuild.sh:
##########
@@ -208,13 +221,63 @@ function exportandimport {
   return $fail
 }
 
+function compressartifacts {
+  local target_path=$1
+  local target_name=$2
+
+  pushd $target_path >/dev/null
+
+  tar zcf ${target_name}.tar.gz ${target_name}
+  rm -rf ${target_name} 
+
+  popd >/dev/null
+}
+
 function makefunc {

Review Comment:
   let's add checkfunc and call it from build function



##########
.github/workflows/build.yml:
##########
@@ -157,17 +158,35 @@ jobs:
             export CCACHE_DIR=`pwd`/ccache
             mkdir $CCACHE_DIR
             export ARTIFACTDIR=`pwd`/buildartifacts
+            export CODECHECKERLOGSDIR=`pwd`/codecheckerlogs
+            export BOARDSEL=${{matrix.boards}}
             git config --global --add safe.directory /github/workspace/sources/nuttx
             git config --global --add safe.directory /github/workspace/sources/apps
             cd sources/nuttx/tools/ci
-            ./cibuild.sh -A -R -c testlist/${{matrix.boards}}.dat
+            if [ "X${BOARDSEL}" = "Xcodechecker" ]; then
+              if ${{ env.CODECHECKER_FAIL }}; then
+                ./cibuild.sh -A -R -c --codechecker --codechecker-failed testlist/${BOARDSEL}.dat
+              else
+                ./cibuild.sh -A -R -c --codechecker testlist/${BOARDSEL}.dat
+              fi
+            else
+              ./cibuild.sh -A -R -c testlist/${BOARDSEL}.dat
+            fi
             ccache -s
 
       - uses: actions/upload-artifact@v3
         with:
           name: linux-builds
           path: buildartifacts/
         continue-on-error: true
+      
+      - name: Upload CodeChecker Logs 

Review Comment:
   let's reuse buildartifacts



##########
tools/testbuild.sh:
##########
@@ -392,7 +454,6 @@ function dotest {
 }
 
 # Perform the build test for each entry in the test list file
-

Review Comment:
   revert



##########
tools/testbuild.sh:
##########
@@ -336,7 +399,6 @@ function dotest {
   echo "===================================================================================="
   config=`echo $1 | cut -d',' -f1`
   check=${HOST},${config/\//:}
-

Review Comment:
   revert



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a diff in pull request #7114: Add CodeChecker to CI

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #7114:
URL: https://github.com/apache/incubator-nuttx/pull/7114#discussion_r992958326


##########
tools/testbuild.sh:
##########
@@ -218,6 +236,32 @@ function makefunc {
   return $fail
 }
 
+function checkfunc {
+  build_cmd="${MAKE} ${MAKE_FLAGS} \"${EXTRA_FLAGS}\" ${JOPTION} 1>/dev/null"
+
+  local config_sub_path=$(echo "$config" | sed "s/:/\//")
+  local sub_target_name=${config_sub_path#$(dirname "${config_sub_path}")/}
+  local codechecker_logs_dir=${ARTIFACTDIR}/codechecker_logs/${config_sub_path}

Review Comment:
   why need config_sub_path? let's remove it.



##########
tools/testbuild.sh:
##########
@@ -218,6 +236,32 @@ function makefunc {
   return $fail
 }
 
+function checkfunc {
+  build_cmd="${MAKE} ${MAKE_FLAGS} \"${EXTRA_FLAGS}\" ${JOPTION} 1>/dev/null"
+
+  local config_sub_path=$(echo "$config" | sed "s/:/\//")
+  local sub_target_name=${config_sub_path#$(dirname "${config_sub_path}")/}
+  local codechecker_logs_dir=${ARTIFACTDIR}/codechecker_logs/${config_sub_path}
+
+  mkdir -p "${codechecker_logs_dir}"
+
+  echo "    Checking NuttX by Codechecker..."
+  CodeChecker check -b "${build_cmd}" -o "${codechecker_logs_dir}"/codechecker_reports -e sensitive --ctu

Review Comment:
   ```suggestion
     CodeChecker check -b "${build_cmd}" -o "${codechecker_logs_dir}"/log -e sensitive --ctu
   ```



##########
tools/testbuild.sh:
##########
@@ -218,6 +236,32 @@ function makefunc {
   return $fail
 }
 
+function checkfunc {
+  build_cmd="${MAKE} ${MAKE_FLAGS} \"${EXTRA_FLAGS}\" ${JOPTION} 1>/dev/null"
+
+  local config_sub_path=$(echo "$config" | sed "s/:/\//")
+  local sub_target_name=${config_sub_path#$(dirname "${config_sub_path}")/}
+  local codechecker_logs_dir=${ARTIFACTDIR}/codechecker_logs/${config_sub_path}

Review Comment:
   ```suggestion
     local codechecker_dir=${ARTIFACTDIR}/codechecker
   ```



##########
tools/testbuild.sh:
##########
@@ -218,6 +236,32 @@ function makefunc {
   return $fail
 }
 
+function checkfunc {
+  build_cmd="${MAKE} ${MAKE_FLAGS} \"${EXTRA_FLAGS}\" ${JOPTION} 1>/dev/null"
+
+  local config_sub_path=$(echo "$config" | sed "s/:/\//")
+  local sub_target_name=${config_sub_path#$(dirname "${config_sub_path}")/}
+  local codechecker_logs_dir=${ARTIFACTDIR}/codechecker_logs/${config_sub_path}
+
+  mkdir -p "${codechecker_logs_dir}"
+
+  echo "    Checking NuttX by Codechecker..."
+  CodeChecker check -b "${build_cmd}" -o "${codechecker_logs_dir}"/codechecker_reports -e sensitive --ctu
+  codecheck_ret=$?
+  echo "    Storing analysis result to CodeChecker..."
+  echo "      Generating HTML report..."
+  CodeChecker parse --export html --output "${codechecker_logs_dir}/codechecker_reports_html" "${codechecker_logs_dir}/codechecker_reports" 1>/dev/null
+  echo "      Compressing logs..."
+  compressartifacts "$(dirname "${codechecker_logs_dir}")" "${sub_target_name}"
+
+# If you need to stop CI, uncomment the following line.
+#  if [ $codecheck_ret -ne 0 ]; then
+#    fail=114

Review Comment:
   fail=1



##########
tools/testbuild.sh:
##########
@@ -36,6 +36,8 @@ PRINTLISTONLY=0
 GITCLEAN=0
 SAVEARTIFACTS=0
 CHECKCLEAN=1
+CODECHECKER=0
+CODECHECKERFAILS=0

Review Comment:
   remove



##########
tools/testbuild.sh:
##########
@@ -218,6 +236,32 @@ function makefunc {
   return $fail
 }
 
+function checkfunc {
+  build_cmd="${MAKE} ${MAKE_FLAGS} \"${EXTRA_FLAGS}\" ${JOPTION} 1>/dev/null"
+
+  local config_sub_path=$(echo "$config" | sed "s/:/\//")
+  local sub_target_name=${config_sub_path#$(dirname "${config_sub_path}")/}
+  local codechecker_logs_dir=${ARTIFACTDIR}/codechecker_logs/${config_sub_path}
+
+  mkdir -p "${codechecker_logs_dir}"
+
+  echo "    Checking NuttX by Codechecker..."
+  CodeChecker check -b "${build_cmd}" -o "${codechecker_logs_dir}"/codechecker_reports -e sensitive --ctu
+  codecheck_ret=$?
+  echo "    Storing analysis result to CodeChecker..."
+  echo "      Generating HTML report..."
+  CodeChecker parse --export html --output "${codechecker_logs_dir}/codechecker_reports_html" "${codechecker_logs_dir}/codechecker_reports" 1>/dev/null

Review Comment:
   ```suggestion
     CodeChecker parse --export html --output "${codechecker_logs_dir}/html" "${codechecker_logs_dir}/codechecker_reports" 1>/dev/null
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a diff in pull request #7114: Add CodeChecker to CI

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #7114:
URL: https://github.com/apache/incubator-nuttx/pull/7114#discussion_r992977554


##########
tools/testbuild.sh:
##########
@@ -218,6 +236,32 @@ function makefunc {
   return $fail
 }
 
+function checkfunc {
+  build_cmd="${MAKE} ${MAKE_FLAGS} \"${EXTRA_FLAGS}\" ${JOPTION} 1>/dev/null"
+
+  local config_sub_path=$(echo "$config" | sed "s/:/\//")
+  local sub_target_name=${config_sub_path#$(dirname "${config_sub_path}")/}
+  local codechecker_logs_dir=${ARTIFACTDIR}/codechecker_logs/${config_sub_path}

Review Comment:
   Ok, let's change codechecker_logs_dir to codechecker_dir



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] W-Mai commented on pull request #7114: Add CodeChecker to CI

Posted by GitBox <gi...@apache.org>.
W-Mai commented on PR #7114:
URL: https://github.com/apache/incubator-nuttx/pull/7114#issuecomment-1252356765

   `tools/ci/testlist/codechecker.dat`
   Select a random set of targets to check. If you need to check a specific target, write the target list in this file.
   Make sure that the compilation check time does not exceed the average time.😁
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a diff in pull request #7114: Add CodeChecker to CI

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #7114:
URL: https://github.com/apache/incubator-nuttx/pull/7114#discussion_r985119576


##########
tools/ci/runcodechecker.sh:
##########
@@ -0,0 +1,164 @@
+#!/usr/bin/env bash
+# tools/ci/runcodechecker.sh

Review Comment:
   I don't see any place invoke this shell script



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] xiaoxiang781216 commented on pull request #7114: Add CodeChecker to CI

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on PR #7114:
URL: https://github.com/apache/incubator-nuttx/pull/7114#issuecomment-1272499080

   @W-Mai please remove the merge patch.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] pkarashchenko commented on a diff in pull request #7114: Add CodeChecker to CI

Posted by GitBox <gi...@apache.org>.
pkarashchenko commented on code in PR #7114:
URL: https://github.com/apache/incubator-nuttx/pull/7114#discussion_r975262565


##########
tools/ci/runcodechecker.sh:
##########
@@ -93,3 +116,11 @@ done
 if $NEEDSTART; then
   start_server
 fi
+
+if $NEEDKILL; then
+  kill_server
+fi
+
+if $NEEDCOMPRESS; then
+  compress_database $NEEDRM
+fi

Review Comment:
   ```suggestion
   fi
   
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] W-Mai commented on a diff in pull request #7114: Add CodeChecker to CI

Posted by GitBox <gi...@apache.org>.
W-Mai commented on code in PR #7114:
URL: https://github.com/apache/incubator-nuttx/pull/7114#discussion_r985120476


##########
tools/ci/runcodechecker.sh:
##########
@@ -0,0 +1,164 @@
+#!/usr/bin/env bash
+# tools/ci/runcodechecker.sh

Review Comment:
   https://github.com/apache/incubator-nuttx/blob/198e093ec2733dea7e818d84f346369cf7902f9e/.github/workflows/build.yml#L166-L175
   
   It is called in `.github/workflows/build.yml`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] xiaoxiang781216 commented on pull request #7114: Add CodeChecker to CI

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on PR #7114:
URL: https://github.com/apache/incubator-nuttx/pull/7114#issuecomment-1259874439

   @W-Mai please squash your change into one patch


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] W-Mai commented on a diff in pull request #7114: Add CodeChecker to CI

Posted by GitBox <gi...@apache.org>.
W-Mai commented on code in PR #7114:
URL: https://github.com/apache/incubator-nuttx/pull/7114#discussion_r990783057


##########
.github/workflows/build.yml:
##########
@@ -157,17 +158,35 @@ jobs:
             export CCACHE_DIR=`pwd`/ccache
             mkdir $CCACHE_DIR
             export ARTIFACTDIR=`pwd`/buildartifacts
+            export CODECHECKERLOGSDIR=`pwd`/codecheckerlogs
+            export BOARDSEL=${{matrix.boards}}
             git config --global --add safe.directory /github/workspace/sources/nuttx
             git config --global --add safe.directory /github/workspace/sources/apps
             cd sources/nuttx/tools/ci
-            ./cibuild.sh -A -R -c testlist/${{matrix.boards}}.dat
+            if [ "X${BOARDSEL}" = "Xcodechecker" ]; then
+              if ${{ env.CODECHECKER_FAIL }}; then
+                ./cibuild.sh -A -R -c --codechecker --codechecker-failed testlist/${BOARDSEL}.dat
+              else
+                ./cibuild.sh -A -R -c --codechecker testlist/${BOARDSEL}.dat
+              fi
+            else
+              ./cibuild.sh -A -R -c testlist/${BOARDSEL}.dat
+            fi
             ccache -s
 
       - uses: actions/upload-artifact@v3
         with:
           name: linux-builds
           path: buildartifacts/
         continue-on-error: true
+      
+      - name: Upload CodeChecker Logs 

Review Comment:
   But we may need it to upload `html report` generated by CodeChecker.
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] W-Mai commented on a diff in pull request #7114: Add CodeChecker to CI

Posted by GitBox <gi...@apache.org>.
W-Mai commented on code in PR #7114:
URL: https://github.com/apache/incubator-nuttx/pull/7114#discussion_r990782855


##########
.github/workflows/build.yml:
##########
@@ -157,17 +158,35 @@ jobs:
             export CCACHE_DIR=`pwd`/ccache
             mkdir $CCACHE_DIR
             export ARTIFACTDIR=`pwd`/buildartifacts
+            export CODECHECKERLOGSDIR=`pwd`/codecheckerlogs
+            export BOARDSEL=${{matrix.boards}}
             git config --global --add safe.directory /github/workspace/sources/nuttx
             git config --global --add safe.directory /github/workspace/sources/apps
             cd sources/nuttx/tools/ci
-            ./cibuild.sh -A -R -c testlist/${{matrix.boards}}.dat
+            if [ "X${BOARDSEL}" = "Xcodechecker" ]; then
+              if ${{ env.CODECHECKER_FAIL }}; then
+                ./cibuild.sh -A -R -c --codechecker --codechecker-failed testlist/${BOARDSEL}.dat
+              else
+                ./cibuild.sh -A -R -c --codechecker testlist/${BOARDSEL}.dat
+              fi
+            else
+              ./cibuild.sh -A -R -c testlist/${BOARDSEL}.dat
+            fi
             ccache -s
 
       - uses: actions/upload-artifact@v3
         with:
           name: linux-builds
           path: buildartifacts/
         continue-on-error: true
+      
+      - name: Upload CodeChecker Logs 

Review Comment:
   When the build fails, the buildartifacts step is skipped



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] W-Mai commented on a diff in pull request #7114: Add CodeChecker to CI

Posted by GitBox <gi...@apache.org>.
W-Mai commented on code in PR #7114:
URL: https://github.com/apache/incubator-nuttx/pull/7114#discussion_r990782823


##########
.github/workflows/build.yml:
##########
@@ -157,17 +158,35 @@ jobs:
             export CCACHE_DIR=`pwd`/ccache
             mkdir $CCACHE_DIR
             export ARTIFACTDIR=`pwd`/buildartifacts
+            export CODECHECKERLOGSDIR=`pwd`/codecheckerlogs

Review Comment:
   When the build fails, the upload step is skipped



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org