.gitlab-ci.yml 2.63 KB
Newer Older
1
image: debian:unstable
Adam Reichold's avatar
Adam Reichold committed
2
3

before_script:
4
5
  - echo 'deb-src http://deb.debian.org/debian unstable main' >> /etc/apt/sources.list
  - apt-get update
6
  - apt-get build-dep --yes --no-install-recommends poppler
7
  - 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
8
9
10
11
12
13
14
  - 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
15
  TEST_DATA_URL: https://gitlab.freedesktop.org/${CI_PROJECT_NAMESPACE}/test.git
16
  UPSTREAM_TEST_DATA_URL: https://gitlab.freedesktop.org/poppler/test.git
Adam Reichold's avatar
Adam Reichold committed
17

18
19
20
21
22
cache:
  key: "$CI_BUILD_NAME"
  paths:
    - build/

Adam Reichold's avatar
Adam Reichold committed
23
24
25
build:
  stage: build
  script:
26
    - git clone --branch ${CI_COMMIT_REF_NAME} --depth 1 ${TEST_DATA_URL} test-data || git clone --depth 1 ${UPSTREAM_TEST_DATA_URL} test-data
27
    - mkdir -p build && cd build
28
    - cmake -G Ninja -DTESTDATADIR=$PWD/../test-data ..
Adam Reichold's avatar
Adam Reichold committed
29
    - ninja
30
    - ctest --output-on-failure
31
32
33
34

build_clang_libcpp:
  stage: build
  script:
35
    - git clone --branch ${CI_COMMIT_REF_NAME} --depth 1 ${TEST_DATA_URL} test-data || git clone --depth 1 ${UPSTREAM_TEST_DATA_URL} test-data
36
    - mkdir -p build && cd build
37
    - CC=clang CXX=clang++ cmake -G Ninja -DCMAKE_CXX_FLAGS=-stdlib=libc++ -DTESTDATADIR=$PWD/../test-data ..
38
39
    - ninja
    - ctest --output-on-failure
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59

build_gcc_49:
  stage: build
  image: ubuntu:trusty
  before_script:
    - apt-get update
    - apt-get install --yes software-properties-common
    - add-apt-repository --yes ppa:ubuntu-toolchain-r/test
    - add-apt-repository --yes ppa:george-edison55/cmake-3.x
    - add-apt-repository --yes ppa:ricotz/testing
    - add-apt-repository --yes ppa:aacid/openjp2trusty
    - apt-get update
    - apt-get install --yes build-essential cmake ninja-build gcc-4.9 g++-4.9 libjpeg-dev libopenjp2-7-dev qtbase5-dev gobject-introspection libglib2.0-dev libgtk-3-dev libgirepository1.0-dev libnss3-dev
    - update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 20
    - update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.9 20
    - update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-4.9 20
  script:
    - mkdir -p build && cd build
    - cmake -G Ninja ..
    - ninja
Albert Astals Cid's avatar
Albert Astals Cid committed
60
61
62
63
64

build_mingw64_fedora:
  stage: build
  image: fedora
  before_script:
65
66
67
    - dnf install -y 'dnf-command(builddep)'
    - dnf builddep -y mingw64-poppler
    - dnf -y install mingw64-curl make ninja-build mingw64-openjpeg2-tools mingw32-openjpeg2-tools
Albert Astals Cid's avatar
Albert Astals Cid committed
68
  script:
69
    - sed -i '/SYSTEM/d' glib/CMakeLists.txt test/CMakeLists.txt
Albert Astals Cid's avatar
Albert Astals Cid committed
70
71
72
    - mkdir -p build && cd build
    - mingw64-cmake -G Ninja ..
    - ninja