-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
90 lines (79 loc) · 2.01 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
---
include:
- project: 'guidog/meta-phosh'
ref: 'ebb7aef58c96e3d586157f265e14d386ad8766fc'
file: '/ci/phosh-common-jobs.yml'
- remote: 'https://gitlab.freedesktop.org/freedesktop/ci-templates/-/raw/6a40df92957c8ce9ee741aaccc5daaaf70545b1e/templates/ci-fairy.yml'
stages:
- build
- test
- style-checks
default:
# Protect CI infra from rogue jobs
timeout: 15 minutes
# Allow jobs to be caneled on new commits
interruptible: true
# Retry on infra hickups automatically
retry:
max: 1
when:
- 'api_failure'
- 'runner_system_failure'
- 'scheduler_failure'
- 'stuck_or_timeout_failure'
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
variables:
# For ci-fairy
FDO_UPSTREAM_REPO: guidog/xdg-desktop-portal-phosh
DEBIAN_IMAGE: debian:trixie
COMMON_BUILD_OPTS: --werror
.trixie_vars: &trixie_vars
variables:
DIST: trixie
BUILD_OPTS: ${COMMON_BUILD_OPTS}
.build_step: &build_step
script:
- 'echo "Build opts: ${BUILD_OPTS}"'
- meson ${BUILD_OPTS} . _build
- meson compile -C _build
build:native-debian-trixie:
stage: build
image: ${DEBIAN_IMAGE}
before_script:
- apt-get -y update
- apt-get -y install eatmydata
- eatmydata apt-get -y build-dep .
<<: *trixie_vars
<<: *build_step
artifacts:
paths:
- _build
check-po:
stage: test
extends: .phosh-check-po
check-consistency:
stage: test
extends: .phosh-check-consistency
check-format:
stage: style-checks
extends: .phosh-format-check
allow_failure: true
sanity:
extends:
- .fdo.ci-fairy
stage: style-checks
needs: []
script: |
ci-fairy check-commits --signed-off-by --junit-xml=commit-message-junit-report.xml
artifacts:
reports:
junit: commit-message-junit-report.xml
rules:
- if: '$CI_MERGE_REQUEST_TARGET_BRANCH_NAME'