| 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 libc++-dev libc++abi-dev clang libgtk-3-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/ |
| |
| build: |
| stage: build |
| script: |
| - 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 .. |
| - ninja |
| - ctest --output-on-failure |
| |
| build_clang_libcpp: |
| stage: build |
| script: |
| - 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 |
| - CC=clang CXX=clang++ cmake -G Ninja -DCMAKE_CXX_FLAGS=-stdlib=libc++ -DTESTDATADIR=$PWD/../test-data .. |
| - ninja |
| - ctest --output-on-failure |
| |
| build_ubuntu_16_04: |
| stage: build |
| image: ubuntu:xenial |
| 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 |
| script: |
| - mkdir -p build && cd build |
| - cmake -G Ninja .. |
| - ninja |
| |
| build_mingw64_fedora: |
| stage: build |
| image: fedora |
| before_script: |
| - dnf install -y 'dnf-command(builddep)' |
| - dnf builddep -y mingw64-poppler |
| - dnf -y install glibc-langpack-en mingw64-curl make ninja-build mingw64-openjpeg2-tools mingw32-openjpeg2-tools |
| script: |
| - mkdir -p build && cd build |
| - mingw64-cmake -G Ninja .. -DCMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES:PATH=/usr/x86_64-w64-mingw32/sys-root/mingw/include/ |
| - ninja |
| |
| build_clazy: |
| stage: build |
| image: fedora |
| before_script: |
| - dnf install -y 'dnf-command(builddep)' |
| - dnf builddep -y poppler |
| - dnf -y install glibc-langpack-en curl make ninja-build openjpeg2-tools clazy clang redhat-rpm-config |
| script: |
| - mkdir -p build && cd build |
| - CC=clang CXX=clazy CXXFLAGS="-Werror -Wno-deprecated-declarations" cmake -G Ninja .. |
| - 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-aarch64-sdk |
| before_script: |
| - git clone https://git.savannah.gnu.org/git/freetype/freetype2.git --single-branch -b VER-2-8-1 |
| - pushd freetype2 |
| - CFLAGS=-std=gnu99 /opt/helpers/build-standalone "./autogen.sh && ./configure --enable-shared=no --prefix=/opt/popplerandroid-deps --host=${ANDROID_NDK_TOOLCHAIN_PREFIX} && make -j`nproc` && make install" |
| - popd |
| script: |
| - mkdir -p build && cd build |
| - 'cmake -G Ninja .. -DCMAKE_SYSTEM_NAME=Android |
| -DCMAKE_ANDROID_STL_TYPE=c++_shared |
| -DCMAKE_ANDROID_ARCH_ABI=arm64-v8a |
| -DCMAKE_ANDROID_API=28 |
| -DCMAKE_ANDROID_NDK_TOOLCHAIN_VERSION=clang |
| -DCMAKE_INSTALL_PREFIX="/opt/popplerandroid-deps" |
| -DCMAKE_PREFIX_PATH="$QT_ANDROID;/opt/popplerandroid-deps" |
| -DCMAKE_BUILD_TYPE=debug |
| -DCMAKE_POSITION_INDEPENDENT_CODE=OFF |
| -DENABLE_DCTDECODER=unmaintained |
| -DENABLE_LIBOPENJPEG=unmaintained' |
| - ninja && ninja install |
| |
| 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: {} |