Merge branch '1454-gvdb-corruption' into 'master'
[dconf.git] / .gitlab-ci.yml
blob868c7977c90841a60700111833fa1720ae18de7e
1 image: debian:unstable
3 before_script:
4   - apt update -qq
5   - apt install -y -qq build-essential meson pkg-config gtk-doc-tools
6                        libxml2-utils gobject-introspection dbus dbus-x11
7                        libdbus-1-dev libgirepository1.0-dev libglib2.0-dev
8                        bash-completion lcov valac
9   - export LANG=C.UTF-8
11 stages:
12   - build
13   - test
14   - deploy
16 variables:
17   MESON_TEST_TIMEOUT_MULTIPLIER: 2
19 build-job:
20   stage: build
21   script:
22     - meson -Db_coverage=true -Dman=true -Dgtk_doc=true --buildtype debug --werror _build .
23     - ninja -C _build all dconf-doc
24   except:
25     - tags
26   artifacts:
27     when: on_failure
28     name: "dconf-_${CI_COMMIT_REF_NAME}"
29     paths:
30       - "_build/meson-logs"
32 test:
33   stage: test
34   script:
35     - meson _build . -Db_coverage=true -Dman=true -Dgtk_doc=true
36     - ninja -C _build all dconf-doc
37     - mkdir -p _coverage
38     - lcov --rc lcov_branch_coverage=1 --directory _build --capture --initial --output-file "_coverage/${CI_JOB_NAME}-baseline.lcov"
39     - meson test -C _build --timeout-multiplier ${MESON_TEST_TIMEOUT_MULTIPLIER}
40     - lcov --rc lcov_branch_coverage=1 --directory _build --capture --output-file "_coverage/${CI_JOB_NAME}.lcov"
41   coverage: '/^\s+lines\.+:\s+([\d.]+\%)\s+/'
42   except:
43     - tags
44   artifacts:
45     when: on_failure
46     name: "dconf-_${CI_COMMIT_REF_NAME}"
47     paths:
48       - "_build/meson-logs"
49       - "_coverage"
51 # FIXME: Run gtkdoc-check when we can. See:
52 # https://github.com/mesonbuild/meson/issues/3580
54 dist-job:
55   stage: build
56   only:
57     - tags
58   script:
59     - meson --buildtype release _build .
60     - ninja -C _build dist
61   artifacts:
62     paths:
63       - "_build/meson-dist/dconf-*.tar.xz"
65 pages:
66   stage: deploy
67   only:
68     - master
69   script:
70     - meson -Db_coverage=true -Dgtk_doc=true _build .
71     - ninja -C _build all dconf-doc
72     - mkdir -p _coverage
73     - lcov --rc lcov_branch_coverage=1 --directory _build --capture --initial --output-file "_coverage/${CI_JOB_NAME}-baseline.lcov"
74     - meson test -C _build --timeout-multiplier ${MESON_TEST_TIMEOUT_MULTIPLIER}
75     - lcov --rc lcov_branch_coverage=1 --directory _build --capture --output-file "_coverage/${CI_JOB_NAME}.lcov"
76     - mkdir -p public/
77     - mv _build/docs/html/ public/docs/
78     - mv _coverage/ public/coverage/
79   artifacts:
80     paths:
81       - public