aboutsummaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml19
1 files changed, 18 insertions, 1 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 40e9ae4..661ff2c 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,6 +1,7 @@
stages:
- build
- test
+ - lint
variables:
BUILD_TYPE: Release
@@ -37,4 +38,20 @@ test:
script:
- apt-get update && apt-get install -y jq
- - ./perft.bash \ No newline at end of file
+ - ./perft.bash
+clang-tidy:
+ stage: lint
+ image: ubuntu:24.04
+
+ rules:
+ - if: $CI_COMMIT_BRANCH == "main"
+ - if: $CI_PIPELINE_SOURCE == "merge_request_event"
+
+ before_script:
+ - apt-get update
+ - apt-get install -y cmake gcc-14 g++-14 clang-tidy
+ script:
+ - export CC=gcc-14
+ - export CXX=g++-14
+ - cmake -B build -S . -DCMAKE_BUILD_TYPE=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
+ - run-clang-tidy -p build src \ No newline at end of file