From e93fccf5f7da1cd2082beec35a75b810159fd0df Mon Sep 17 00:00:00 2001 From: Mohamed Omar Asaker Date: Mon, 29 Jan 2024 13:23:29 +0000 Subject: [PATCH] ci/coverity: add coverity-test job Add coverity-test job which runs coverity analysis on SCP-firmware. Included in deployment and daily pipelines. Signed-off-by: Mohamed Omar Asaker Change-Id: I3b1188c04e55cd8fecb6feed3f9d864138b6e70a --- .gitlab/pipelines/daily-pipeline.yml | 6 +++++ .gitlab/pipelines/deployment-pipeline.yml | 5 ++++ .gitlab/templates/coverity-test.yml | 28 +++++++++++++++++++++++ 3 files changed, 39 insertions(+) create mode 100644 .gitlab/templates/coverity-test.yml diff --git a/.gitlab/pipelines/daily-pipeline.yml b/.gitlab/pipelines/daily-pipeline.yml index 10532eb57..54a2c4136 100644 --- a/.gitlab/pipelines/daily-pipeline.yml +++ b/.gitlab/pipelines/daily-pipeline.yml @@ -18,6 +18,7 @@ include: - local: .gitlab/templates/unit-test.yml - local: .gitlab/templates/build-test.yml - local: .gitlab/templates/scmi-test.yml + - local: .gitlab/templates/coverity-test.yml check-lint: extends: .check-lint @@ -29,6 +30,11 @@ banned-api: stage: static-analysis allow_failure: true +coverity-test: + stage: static-analysis + extends: .coverity-test + allow_failure: true + check-fwk: extends: .check-fwk stage: unit-testing diff --git a/.gitlab/pipelines/deployment-pipeline.yml b/.gitlab/pipelines/deployment-pipeline.yml index 8c215873d..d48d4161c 100644 --- a/.gitlab/pipelines/deployment-pipeline.yml +++ b/.gitlab/pipelines/deployment-pipeline.yml @@ -18,6 +18,7 @@ include: - local: .gitlab/templates/unit-test.yml - local: .gitlab/templates/build-test.yml - local: .gitlab/templates/scmi-test.yml + - local: .gitlab/templates/coverity-test.yml check-lint: extends: .check-lint @@ -35,6 +36,10 @@ banned-api: extends: .banned-api stage: static-analysis +coverity-test: + stage: static-analysis + extends: .coverity-test + check-fwk: extends: .check-fwk stage: unit-testing diff --git a/.gitlab/templates/coverity-test.yml b/.gitlab/templates/coverity-test.yml new file mode 100644 index 000000000..997ddf680 --- /dev/null +++ b/.gitlab/templates/coverity-test.yml @@ -0,0 +1,28 @@ +# +# Arm SCP/MCP Software +# Copyright (c) 2024, Arm Limited and Contributors. All rights reserved. +# +# SPDX-License-Identifier: BSD-3-Clause +# + +.coverity-test: + image: ${CI_REGISTRY_IMAGE}/coverity-tester-amd64 + tags: + - amd64 + variables: + GIT_SUBMODULE_STRATEGY: recursive + GIT_DEPTH: 1 + SCP_CI_OUTPUT: /scp/output + SCP_CI_PLATFORM: juno + WORKSPACE_PATH: /scp/coverity_workspace + before_script: + - ln -s $(pwd) /scp + script: + - echo "Coverity analysis will run against $SCP_CI_PLATFORM build" + - /coverity_entrypoint.sh + artifacts: + when: always + expire_in: 2 days + paths: + - output/scp-coverity-analysis-log.txt + - output/scp-coverity-analysis-results.tgz