Fix Windows build errors in valgrind.h
[glib.git] / .gitlab-ci.yml
blob7df974b3bcb276642f2cfb93637c0cd37bfa8590
1 image: registry.gitlab.gnome.org/gnome/glib/master:v2
3 stages:
4   - build
5   - coverage
6   - deploy
8 cache:
9   paths:
10     - _ccache/
12 variables:
13   MESON_TEST_TIMEOUT_MULTIPLIER: 2
15 fedora-meson-x86_64:
16   stage: build
17   variables:
18    CFLAGS: "-coverage -ftest-coverage -fprofile-arcs"
19   script:
20     - meson --prefix /usr --libdir /usr/lib64 --buildtype debug --werror -Dsystemtap=true -Ddtrace=true _build .
21     - cd _build
22     - ninja
23     - meson test --timeout-multiplier ${MESON_TEST_TIMEOUT_MULTIPLIER}
24     - cd ..
25     - mkdir -p _coverage
26     - lcov --rc lcov_branch_coverage=1 --directory . --capture --no-external --output-file "_coverage/${CI_JOB_NAME}.lcov"
27   except:
28     - tags
29   artifacts:
30     name: "glib-_${CI_COMMIT_REF_NAME}"
31     paths:
32       - "${CI_PROJECT_DIR}/_build/meson-logs"
33       - "${CI_PROJECT_DIR}/_coverage"
35 fedora-meson-android_ndk_r16_api21_arm64:
36   stage: build
37   except:
38     - tags
39   script:
40     # FIXME: add --werror
41     - meson --cross-file=/opt/cross-file-android_ndk_r16_api21_arm64.txt -Diconv=gnu -Dinternal_pcre=true --buildtype debug _build
42     - ninja -C _build
43   artifacts:
44     paths:
45       - "${CI_PROJECT_DIR}/_build/meson-logs"
47 msys2-mingw32:
48   stage: build
49   tags:
50     - win32
51   variables:
52     MSYSTEM: "MINGW32"
53     CHERE_INVOKING: "yes"
54   script:
55     - C:\msys64\usr\bin\pacman --noconfirm -Syyuu --ask 20
56     - C:\msys64\usr\bin\bash -lc "bash -x ./.gitlab-ci/test-msys2.sh"
57   artifacts:
58     paths:
59       - _coverage/
61 vs2017-x64:
62   stage: build
63   tags:
64     - win32
65   script:
66     - .gitlab-ci/test-msvc.bat
67   artifacts:
68     when: always
69     paths:
70       - _build/meson-logs
72 coverage:
73   stage: coverage
74   artifacts:
75     paths:
76       - _coverage/
77   script:
78     - bash -x ./.gitlab-ci/coverage-docker.sh
79   coverage: '/^\s+lines\.+:\s+([\d.]+\%)\s+/'
81 pages:
82   stage: deploy
83   script:
84     - mv _coverage/ public/
85   artifacts:
86     paths:
87       - public
88   only:
89     - master
91 dist-job:
92   stage: build
93   only:
94     - tags
95   script:
96     - meson --prefix /usr --libdir /usr/lib64 --buildtype release -Dgtk_doc=true -Dman=true _build .
97     - cd _build
98     - ninja dist
99     - ninja glib-doc
100     - tar -c -f "glib-docs-$CI_COMMIT_TAG.tar.xz" -C docs/reference/glib html
101     - tar -c -f "gobject-docs-$CI_COMMIT_TAG.tar.xz" -C docs/reference/gobject html
102     - tar -c -f "gio-docs-$CI_COMMIT_TAG.tar.xz" -C docs/reference/gio html
103   artifacts:
104     paths:
105       - "${CI_PROJECT_DIR}/_build/glib-docs.tar.xz"
106       - "${CI_PROJECT_DIR}/_build/gobject-docs.tar.xz"
107       - "${CI_PROJECT_DIR}/_build/gio-docs.tar.xz"
108       - "${CI_PROJECT_DIR}/_build/meson-dist/glib-*.tar.xz"