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 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165
|
include:
- project: 'guidog/meta-phosh'
ref: 'a9fef9ad314e8b387fb9b293b9f064527ac0c023'
file: '/ci/phosh-common-jobs.yml'
- project: 'Infrastructure/Mirrors/lorry-mirrors/gitlab_freedesktop_org/freedesktop/ci-templates'
ref: 'b791bd48996e3ced9ca13f1c5ee82be8540b8adb'
file: '/templates/ci-fairy.yml'
stages:
- build
- tests
- style-checks
- package
- deploy
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: World/Phosh/gmobile
DEPS: >-
ccache build-essential git gcovr
DEBIAN_IMAGE: debian:trixie
.before: &before
- echo "man-db man-db/auto-update boolean false" | debconf-set-selections
- export DEBIAN_FRONTEND=noninteractive
- apt-get -y update
- apt-get -y install eatmydata
- eatmydata apt-get -y install $DEPS
- eatmydata apt-get -y build-dep .
.build: &build_steps
echo "BUILD_OPTS=${BUILD_OPTS}" &&
export LC_ALL=C.UTF-8 &&
meson ${BUILD_OPTS} . _build &&
ninja -C _build
build-debian-gcc:
stage: build
image: $DEBIAN_IMAGE
variables:
BUILD_OPTS: -Db_coverage=true --werror
before_script:
- *before
script:
- *build_steps
artifacts:
when: always
paths:
- _build
# TODO: move to prebuilt container
doc:
stage: build
image: $DEBIAN_IMAGE
variables:
BUILD_OPTS: >-
-Dtests=false
-Dgtk_doc=true
before_script:
- *before
script:
- meson ${BUILD_OPTS} _build
- ninja -C _build
- mv _build/doc/gmobile-0 _doc/
artifacts:
paths:
- _doc/
tests:
stage: tests
image: $DEBIAN_IMAGE
needs: ['build-debian-gcc']
before_script:
- *before
script:
- meson ${BUILD_OPTS} _build
- meson test -C _build
- ninja -C _build coverage
coverage: '/^lines:\s+([\d.]+\%)\s+/'
artifacts:
reports:
junit: _build/meson-logs/testlog.junit.xml
# Sanity checks of MR settings and commit logs
sanity:
extends:
- .fdo.ci-fairy
stage: style-checks
variables:
GIT_DEPTH: "100"
needs: []
script: |
ci-fairy check-commits --junit-xml=commit-message-junit-report.xml
artifacts:
reports:
junit: commit-message-junit-report.xml
rules:
- if: '$CI_MERGE_REQUEST_TARGET_BRANCH_NAME'
format-check:
stage: style-checks
extends: .phosh-format-check
allow_failure: true
check-meson:
stage: style-checks
extends:
- .phosh-check-meson
package-deb-debian-trixie:arm64:
stage: package
variables:
PHOSH_DOCKER_IMAGE: debian:trixie
extends: .phosh-build-debian-package
tags:
- aarch64
render-display-info:
stage: tests
image: $DEBIAN_IMAGE
needs: ['build-debian-gcc']
before_script:
- *before
script:
- tools/render-all
artifacts:
expose_as: 'Display panel html'
paths:
- _build/out/
pages:
stage: deploy
image: $DEBIAN_IMAGE
before_script: []
needs: ['doc']
script:
- mv _doc/ public/
artifacts:
paths:
- public
only:
- main
|