-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
111 lines (100 loc) · 2.45 KB
/
.gitlab-ci.yml
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
include:
- remote: 'https://gitlab.freedesktop.org/freedesktop/ci-templates/-/raw/34039cd573a2df832d465bc9e4c5f543571f5241/templates/ci-fairy.yml'
- remote: 'https://gitlab.gnome.org/guidog/meta-phosh/-/raw/f3c92e90dcc0d65322888217429b75dd101bd0d3/ci/phosh-common-jobs.yml'
stages:
- build
- test
- style-checks
- package
workflow:
rules:
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
# Don't trigger a branch pipeline if there is an open MR
- if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS
when: never
- if: $CI_COMMIT_TAG
- if: $CI_COMMIT_BRANCH
.before_script: &before_script
before_script:
- export DEBIAN_FRONTEND=noninteractive
- apt-get -y update
- apt-get -y upgrade
- apt-get -y build-dep .
- '[ -z "${EXTRA_PKGS}" ] || echo "Extra packages: ${EXTRA_PKGS}"'
- apt-get -y install gcovr git build-essential ${EXTRA_PKGS}
.image: &image
image:
name: debian:trixie
.tags: &tags
tags:
- librem5:arm64
# Regular, full build
build:gcc:native-debian-trixie:full:
<<: *tags
<<: *image
<<: *before_script
stage: build
artifacts:
paths:
- _build
script:
- meson setup -Db_coverage=true --werror _build
- meson compile -C _build
except:
variables:
- $PKG_ONLY == "1"
# Minimal build for e.g. submodule usage
build:gcc:native-debian-trixie:lib:
<<: *tags
<<: *image
<<: *before_script
stage: build
script:
- meson setup --werror -Ddaemon=false -Dgtk_doc=false _build
- meson compile -C _build
except:
variables:
- $PKG_ONLY == "1"
# Build using clang
build:clang:native-debian-trixie:full:
variables:
EXTRA_PKGS: clang
<<: *tags
<<: *image
<<: *before_script
stage: build
artifacts:
paths:
- _build
script:
- CC=clang meson setup --werror _build
- meson compile -C _build
except:
variables:
- $PKG_ONLY == "1"
allow_failure: true
test:native-debian-trixie:
<<: *tags
<<: *image
<<: *before_script
stage: test
needs:
- build:gcc:native-debian-trixie:full
coverage: '/^\s+lines\.+:\s+([\d.]+\%)\s+/'
script:
- dbus-run-session ninja -C _build test coverage
except:
variables:
- $PKG_ONLY == "1"
format-check:
<<: *tags
stage: style-checks
extends: .phosh-format-check
allow_failure: true
package:deb-debian-trixie:arm64:
tags:
- librem5:arm64
stage: package
variables:
PHOSH_DOCKER_IMAGE: debian:trixie
extends: .phosh-build-debian-package