From 0087d4afe31bad40a0f365b774547fd69124d58c Mon Sep 17 00:00:00 2001 From: Pan Xiuli Date: Tue, 18 Jun 2019 19:34:14 +0800 Subject: [PATCH] [DEBUG][CI]travis: add coccinelle check for SOF Add coccinelle check for SOF part code in Travis CI. Build coccinelle 1.0.7 from source in Travis CI. Update make command forom SUBDIRS to M. Signed-off-by: Pan Xiuli --- .travis.yml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3ad3d6b9a18d..d226c5e6e38d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,8 @@ language: c +dist: xenial git: - depth: false + depth: 20 before_install: - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test @@ -18,20 +19,26 @@ jobs: - SHA_PR=`git log --oneline -1 | sed -rn "s/.*Merge (.*) into.*/\1/p"` - SHA_MAIN=`git log --oneline -1 | sed -rn "s/.*Merge .* into (.*)/\1/p"` - scripts/checkpatch.pl --strict --codespell -g $SHA_MAIN..$SHA_PR - - name: "sparse check" + - name: "Code Scan" script: + - sudo apt-get install automake ocaml-native-compilers ocaml-findlib + - wget https://github.com/coccinelle/coccinelle/archive/1.0.7.tar.gz + - tar -xf 1.0.7.tar.gz + - cd coccinelle-1.0.7 && ./autogen && ./configure && make && sudo make install + - cd - - export ARCH=x86_64 - make defconfig - scripts/kconfig/merge_config.sh .config kconfig/base-defconfig kconfig/sof-defconfig kconfig/hdaudio-codecs-defconfig - make modules_prepare - - make SUBDIRS=sound/soc/sof C=2 + - make M=sound/soc/sof C=2 + - make coccicheck MODE=report M=sound/soc/sof - name: "BUILD SOF Kernel x86_64" script: - export ARCH=x86_64 - make defconfig - scripts/kconfig/merge_config.sh .config kconfig/base-defconfig kconfig/sof-defconfig - make modules_prepare - - KCFLAGS="-Wall -Werror" make -j`getconf _NPROCESSORS_ONLN` SUBDIRS=sound/soc/sof W=1 + - KCFLAGS="-Wall -Werror" make -j`getconf _NPROCESSORS_ONLN` M=sound/soc/sof W=1 - KCFLAGS="-Wall -Werror" make -j`getconf _NPROCESSORS_ONLN` - make bindeb-pkg -j`getconf _NPROCESSORS_ONLN` - name: "BUILD SST Kernel x86_64"