This repository has been archived by the owner on Aug 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 185
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: adds gitlab-ci basic configuration
It is added a basic structure for CI testing on GitlabCI. It is introduced two pipelines: - `daily-pipeline`: intended to be run periodically where all checks are performed. - `deployment-pipeline`: run a set of basic tests. Signed-off-by: Leandro Belli <[email protected]> Change-Id: Ib11db1db682055b889a4fdfb3636a905a7df1280
- Loading branch information
1 parent
59c03d0
commit 7ad2722
Showing
7 changed files
with
224 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# | ||
# Arm SCP/MCP Software | ||
# Copyright (c) 2024, Arm Limited and Contributors. All rights reserved. | ||
# | ||
# SPDX-License-Identifier: BSD-3-Clause | ||
# | ||
|
||
variables: | ||
PIPELINE_TYPE: | ||
value: "deployment-pipeline" | ||
options: | ||
- "deployment-pipeline" | ||
- "daily-pipeline" | ||
description: "The CI pipeline to run" | ||
|
||
include: | ||
- local: .gitlab/pipelines/deployment-pipeline.yml | ||
rules: | ||
- if: $PIPELINE_TYPE == "deployment-pipeline" | ||
|
||
- local: .gitlab/pipelines/daily-pipeline.yml | ||
rules: | ||
- if: $PIPELINE_TYPE == "daily-pipeline" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# | ||
# Arm SCP/MCP Software | ||
# Copyright (c) 2024, Arm Limited and Contributors. All rights reserved. | ||
# | ||
# SPDX-License-Identifier: BSD-3-Clause | ||
# | ||
|
||
stages: | ||
- linting | ||
- static-analysis | ||
- unit-testing | ||
- build | ||
|
||
include: | ||
- local: .gitlab/templates/linting.yml | ||
- local: .gitlab/templates/static-analysis.yml | ||
- local: .gitlab/templates/unit-test.yml | ||
- local: .gitlab/templates/build-test.yml | ||
|
||
check-lint: | ||
extends: .check-lint | ||
stage: linting | ||
allow_failure: true | ||
|
||
banned-api: | ||
extends: .banned-api | ||
stage: static-analysis | ||
allow_failure: true | ||
|
||
check-fwk: | ||
extends: .check-fwk | ||
stage: unit-testing | ||
allow_failure: true | ||
|
||
check-modules: | ||
extends: .check-modules | ||
stage: unit-testing | ||
allow_failure: true | ||
|
||
build-products-all-log-levels: | ||
extends: .build-products-all-log-levels | ||
stage: build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# | ||
# Arm SCP/MCP Software | ||
# Copyright (c) 2024, Arm Limited and Contributors. All rights reserved. | ||
# | ||
# SPDX-License-Identifier: BSD-3-Clause | ||
# | ||
|
||
stages: | ||
- linting | ||
- static-analysis | ||
- unit-testing | ||
- build | ||
|
||
include: | ||
- local: .gitlab/templates/linting.yml | ||
- local: .gitlab/templates/static-analysis.yml | ||
- local: .gitlab/templates/unit-test.yml | ||
- local: .gitlab/templates/build-test.yml | ||
|
||
check-lint: | ||
extends: .check-lint | ||
stage: linting | ||
|
||
check-copyright: | ||
extends: .check-copyright | ||
stage: linting | ||
|
||
check-style: | ||
extends: .check-style | ||
stage: linting | ||
|
||
banned-api: | ||
extends: .banned-api | ||
stage: static-analysis | ||
|
||
check-fwk: | ||
extends: .check-fwk | ||
stage: unit-testing | ||
|
||
check-modules: | ||
extends: .check-modules | ||
stage: unit-testing | ||
|
||
build-products: | ||
extends: .build-products | ||
stage: build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# | ||
# Arm SCP/MCP Software | ||
# Copyright (c) 2024, Arm Limited and Contributors. All rights reserved. | ||
# | ||
# SPDX-License-Identifier: BSD-3-Clause | ||
# | ||
|
||
.build-products: | ||
image: ${CI_REGISTRY_IMAGE}/ci-base:latest | ||
variables: | ||
GIT_SUBMODULE_STRATEGY: recursive | ||
GIT_DEPTH: 1 | ||
before_script: | ||
- | | ||
if [ -z $BUILD_PRODUCTS_LOG_LEVEL ]; then | ||
export LOG_LEVEL="" | ||
else | ||
export LOG_LEVEL="--log-level=$BUILD_PRODUCTS_LOG_LEVEL" | ||
fi | ||
script: | ||
- | | ||
python3 tools/check_build.py --build-output-dir ./build \ | ||
${LOG_LEVEL} | ||
artifacts: | ||
when: on_failure | ||
expire_in: 2 days | ||
paths: | ||
- build/*.txt | ||
|
||
.build-products-all-log-levels: | ||
extends: .build-products | ||
parallel: | ||
matrix: | ||
- BUILD_PRODUCTS_LOG_LEVEL: | ||
- DEBUG | ||
- INFO | ||
- WARN | ||
- ERROR | ||
- CRIT | ||
- DISABLED |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# | ||
# Arm SCP/MCP Software | ||
# Copyright (c) 2024, Arm Limited and Contributors. All rights reserved. | ||
# | ||
# SPDX-License-Identifier: BSD-3-Clause | ||
# | ||
|
||
.check-lint: | ||
image: ${CI_REGISTRY_IMAGE}/ci-base:latest | ||
script: | ||
- python3 tools/${CHECK_SCRIPT}.py | ||
parallel: | ||
matrix: | ||
- CHECK_SCRIPT: | ||
- check_doc | ||
- check_pycodestyle | ||
- check_spacing | ||
- check_tabs | ||
|
||
.check-copyright: | ||
image: ${CI_REGISTRY_IMAGE}/ci-base:latest | ||
script: | ||
- python3 tools/check_copyright.py -c "${CI_MERGE_REQUEST_DIFF_BASE_SHA}" | ||
|
||
.check-style: | ||
image: ${CI_REGISTRY_IMAGE}/ci-base:latest | ||
script: | ||
- python3 tools/check_style.py -c "${CI_MERGE_REQUEST_DIFF_BASE_SHA}" | ||
artifacts: | ||
when: on_failure | ||
expire_in: 2 days | ||
paths: | ||
- code-style.patch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# | ||
# Arm SCP/MCP Software | ||
# Copyright (c) 2024, Arm Limited and Contributors. All rights reserved. | ||
# | ||
# SPDX-License-Identifier: BSD-3-Clause | ||
# | ||
|
||
.banned-api: | ||
image: ${CI_REGISTRY_IMAGE}/ci-base:latest | ||
script: | ||
- python3 tools/check_api.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# | ||
# Arm SCP/MCP Software | ||
# Copyright (c) 2024, Arm Limited and Contributors. All rights reserved. | ||
# | ||
# SPDX-License-Identifier: BSD-3-Clause | ||
# | ||
|
||
.check-fwk: | ||
image: ${CI_REGISTRY_IMAGE}/ci-base:latest | ||
script: | ||
- python3 tools/check_framework.py --coverage | ||
artifacts: | ||
when: on_success | ||
expire_in: 2 days | ||
paths: | ||
- build/module/test/scp_v2_fwk_test_coverage_filtered.info | ||
|
||
.check-modules: | ||
image: ${CI_REGISTRY_IMAGE}/ci-base:latest | ||
variables: | ||
GIT_SUBMODULE_STRATEGY: recursive | ||
GIT_DEPTH: 1 | ||
script: | ||
- python3 tools/check_module_utest.py --coverage | ||
artifacts: | ||
when: on_success | ||
expire_in: 2 days | ||
paths: | ||
- build/module/test/scp_v2_unit_test_coverage_filtered.info |