| image: debian:unstable |
| |
| stages: |
| - build |
| - document |
| - publish |
| |
| 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 poppler |
| - apt-get install --yes --no-install-recommends ninja-build libcurl4-openssl-dev git ca-certificates locales libgtk-3-dev wget p7zip-full libbrotli-dev libboost-container-dev |
| - echo 'en_US.UTF-8 UTF-8' >> /etc/locale.gen |
| - locale-gen |
| |
| variables: |
| LANG: en_US.UTF-8 |
| LANGUAGE: en_US:en |
| LC_ALL: en_US.UTF-8 |
| DEBIAN_FRONTEND: noninteractive |
| TEST_DATA_URL: https://gitlab.freedesktop.org/${CI_PROJECT_NAMESPACE}/test.git |
| UPSTREAM_TEST_DATA_URL: https://gitlab.freedesktop.org/poppler/test.git |
| |
| cache: |
| key: "$CI_BUILD_NAME" |
| paths: |
| - build/ |
| |
| clang_format: |
| stage: build |
| 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 |
| |
| build: |
| stage: build |
| script: |
| - wget -r -l1 -np "https://download.qt.io/online/qtsdkrepository/linux_x64/desktop/qt6_610/qt.qt6.610.gcc_64/" -A "6.1.0-0-*qtbase-Linux-CentOS_8_3-GCC-Linux-CentOS_8_3-X86_64.7z" |
| - 7z x download.qt.io/online/qtsdkrepository/linux_x64/desktop/qt6_610/qt.qt6.610.gcc_64/6.1.0-0-*qtbase-Linux-CentOS_8_3-GCC-Linux-CentOS_8_3-X86_64.7z |
| - wget -r -l1 -np "https://download.qt.io/online/qtsdkrepository/linux_x64/desktop/qt6_610/qt.qt6.610.gcc_64/" -A "6.1.0-0-*icu-linux-Rhel7.2-x64.7z" |
| - 7z x download.qt.io/online/qtsdkrepository/linux_x64/desktop/qt6_610/qt.qt6.610.gcc_64/6.1.0-0-*icu-linux-Rhel7.2-x64.7z |
| - git clone --branch ${CI_COMMIT_REF_NAME} --depth 1 ${TEST_DATA_URL} test-data || git clone --depth 1 ${UPSTREAM_TEST_DATA_URL} test-data |
| - mkdir -p build && cd build |
| - cmake -G Ninja -DTESTDATADIR=$PWD/../test-data .. -DCMAKE_PREFIX_PATH=$PWD/../6.1.0/gcc_64/lib/cmake |
| - ninja |
| - ctest --output-on-failure |
| |
| build_clang13_libcpp: |
| stage: build |
| script: |
| - wget -r -l1 -np "https://download.qt.io/online/qtsdkrepository/linux_x64/desktop/qt6_610/qt.qt6.610.gcc_64/" -A "6.1.0-0-*qtbase-Linux-CentOS_8_3-GCC-Linux-CentOS_8_3-X86_64.7z" |
| - 7z x download.qt.io/online/qtsdkrepository/linux_x64/desktop/qt6_610/qt.qt6.610.gcc_64/6.1.0-0-*qtbase-Linux-CentOS_8_3-GCC-Linux-CentOS_8_3-X86_64.7z |
| - wget -r -l1 -np "https://download.qt.io/online/qtsdkrepository/linux_x64/desktop/qt6_610/qt.qt6.610.gcc_64/" -A "6.1.0-0-*icu-linux-Rhel7.2-x64.7z" |
| - 7z x download.qt.io/online/qtsdkrepository/linux_x64/desktop/qt6_610/qt.qt6.610.gcc_64/6.1.0-0-*icu-linux-Rhel7.2-x64.7z |
| - git clone --branch ${CI_COMMIT_REF_NAME} --depth 1 ${TEST_DATA_URL} test-data || git clone --depth 1 ${UPSTREAM_TEST_DATA_URL} test-data |
| - mkdir -p build && cd build |
| - apt-get install --yes --no-install-recommends libclang-13-dev llvm-13-dev libc++-13-dev libc++abi-13-dev clang-tidy-13 clang-13 libunwind-13-dev |
| - clang++-13 -fPIC -shared -o goostring-format-checker.so ../test/goostring-format-checker/goostring-format-checker.cc -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -I /usr/lib/llvm-13/include/ |
| - CC=clang-13 CXX=clang++-13 cmake -G Ninja -DCMAKE_CXX_FLAGS="-stdlib=libc++ -Xclang -load -Xclang $PWD/goostring-format-checker.so -Xclang -add-plugin -Xclang goostring-format-checker -Werror -Wno-deprecated-declarations" -DTESTDATADIR=$PWD/../test-data -DCMAKE_CXX_CLANG_TIDY="clang-tidy-13;-header-filter=.;-checks=-*,performance-*,bugprone-*,readability-inconsistent-declaration-parameter-name,readability-string-compare,modernize-deprecated-headers,modernize-make-unique,modernize-make-shared,modernize-use-override,modernize-use-equals-delete,modernize-use-emplace,modernize-use-bool-literals,modernize-redundant-void-arg,modernize-loop-convert,google-explicit-constructor,-bugprone-narrowing-conversions,-bugprone-macro-parentheses,-bugprone-suspicious-string-compare,-bugprone-incorrect-roundings,-bugprone-undefined-memory-manipulation,-bugprone-sizeof-expression,-bugprone-branch-clone,-bugprone-reserved-identifier,-bugprone-suspicious-include,-performance-no-int-to-ptr,-bugprone-easily-swappable-parameters,-bugprone-implicit-widening-of-multiplication-result;-warnings-as-errors=*" .. -DCMAKE_PREFIX_PATH=$PWD/../6.1.0/gcc_64/lib/cmake |
| - ninja |
| - ctest --output-on-failure |
| |
| build_ubuntu_18_04: |
| stage: build |
| image: ubuntu:bionic |
| before_script: |
| - apt-get update |
| - apt-get install --yes --no-install-recommends build-essential cmake ninja-build libjpeg-dev libopenjp2-7-dev qtbase5-dev gobject-introspection libglib2.0-dev libgtk-3-dev libgirepository1.0-dev libnss3-dev ca-certificates libcurl4-nss-dev liblcms2-dev libboost-container-dev |
| script: |
| - mkdir -p build && cd build |
| - cmake -G Ninja .. |
| - ninja |
| |
| build_mingw64_fedora35: |
| stage: build |
| image: fedora:35 |
| before_script: |
| - dnf install -y 'dnf-command(builddep)' |
| - dnf builddep -y mingw64-poppler |
| - dnf -y install glibc-langpack-en make ninja-build mingw64-boost mingw64-curl mingw64-qt6-qtbase |
| script: |
| - mkdir -p build && cd build |
| - mingw64-cmake -G Ninja .. |
| - ninja |
| |
| build_clazy_clang13: |
| stage: build |
| script: |
| - wget -r -l1 -np "https://download.qt.io/online/qtsdkrepository/linux_x64/desktop/qt6_610/qt.qt6.610.gcc_64/" -A "6.1.0-0-*qtbase-Linux-CentOS_8_3-GCC-Linux-CentOS_8_3-X86_64.7z" |
| - 7z x download.qt.io/online/qtsdkrepository/linux_x64/desktop/qt6_610/qt.qt6.610.gcc_64/6.1.0-0-*qtbase-Linux-CentOS_8_3-GCC-Linux-CentOS_8_3-X86_64.7z |
| - wget -r -l1 -np "https://download.qt.io/online/qtsdkrepository/linux_x64/desktop/qt6_610/qt.qt6.610.gcc_64/" -A "6.1.0-0-*icu-linux-Rhel7.2-x64.7z" |
| - 7z x download.qt.io/online/qtsdkrepository/linux_x64/desktop/qt6_610/qt.qt6.610.gcc_64/6.1.0-0-*icu-linux-Rhel7.2-x64.7z |
| - apt-get install --yes --no-install-recommends clazy clang-13 |
| - mkdir -p build && cd build |
| - CC=clang-13 CXX=clazy CXXFLAGS="-Werror -Wno-deprecated-declarations" cmake -G Ninja .. -DCMAKE_PREFIX_PATH=$PWD/../6.1.0/gcc_64/lib/cmake |
| - CLAZY_CHECKS="level0,level1,level2,isempty-vs-count,qhash-with-char-pointer-key,tr-non-literal,no-non-pod-global-static" ninja |
| |
| build_android: |
| stage: build |
| image: kdeorg/android-sdk |
| before_script: |
| - echo "workaround for ECM Android toolchain wanting all binaries to be shared libraries" |
| - sed -i -e 's/<LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS>/<LINK_FLAGS>/g' /opt/nativetooling/share/ECM/toolchain/Android.cmake |
| script: |
| - mkdir -p build && cd build |
| - 'ANDROID_ARCH_ABI=arm64-v8a cmake -G Ninja .. |
| -DCMAKE_ANDROID_API=28 |
| -DCMAKE_PREFIX_PATH="/opt/Qt/;/opt/kdeandroid-arm64/" |
| -DCMAKE_BUILD_TYPE=debug |
| -DCMAKE_POSITION_INDEPENDENT_CODE=OFF |
| -DENABLE_DCTDECODER=unmaintained |
| -DENABLE_LIBOPENJPEG=unmaintained |
| -DENABLE_BOOST=OFF |
| -DCMAKE_TOOLCHAIN_FILE=/opt/nativetooling/share/ECM/toolchain/Android.cmake' |
| - ninja |
| |
| qt5_docs: |
| only: |
| - master |
| stage: document |
| variables: |
| QT_SELECT: qt5 |
| script: |
| - apt-get install --yes --no-install-recommends doxygen graphviz qtchooser qttools5-dev-tools |
| - cd qt5/src |
| - doxygen |
| cache: {} |
| artifacts: |
| paths: |
| - qt5/src/APIDOCS-html |
| |
| cpp_docs: |
| only: |
| - master |
| stage: document |
| script: |
| - apt-get install --yes --no-install-recommends doxygen graphviz |
| - cd cpp |
| - doxygen |
| cache: {} |
| artifacts: |
| paths: |
| - cpp/APIDOCS-html |
| |
| glib_docs: |
| only: |
| - master |
| stage: document |
| script: |
| - apt-get install --yes --no-install-recommends gtk-doc-tools |
| - mkdir -p build && cd build |
| - cmake -G Ninja -DENABLE_GTK_DOC=YES .. |
| - ninja glib-docs |
| cache: {} |
| artifacts: |
| paths: |
| - build/glib/reference/html |
| |
| trigger_pages: |
| only: |
| - master |
| stage: publish |
| image: alpine:latest |
| before_script: |
| - apk --update upgrade |
| - apk add curl ca-certificates |
| script: |
| - 'curl --request POST --form "token=$WEB_PAGE_TRIGGER" --form ref=master https://gitlab.freedesktop.org/api/v4/projects/poppler%2Fpoppler-web-page/trigger/pipeline' |
| cache: {} |