-
Notifications
You must be signed in to change notification settings - Fork 11
/
.gitlab-ci-code-linting.yml
30 lines (28 loc) · 1.1 KB
/
.gitlab-ci-code-linting.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Copyright (c) 2023 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
#
# SPDX-License-Identifier: GPL-2.0-only
# ns-3 CI/CD script with the code-linting stage
#
# Contains jobs to check the ns-3 coding style and perform lint checking.
# Clang-format
check-style-clang-format:
stage: code-linting
image: ubuntu:latest
before_script:
- apt update
- DEBIAN_FRONTEND=noninteractive apt install -y
python3
clang-format-15
git
script:
- git clone https://gitlab.com/nsnam/ns-3-dev.git
- mkdir -p ns-3-dev/contrib/nr/
- cp -r CMakeLists.txt doc examples helper model README.md RELEASE_NOTES.md test utils ns-3-dev/contrib/nr/
- cd ns-3-dev
- python3 utils/check-style-clang-format.py contrib/nr/model
- python3 utils/check-style-clang-format.py contrib/nr/helper
- python3 utils/check-style-clang-format.py contrib/nr/utils
- python3 utils/check-style-clang-format.py contrib/nr/examples
- python3 utils/check-style-clang-format.py contrib/nr/test
- python3 utils/check-style-clang-format.py --no-formatting contrib/nr/doc
timeout: 1h