--- include: - remote: 'https://gitlab.freedesktop.org/freedesktop/ci-templates/-/raw/6a40df92957c8ce9ee741aaccc5daaaf70545b1e/templates/ci-fairy.yml' - remote: 'https://gitlab.gnome.org/guidog/meta-phosh/-/raw/0ed15edd821f8afacbf7a9c0f2a6266873289115/ci/phosh-common-jobs.yml' stages: - build - test - style-checks - package variables: FDO_UPSTREAM_REPO: devrtz/cellbroadcastd EXTRA_PKGS: 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 # Regular, full build build:gcc:native-debian-trixie:full: <<: *image <<: *before_script stage: build artifacts: paths: - _build script: - meson setup -Db_coverage=true --werror _build - meson compile -C _build # Build without daemon build:gcc:native-debian-trixie:no-daemon: <<: *image <<: *before_script stage: build artifacts: paths: - _build script: - meson setup -Db_coverage=true -Ddaemon=false --werror _build - meson compile -C _build test:native-debian-trixie: <<: *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 - ninja -C _build coverage || true test:native-debian-trixie:no-daemon: <<: *image <<: *before_script stage: test needs: - build:gcc:native-debian-trixie:no-daemon script: - dbus-run-session ninja -C _build test - ${XVFB_RUN} meson test --print-errorlogs -C _build asan-test:native-debian-trixie: <<: *image <<: *before_script stage: test needs: [] script: - meson setup -Db_sanitize=address -Dbuildtype=debug _build-asan - ${XVFB_RUN} meson test --print-errorlogs -C _build-asan --timeout-multiplier 5 allow_failure: true 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" check-consistency: stage: style-checks extends: .phosh-check-consistency # Sanity checks of MR settings and commit logs check-commit-log: 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_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH'