.gitlab-ci.yml 2.26 KB
Newer Older
Laurent Montel's avatar
Laurent Montel committed
1
# SPDX-FileCopyrightText: 2020-2021 Laurent Montel <montel@kde.org>
2
3
4
# SPDX-FileCopyrightText: 2021 Volker Krause <vkrause@kde.org>
# SPDX-License-Identifier: CC0-1.0

5
6
7
8
9
10
include:
  - https://invent.kde.org/sysadmin/ci-tooling/raw/master/invent/ci-before.yml
  - https://invent.kde.org/sysadmin/ci-tooling/raw/master/invent/ci-applications-linux.yml

build_clazy_clang_tidy:
  stage: build
Laurent Montel's avatar
Laurent Montel committed
11
  image: kdeorg/ci-suse-qt515
12
  extends: .linux
13
14
  #only:
  #  - merge_requests
15
  before_script:
16
    - zypper install -y clazy
17
18
19
20
    - git clone --depth=1 https://invent.kde.org/sysadmin/ci-tooling.git $CI_TOOLING
    - git clone --depth=1 https://invent.kde.org/sysadmin/repo-metadata.git $CI_TOOLING/repo-metadata
    - git clone --depth=1 https://invent.kde.org/sysadmin/kde-build-metadata.git $CI_TOOLING/kde-build-metadata
    - git clone --depth=1 https://invent.kde.org/sdk/kde-dev-scripts.git $CI_TOOLING/kde-dev-scripts
21
22

  script:
23
24
25
    - export CXX=clazy
    - export CC=clang
    - export CXXFLAGS="-Wno-deprecated-declarations"
26
27
    - export CLAZY_HEADER_FILTER='^(?!ui_)\w+.h\$'
    - export CLAZY_CHECKS="level0,level1,detaching-member,ifndef-define-typo,isempty-vs-count,qrequiredresult-candidates,reserve-candidates,signal-with-return-value,unneeded-cast,function-args-by-ref,function-args-by-value,returning-void-expression,no-ctor-missing-parent-argument,isempty-vs-count,qhash-with-char-pointer-key,raw-environment-function,qproperty-type-mismatch,old-style-connect,qstring-allocations,container-inside-loop,heap-allocated-small-trivial-type,inefficient-qlist,qstring-varargs"
28
29
30
31
32
    - python3 -u $CI_TOOLING/helpers/prepare-dependencies.py --product $PRODUCT --project $PROJECT --branchGroup $BRANCH_GROUP --environment production --platform $PLATFORM --installTo $INSTALL_PREFIX
    - python3 -u $CI_TOOLING/helpers/configure-build.py --product $PRODUCT --project $PROJECT --branchGroup $BRANCH_GROUP --platform $PLATFORM --installTo $INSTALL_PREFIX
    - python3 -u $CI_TOOLING/helpers/compile-build.py --product $PRODUCT --project $PROJECT --branchGroup $BRANCH_GROUP --platform $PLATFORM --usingInstall $INSTALL_PREFIX
    - cd build && run-clang-tidy
  variables:
Laurent Montel's avatar
Laurent Montel committed
33
    PLATFORM: SUSEQt5.15
34
    BRANCH_GROUP: kf5-qt5
35
36
37
38
39
40
41

reuse:
  image:
    name: fsfe/reuse:latest
    entrypoint: [""]
  script:
    - reuse lint