.gitlab-ci.yml 2.6 KB
Newer Older
Albert Astals Cid's avatar
Albert Astals Cid committed
1
2
3
4
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

Albert Astals Cid's avatar
Albert Astals Cid committed
5
build_ubuntu_18_04:
Albert Astals Cid's avatar
Albert Astals Cid committed
6
  stage: build
Albert Astals Cid's avatar
Albert Astals Cid committed
7
  image: ubuntu:bionic
Albert Astals Cid's avatar
Albert Astals Cid committed
8
9
  only:
    - merge_requests
Albert Astals Cid's avatar
Albert Astals Cid committed
10
11
12
13
14
15
16
17
18
  before_script:
    - sed -i -e 's/# deb-src/deb-src/g' /etc/apt/sources.list
    - apt-get update
    - apt-get build-dep --yes --no-install-recommends okular
    - apt-get install --yes --no-install-recommends ninja-build libkf5crash-dev
  script:
    - mkdir -p build && cd build
    - cmake -G Ninja ..
    - ninja
19

20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
build_ubuntu_20_04:
  stage: build
  image: ubuntu:focal
  only:
    - merge_requests
  before_script:
    - sed -i -e 's/# deb-src/deb-src/g' /etc/apt/sources.list
    - apt-get update
    - apt-get build-dep --yes --no-install-recommends okular
    - apt-get install --yes --no-install-recommends ninja-build 
  script:
    - mkdir -p build && cd build
    - cmake -DOKULAR_UI=desktop -G Ninja ..
    - ninja
    - rm -rf *
    - cmake -DOKULAR_UI=mobile -G Ninja ..
    - ninja

38
39
40
41
42
43
44
45
46
build_clang_tidy:
  stage: build
  image: debian:unstable
  only:
    - merge_requests
  before_script:
    - echo 'deb-src http://deb.debian.org/debian unstable main' >> /etc/apt/sources.list
    - apt-get update
    - apt-get build-dep --yes --no-install-recommends okular
47
    - apt-get install --yes --no-install-recommends ninja-build clang clang-tidy python python-yaml libkf5crash-dev libkf5purpose-dev libegl-dev jq
48
49

  script:
50
    - srcdir=`pwd` && mkdir -p /tmp/okular_build && cd /tmp/okular_build && CC=clang CXX=clang++ cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -G Ninja $srcdir && cat compile_commands.json | jq  '[.[] | select(.file | contains("'"$srcdir"'"))]' > compile_commands.aux.json && cat compile_commands.aux.json | jq  '[.[] | select(.file | contains("/synctex/")| not)]' > compile_commands.json
51
    - ninja
52
53
    # Fix the poppler header, remove when debian:unstable ships poppler 0.82 or later
    - sed -i "N;N;N;N; s#class MediaRendition\;\nclass MovieAnnotation\;\nclass ScreenAnnotation;#class MediaRendition\;#g"  /usr/include/poppler/qt5/poppler-link.h
54
    - "run-clang-tidy -header-filter='.*/okular/.*' -checks='-*,performance-*,bugprone-*,readability-inconsistent-declaration-parameter-name,readability-string-compare,modernize-redundant-void-arg,modernize-use-bool-literals,modernize-make-unique,modernize-make-shared,modernize-use-override,modernize-use-equals-delete,modernize-use-emplace,modernize-loop-convert,-bugprone-macro-parentheses,-bugprone-narrowing-conversions,-bugprone-branch-clone,-bugprone-incorrect-roundings' -config=\"{WarningsAsErrors: '*'}\""