diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 76c97b91e8adc88a866d2c11acbf5fc73d83be64..e480abe236c7a915d4ad40bd3b7e4463bb393ec2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,28 +1,13 @@ variables: SOURCE_FOLDER: "src" + FLAWFINDER_OPTIONS: "-m 4 --error-level=5" + CPPCHECK_OPTIONS: "--suppress=cert-MSC24-C" + COMPILATION_FIXUP: "echo '[{\"dont\": \"compile\"}]' > compile_commands.json" include: - project: 'iopsys/gitlab-ci-pipeline' file: '/static-code-analysis.yml' ref: '1.2' -# override original, because we cannot compile here -# because this is a kernel module and kernel headers -# are not available in the docker image -run_static_code_analysis: - image: ${COMMON_IMAGE} - stage: static_code_analysis - allow_failure: false - script: - - /usr/local/pmd/bin/run.sh cpd --language c --exclude ./test/ ${CPD_OPTIONS} --files ${SOURCE_FOLDER} - - flawfinder --minlevel 4 --error-level=4 ${FLAWFINDER_OPTIONS} ${SOURCE_FOLDER} - rules: - - if: $SOURCE_FOLDER - when: always - artifacts: - when: on_failure - paths: - - report.txt - stages: - static_code_analysis diff --git a/gitlab-ci/build.sh b/gitlab-ci/build.sh new file mode 100755 index 0000000000000000000000000000000000000000..57429d72671041ae121a51d0b35bfc36c768fe87 --- /dev/null +++ b/gitlab-ci/build.sh @@ -0,0 +1,5 @@ +#!/bin/bash +set -e +echo "build stage" +pwd +make -C /lib/modules/$(uname -r)/build M=$(pwd) diff --git a/gitlab-ci/install-dependencies.sh b/gitlab-ci/install-dependencies.sh new file mode 100755 index 0000000000000000000000000000000000000000..7780305a11eb5f9e8c7f9bf7650bdfd8de204222 --- /dev/null +++ b/gitlab-ci/install-dependencies.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +echo "install dependencies" + +#sudo apt-get update # This will update the repositories list +#sudo apt-get upgrade # This will update all the necessary packages on your system +#sudo apt-get dist-upgrade # This will add/remove any needed packages +#sudo apt-get -y install linux-headers-$(uname -r)