--- include: - remote: 'https://gitlab.freedesktop.org/freedesktop/ci-templates/-/raw/34039cd573a2df832d465bc9e4c5f543571f5241/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 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 .tags: &tags tags: - librem5:arm64 # Regular, full build build:gcc:native-debian-trixie:full: <<: *tags <<: *image <<: *before_script stage: build artifacts: paths: - _build script: - meson setup -Db_coverage=true --werror _build - meson compile -C _build except: variables: - $PKG_ONLY == "1" # Minimal build for e.g. submodule usage build:gcc:native-debian-trixie:lib: <<: *tags <<: *image <<: *before_script stage: build script: - meson setup --werror -Ddaemon=false -Dgtk_doc=false _build - meson compile -C _build except: variables: - $PKG_ONLY == "1" # Build using clang build:clang:native-debian-trixie:full: variables: EXTRA_PKGS: clang <<: *tags <<: *image <<: *before_script stage: build artifacts: paths: - _build script: - CC=clang meson setup --werror _build - meson compile -C _build except: variables: - $PKG_ONLY == "1" allow_failure: true test:native-debian-trixie: <<: *tags <<: *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 coverage except: variables: - $PKG_ONLY == "1" check-consistency: <<: *tags stage: test extends: .phosh-check-consistency format-check: <<: *tags stage: style-checks extends: .phosh-format-check allow_failure: true check-meson: <<: *tags stage: style-checks extends: - .phosh-check-meson package:deb-debian-trixie:arm64: tags: - librem5:arm64 stage: package variables: PHOSH_DOCKER_IMAGE: debian:trixie extends: .phosh-build-debian-package