Debian Codegraph @

.gitlab-ci.yml

raw symbols SCIP
1 ---
2 include:
3 - remote: 'https://gitlab.freedesktop.org/freedesktop/ci-templates/-/raw/6a40df92957c8ce9ee741aaccc5daaaf70545b1e/templates/ci-fairy.yml'
4 - remote: 'https://gitlab.gnome.org/guidog/meta-phosh/-/raw/0ed15edd821f8afacbf7a9c0f2a6266873289115/ci/phosh-common-jobs.yml'
5
6 stages:
7 - build
8 - test
9 - style-checks
10 - package
11
12 variables:
13 FDO_UPSTREAM_REPO: devrtz/cellbroadcastd
14 EXTRA_PKGS:
15
16 workflow:
17 rules:
18 - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
19 # Don't trigger a branch pipeline if there is an open MR
20 - if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS
21 when: never
22 - if: $CI_COMMIT_TAG
23 - if: $CI_COMMIT_BRANCH
24
25 .before_script: &before_script
26 before_script:
27 - export DEBIAN_FRONTEND=noninteractive
28 - apt-get -y update
29 - apt-get -y upgrade
30 - apt-get -y build-dep .
31 - '[ -z "${EXTRA_PKGS}" ] || echo "Extra packages: ${EXTRA_PKGS}"'
32 - apt-get -y install gcovr git build-essential ${EXTRA_PKGS}
33
34 .image: &image
35 image:
36 name: debian:trixie
37
38 # Regular, full build
39 build:gcc:native-debian-trixie:full:
40 <<: *image
41 <<: *before_script
42 stage: build
43 artifacts:
44 paths:
45 - _build
46 script:
47 - meson setup -Db_coverage=true --werror _build
48 - meson compile -C _build
49
50 # Build without daemon
51 build:gcc:native-debian-trixie:no-daemon:
52 <<: *image
53 <<: *before_script
54 stage: build
55 artifacts:
56 paths:
57 - _build
58 script:
59 - meson setup -Db_coverage=true -Ddaemon=false --werror _build
60 - meson compile -C _build
61
62 test:native-debian-trixie:
63 <<: *image
64 <<: *before_script
65 stage: test
66 needs:
67 - build:gcc:native-debian-trixie:full
68 coverage: '/^\s+lines\.+:\s+([\d.]+\%)\s+/'
69 script:
70 - dbus-run-session ninja -C _build test
71 - ninja -C _build coverage || true
72
73 test:native-debian-trixie:no-daemon:
74 <<: *image
75 <<: *before_script
76 stage: test
77 needs:
78 - build:gcc:native-debian-trixie:no-daemon
79 script:
80 - dbus-run-session ninja -C _build test
81 - ${XVFB_RUN} meson test --print-errorlogs -C _build
82
83 asan-test:native-debian-trixie:
84 <<: *image
85 <<: *before_script
86 stage: test
87 needs: []
88 script:
89 - meson setup -Db_sanitize=address -Dbuildtype=debug _build-asan
90 - ${XVFB_RUN} meson test --print-errorlogs -C _build-asan --timeout-multiplier 5
91 allow_failure: true
92
93 format-check:
94 stage: style-checks
95 extends: .phosh-format-check
96 allow_failure: true
97
98 check-meson:
99 stage: style-checks
100 extends:
101 - .phosh-check-meson
102
103 check-markdown:
104 stage: style-checks
105 variables:
106 PHOSH_MARKDOWN_PATHS: "*.md"
107 extends:
108 - .phosh-check-markdown
109 rules:
110 - if: $CI_PIPELINE_SOURCE == "merge_request_event"
111 changes:
112 paths:
113 - "*.md"
114
115 check-consistency:
116 stage: style-checks
117 extends: .phosh-check-consistency
118
119 # Sanity checks of MR settings and commit logs
120 check-commit-log:
121 extends:
122 - .fdo.ci-fairy
123 stage: style-checks
124 variables:
125 GIT_DEPTH: "100"
126 needs: []
127 script: |
128 ci-fairy check-commits --signed-off-by --junit-xml=commit-message-junit-report.xml
129 artifacts:
130 reports:
131 junit: commit-message-junit-report.xml
132 rules:
133 - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH'