From 36fa863a45a384199f297e74261120378ccc5e50 Mon Sep 17 00:00:00 2001 From: Gereon V <72784429+GereonV@users.noreply.github.com> Date: Thu, 10 Oct 2024 13:21:56 +0200 Subject: [PATCH] Add clang-format and clang-tidy to CI --- .gitlab-ci.yml | 43 ++++++++++++++++++++++++++++++++----------- 1 file changed, 32 insertions(+), 11 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0c17683..2f7b370 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,15 +1,36 @@ +default: + image: ubuntu:latest + build: stage: build - image: ubuntu:latest - script: | - apt-get update - apt-get install -y g++ make - make release + script: + - | + apt-get update + apt-get install -y g++ make + - make BIN=bin/program release + artifacts: + paths: + - bin/ + run: stage: test - image: ubuntu:latest - script: | - apt-get update - apt-get install -y g++ make - make release - bin/program + script: bin/program + variables: + GIT_STRATEGY: none +check-formatting: + stage: test + allow_failure: true + script: + - | + apt-get update + apt-get install -y clang-format + - clang-format --dry-run --Werror src/* + needs: [] +lint: + stage: test + allow_failure: true + script: + - | + apt-get update + apt-get install -y clang-tidy + - clang-tidy src/*