aboutsummaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml39
1 files changed, 39 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000..2ee45b9
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,39 @@
+stages:
+ - build
+ - test
+ - clang-tidy
+
+variables:
+ BUILD_TYPE: Release
+
+build:
+ stage: Build
+ 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
+ script:
+ - export CC=gcc-14
+ - export CXX=g++-14
+ - cmake -B build -S . -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
+ - cmake --build build --config $BUILD_TYPE
+ artifacts:
+ paths:
+ - build/
+ expire_in: 1 days
+test:
+ stage: test
+ image: ubuntu:24.04
+
+ needs:
+ - "build"
+
+ rules:
+ - if: $CI_COMMIT_BRANCH == "main"
+ - if: $CI_PIPELINE_SOURCE == "merge_request_event"
+ script:
+ - ./perft.bash \ No newline at end of file