.gitlab-ci.yml 3.23 KB
Newer Older
Xavier Claessens's avatar
Xavier Claessens committed
1
image: registry.gitlab.gnome.org/gnome/glib/master:v3
2
3
4

stages:
  - build
5
6
  - coverage
  - deploy
7

8
9
10
11
cache:
  paths:
    - _ccache/

12
13
14
variables:
  MESON_TEST_TIMEOUT_MULTIPLIER: 2

15
fedora-meson-x86_64:
16
  stage: build
17
18
  variables:
   CFLAGS: "-coverage -ftest-coverage -fprofile-arcs"
19
20
21
22
  script:
    - meson --prefix /usr --libdir /usr/lib64 --buildtype debug --werror -Dsystemtap=true -Ddtrace=true _build .
    - cd _build
    - ninja
23
    - meson test --timeout-multiplier ${MESON_TEST_TIMEOUT_MULTIPLIER}
24
25
26
    - cd ..
    - mkdir -p _coverage
    - lcov --rc lcov_branch_coverage=1 --directory . --capture --no-external --output-file "_coverage/${CI_JOB_NAME}.lcov"
27
28
29
  except:
    - tags
  artifacts:
Philip Withnall's avatar
Philip Withnall committed
30
    name: "glib-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
31
    when: always
32
33
    paths:
      - "${CI_PROJECT_DIR}/_build/meson-logs"
34
      - "${CI_PROJECT_DIR}/_coverage"
35

Xavier Claessens's avatar
Xavier Claessens committed
36
37
38
39
40
41
42
43
44
fedora-meson-android_ndk_r16_api21_arm64:
  stage: build
  except:
    - tags
  script:
    # FIXME: add --werror
    - meson --cross-file=/opt/cross-file-android_ndk_r16_api21_arm64.txt -Diconv=gnu -Dinternal_pcre=true --buildtype debug _build
    - ninja -C _build
  artifacts:
45
46
    name: "glib-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
    when: always
Xavier Claessens's avatar
Xavier Claessens committed
47
48
49
    paths:
      - "${CI_PROJECT_DIR}/_build/meson-logs"

Xavier Claessens's avatar
Xavier Claessens committed
50
51
52
53
54
55
56
57
58
fedora-meson-mingw64:
  stage: build
  except:
    - tags
  script:
    # FIXME: Add --werror
    - meson --cross-file=/opt/cross_file_mingw64.txt --buildtype debug _build
    - ninja -C _build
  artifacts:
59
60
    name: "glib-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
    when: always
Xavier Claessens's avatar
Xavier Claessens committed
61
62
63
    paths:
      - "${CI_PROJECT_DIR}/_build/meson-logs"

64
65
66
67
68
69
70
71
72
73
msys2-mingw32:
  stage: build
  tags:
    - win32
  variables:
    MSYSTEM: "MINGW32"
    CHERE_INVOKING: "yes"
  script:
    - C:\msys64\usr\bin\pacman --noconfirm -Syyuu --ask 20
    - C:\msys64\usr\bin\bash -lc "bash -x ./.gitlab-ci/test-msys2.sh"
74
  artifacts:
75
    name: "glib-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
76
    when: always
77
    paths:
78
79
      - "${CI_PROJECT_DIR}/_build/meson-logs"
      - "${CI_PROJECT_DIR}/_coverage"
80

Christoph Reiter's avatar
Christoph Reiter committed
81
82
83
84
85
86
87
vs2017-x64:
  stage: build
  tags:
    - win32
  script:
    - .gitlab-ci/test-msvc.bat
  artifacts:
88
    name: "glib-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
Christoph Reiter's avatar
Christoph Reiter committed
89
90
    when: always
    paths:
91
      - "${CI_PROJECT_DIR}/_build/meson-logs"
Christoph Reiter's avatar
Christoph Reiter committed
92

93
94
95
coverage:
  stage: coverage
  artifacts:
Philip Withnall's avatar
Philip Withnall committed
96
    name: "glib-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
97
98
99
100
    paths:
      - _coverage/
  script:
    - bash -x ./.gitlab-ci/coverage-docker.sh
101
  coverage: '/^\s+lines\.+:\s+([\d.]+\%)\s+/'
102
103
104
105
106
107
108
109
110
111

pages:
  stage: deploy
  script:
    - mv _coverage/ public/
  artifacts:
    paths:
      - public
  only:
    - master
112

113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
dist-job:
  stage: build
  only:
    - tags
  script:
    - meson --prefix /usr --libdir /usr/lib64 --buildtype release -Dgtk_doc=true -Dman=true _build .
    - cd _build
    - ninja dist
    - ninja glib-doc
    - tar -c -f "glib-docs-$CI_COMMIT_TAG.tar.xz" -C docs/reference/glib html
    - tar -c -f "gobject-docs-$CI_COMMIT_TAG.tar.xz" -C docs/reference/gobject html
    - tar -c -f "gio-docs-$CI_COMMIT_TAG.tar.xz" -C docs/reference/gio html
  artifacts:
    paths:
      - "${CI_PROJECT_DIR}/_build/glib-docs.tar.xz"
      - "${CI_PROJECT_DIR}/_build/gobject-docs.tar.xz"
      - "${CI_PROJECT_DIR}/_build/gio-docs.tar.xz"
      - "${CI_PROJECT_DIR}/_build/meson-dist/glib-*.tar.xz"