summaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
blob: 359c4968a5cde91a4f74e67d341e8cef235d9bc6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
stages:
  - build
  - docs
  - deploy

# Common variables
variables:
  CCACHE_DIR: _ccache
  COMMON_MESON_FLAGS: "-Dwerror=true -Dglib:werror=false"
  LOADERS_FLAGS: "-Dpng=true -Djpeg=true -Dtiff=true"
  MESON_TEST_TIMEOUT_MULTIPLIER: 3
  FEDORA_IMAGE: "registry.gitlab.gnome.org/gnome/gdk-pixbuf/fedora:v1"


.build-linux:
  before_script:
    - mkdir -p _ccache
  script:
    - meson ${COMMON_MESON_FLAGS} ${LOADERS_FLAGS} ${BUILD_OPTS} _build .
    - ninja -C _build
  artifacts:
    when: on_failure
    name: "gdk-pixbuf-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
    paths:
      - "${CI_PROJECT_DIR}/build_*/meson-logs"
  cache:
    key: "$CI_JOB_NAME"
    paths:
      - _ccache/

meson-fedora-x86_64:
  stage: build
  extends: .build-linux
  image: ${FEDORA_IMAGE}
  after_script:
    - meson test -C _build

release-build:
  stage: build
  extends: .build-linux
  image: ${FEDORA_IMAGE}
  variables:
    BUILD_OPTS: "-Dbuildtype=release"
  after_script:
    - meson test -C _build

reference:
  stage: docs
  extends: .build-linux
  image: ${FEDORA_IMAGE}
  variables:
    BUILD_OPTS: "-Dgtk_doc=true"
  after_script:
    - ninja -C _build gdk-pixbuf-doc
    - mv _build/docs/html _reference
  artifacts:
    when: on_success
    paths:
      - _reference

pages:
  stage: deploy
  script:
    - mv _reference public
  artifacts:
    paths:
      - public
  only:
    - master

msys2-mingw64:
  stage: build
  tags:
    - win32-ps
  variables:
    MSYSTEM: "MINGW64"
    CHERE_INVOKING: "yes"
  script:
    - C:\msys64\usr\bin\pacman --noconfirm -Syyuu
    - C:\msys64\usr\bin\bash -lc "bash -x ./.gitlab/ci/test-msys2.sh"
  artifacts:
    name: "gdk-pixbuf-${env:CI_JOB_NAME}-${env:CI_COMMIT_REF_NAME}"
    when: always
    paths:
      - _build/meson-logs