2020-03-26 21:26:56 +00:00
|
|
|
variables:
|
|
|
|
DEBIAN_FRONTEND: "noninteractive"
|
|
|
|
|
2019-06-20 21:57:42 +00:00
|
|
|
include:
|
2021-11-30 23:15:56 +00:00
|
|
|
- https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/android.yml
|
2021-11-28 10:49:12 +00:00
|
|
|
- https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/linux.yml
|
|
|
|
- https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/freebsd.yml
|
2022-04-08 08:55:18 +00:00
|
|
|
- https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/windows.yml
|
2019-06-20 21:57:42 +00:00
|
|
|
|
2022-03-18 21:12:36 +00:00
|
|
|
build_ubuntu_22_04:
|
2020-02-01 10:02:33 +00:00
|
|
|
stage: build
|
2022-03-18 21:12:36 +00:00
|
|
|
image: ubuntu:22.04
|
2022-04-09 17:56:47 +00:00
|
|
|
tags:
|
|
|
|
- Linux
|
2020-02-01 10:02:33 +00:00
|
|
|
only:
|
|
|
|
- merge_requests
|
|
|
|
before_script:
|
|
|
|
- sed -i -e 's/# deb-src/deb-src/g' /etc/apt/sources.list
|
|
|
|
- apt-get update
|
2020-11-01 16:41:29 +00:00
|
|
|
- apt-get install --yes eatmydata
|
|
|
|
- eatmydata apt-get build-dep --yes --no-install-recommends okular
|
2023-08-10 23:06:18 +00:00
|
|
|
- eatmydata apt-get install --yes --no-install-recommends ninja-build libqt5x11extras5-dev
|
2020-02-01 10:02:33 +00:00
|
|
|
script:
|
|
|
|
- mkdir -p build && cd build
|
|
|
|
- cmake -DOKULAR_UI=desktop -G Ninja ..
|
|
|
|
- ninja
|
|
|
|
|
2020-02-19 17:00:13 +00:00
|
|
|
build_clazy_clang_tidy:
|
2019-12-13 16:08:54 +00:00
|
|
|
stage: build
|
2022-08-09 21:03:34 +00:00
|
|
|
image: debian:unstable
|
2022-04-09 17:56:47 +00:00
|
|
|
tags:
|
|
|
|
- Linux
|
2019-12-13 16:08:54 +00:00
|
|
|
only:
|
|
|
|
- merge_requests
|
|
|
|
before_script:
|
2022-01-02 23:21:05 +00:00
|
|
|
- echo 'deb-src http://deb.debian.org/debian unstable main' >> /etc/apt/sources.list
|
2019-12-13 16:08:54 +00:00
|
|
|
- apt-get update
|
2020-11-01 16:41:29 +00:00
|
|
|
- apt-get install --yes eatmydata
|
|
|
|
- eatmydata apt-get build-dep --yes --no-install-recommends okular
|
2023-08-10 23:06:18 +00:00
|
|
|
- eatmydata apt-get install --yes --no-install-recommends ninja-build clazy clang clang-tidy libqt5x11extras5-dev libkf5crash-dev libkf5purpose-dev kirigami2-dev libegl-dev jq
|
2019-12-13 16:08:54 +00:00
|
|
|
|
|
|
|
script:
|
2020-02-26 07:56:52 +00:00
|
|
|
- srcdir=`pwd` && mkdir -p /tmp/okular_build && cd /tmp/okular_build && CC=clang CXX=clazy CXXFLAGS="-Werror -Wno-deprecated-declarations" 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 && cp "$srcdir/.clang-tidy" .
|
2023-04-19 11:36:13 +00:00
|
|
|
- CLAZY_IGNORE_DIRS="settings_core.[cpp|h]|settings.[cpp.h]|pdfsettings.h|gssettings.h|ui_selectcertificatedialog.h" CLAZY_CHECKS="level0,level1,level2,no-ctor-missing-parent-argument,isempty-vs-count,qhash-with-char-pointer-key,raw-environment-function,qproperty-type-mismatch" ninja
|
2022-08-02 21:01:32 +00:00
|
|
|
- run-clang-tidy-14
|
2021-11-24 16:58:52 +00:00
|
|
|
- rm -rf *
|
|
|
|
- echo "Now compiling the mobile UI"
|
|
|
|
- cd "$CI_PROJECT_DIR"
|
|
|
|
- srcdir=`pwd` && mkdir -p /tmp/okular_build && cd /tmp/okular_build && CC=clang CXX=clazy CXXFLAGS="-Werror -Wno-deprecated-declarations" cmake -DOKULAR_UI=mobile -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 && cp "$srcdir/.clang-tidy" .
|
2022-08-19 11:52:49 +00:00
|
|
|
- CLAZY_IGNORE_DIRS="settings_mobile.[cpp|h]|settings.[cpp.h]|pdfsettings.h|gssettings.h" CLAZY_CHECKS="level0,level1,level2,no-ctor-missing-parent-argument,isempty-vs-count,qhash-with-char-pointer-key,raw-environment-function,qproperty-type-mismatch" ninja
|
2022-08-02 21:01:32 +00:00
|
|
|
- run-clang-tidy-14
|
2020-07-10 22:16:16 +00:00
|
|
|
|
|
|
|
clang_format:
|
|
|
|
stage: build
|
|
|
|
image: debian:testing
|
2023-08-07 22:53:54 +00:00
|
|
|
tags:
|
|
|
|
- Linux
|
2020-07-10 22:16:16 +00:00
|
|
|
only:
|
|
|
|
- merge_requests
|
|
|
|
- master
|
|
|
|
before_script:
|
|
|
|
- apt-get update
|
2022-03-09 23:14:02 +00:00
|
|
|
- apt-get install --yes --no-install-recommends git clang-format-13
|
2020-07-10 22:16:16 +00:00
|
|
|
script:
|
2022-03-09 23:14:02 +00:00
|
|
|
- find . \( -name "*.cpp" -or -name "*.h" -or -name "*.c" -or -name "*.cc" \) -exec clang-format-13 -i {} \;
|
2020-07-10 22:16:16 +00:00
|
|
|
- git diff --exit-code
|