mirror of
https://invent.kde.org/graphics/okular
synced 2024-07-02 15:49:03 +00:00
This represents the newly entered data for each keystroke. This is often a single added character, but for cases like pasting text it can be more complex. The PDF API reference doesn't specify any algorithm to use. The algorithm used here works by iterating through both strings from the start until the first different character is encountered. Then the rest of the new text is considered the difference. This doesn't produce the theoretically optimal/minimal diff, but seems to work well enough for practical application. When text is removed the diff is empty
65 lines
3.3 KiB
YAML
65 lines
3.3 KiB
YAML
variables:
|
|
DEBIAN_FRONTEND: "noninteractive"
|
|
|
|
include:
|
|
- https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/android.yml
|
|
- 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
|
|
- https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/windows.yml
|
|
|
|
build_ubuntu_20_04:
|
|
stage: build
|
|
image: ubuntu:focal
|
|
tags:
|
|
- Linux
|
|
only:
|
|
- merge_requests
|
|
before_script:
|
|
- sed -i -e 's/# deb-src/deb-src/g' /etc/apt/sources.list
|
|
- apt-get update
|
|
- apt-get install --yes eatmydata
|
|
- eatmydata apt-get build-dep --yes --no-install-recommends okular
|
|
- eatmydata apt-get install --yes --no-install-recommends ninja-build qtbase5-private-dev
|
|
script:
|
|
- mkdir -p build && cd build
|
|
- cmake -DOKULAR_UI=desktop -G Ninja ..
|
|
- ninja
|
|
|
|
build_clazy_clang_tidy:
|
|
stage: build
|
|
image: debian:unstable
|
|
tags:
|
|
- Linux
|
|
only:
|
|
- merge_requests
|
|
before_script:
|
|
- echo 'deb-src http://deb.debian.org/debian unstable main' >> /etc/apt/sources.list
|
|
- apt-get update
|
|
- apt-get install --yes eatmydata
|
|
- eatmydata apt-get build-dep --yes --no-install-recommends okular
|
|
- eatmydata apt-get install --yes --no-install-recommends ninja-build clazy clang clang-tidy qtbase5-private-dev libkf5crash-dev libkf5purpose-dev kirigami2-dev libegl-dev jq
|
|
|
|
script:
|
|
- 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" .
|
|
- CLAZY_IGNORE_DIRS="settings_core.[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
|
|
- run-clang-tidy-14
|
|
- 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" .
|
|
- 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
|
|
- run-clang-tidy-14
|
|
|
|
clang_format:
|
|
stage: build
|
|
image: debian:testing
|
|
only:
|
|
- merge_requests
|
|
- master
|
|
before_script:
|
|
- apt-get update
|
|
- apt-get install --yes --no-install-recommends git clang-format-13
|
|
script:
|
|
- find . \( -name "*.cpp" -or -name "*.h" -or -name "*.c" -or -name "*.cc" \) -exec clang-format-13 -i {} \;
|
|
- git diff --exit-code
|