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
|
include:
- project: 'guidog/meta-phosh'
ref: '0ed15edd821f8afacbf7a9c0f2a6266873289115'
file: '/ci/phosh-common-jobs.yml'
- remote: 'https://gitlab.gnome.org/Infrastructure/Mirrors/lorry-mirrors/gitlab_freedesktop_org/freedesktop/ci-templates/-/raw/d03cddbcff35f26861429fc816c00323f48e99af/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: World/Phosh/phosh-mobile-settings
DEBIAN_IMAGE: $CI_REGISTRY/guidog/phosh-osk-stub/debian:v0.0.2024-10-21
COMMON_BUILD_OPTS: --werror -Db_coverage=true
.trixie_vars: &trixie_vars
variables:
DIST: trixie
BUILD_OPTS: ${COMMON_BUILD_OPTS}
.build_step: &build_step
script:
- 'echo "Build opts: ${BUILD_OPTS}"'
- meson setup ${BUILD_OPTS} . _build
- meson compile -C _build
.test_step: &test_step
script:
- dbus-run-session meson test --print-errorlogs -C _build
- ninja -C _build coverage-html
.before: &before
before_script:
- apt-get -y update
- apt-get -y build-dep .
# 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 --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'
build:native-debian-trixie:
stage: build
image: ${DEBIAN_IMAGE}
<<: *before
<<: *trixie_vars
<<: *build_step
artifacts:
paths:
- _build
test:native-debian-trixie:
stage: test
image: ${DEBIAN_IMAGE}
needs:
- build:native-debian-trixie
<<: *before
<<: *trixie_vars
<<: *test_step
coverage: '/^lines:\s+([\d.]+\%)\s+/'
artifacts:
when: always
reports:
junit: _build/meson-logs/testlog.junit.xml
except:
variables:
- $PKG_ONLY == '1'
check-po:
stage: test
extends: .phosh-check-po
except:
variables:
- $PKG_ONLY == "1"
check-consistency:
stage: test
extends: .phosh-check-consistency
format-check:
stage: style-checks
extends: .phosh-format-check
allow_failure: true
check-meson:
stage: style-checks
extends:
- .phosh-check-meson
check-markdown:
stage: style-checks
variables:
PHOSH_MARKDOWN_PATHS: "*.md"
extends: .phosh-check-markdown
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
changes:
paths:
- "*.md"
|