File: .gitlab-ci.yml

package info (click to toggle)
phosh-wallpapers 0.42.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,788 kB
  • sloc: sh: 6; makefile: 3
file content (81 lines) | stat: -rw-r--r-- 2,015 bytes parent folder | download
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
include:
 - project: 'guidog/meta-phosh'
   ref: 'ebb7aef58c96e3d586157f265e14d386ad8766fc'
   file: '/ci/phosh-common-jobs.yml'
 - remote: 'https://gitlab.freedesktop.org/freedesktop/ci-templates/-/raw/34039cd573a2df832d465bc9e4c5f543571f5241/templates/ci-fairy.yml'

stages:
 - build
 - test
 - style-checks

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

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'

variables:
  # For ci-fairy
  FDO_UPSTREAM_REPO: guidog/phosh-wallpapers
  DEBIAN_IMAGE: $CI_REGISTRY/guidog/phosh-osk-stub/debian:v0.0.2024-05-03

.prep: &prep
  before_script:
    - apt-get -y update
    - apt-get -y build-dep .

.step: &build_step
  script:
    - dpkg-buildpackage -uc -us -rfakeroot -A
    - mkdir -p out/
    - 'cp ../phosh-wallpapers_$(dpkg-parsechangelog -SVersion)_all.deb out/'

check-consistency:
  stage: test
  extends: .phosh-check-consistency

# Sanity checks of MR settings and commit logs
sanity:
  variables:
    FDO_UPSTREAM_REPO: guidog/phosh-wallpapers
  extends:
    - .fdo.ci-fairy
  stage: style-checks
  script: |
    if [ -n "$CI_OPEN_MERGE_REQUESTS" ]; then
      ci-fairy check-commits --junit-xml=commit-message-junit-report.xml cifairy/main..HEAD ;
    else
      echo "Not a merge request" ;
    fi
  artifacts:
    reports:
      junit: commit-message-junit-report.xml
  rules:
    - if: $CI_PIPELINE_SOURCE == "merge_request_event"

build:native-debian-bookworm:
  stage: build
  image: ${DEBIAN_IMAGE}
  <<: *prep
  <<: *build_step
  artifacts:
    paths:
      - out/