[tracker/wip/carlosg/ci-playground] ci: WIP




commit 7a6a21ef5d0ab81c9801efb3a947dbd995587aef
Author: Carlos Garnacho <carlosg gnome org>
Date:   Sat May 15 20:18:07 2021 +0200

    ci: WIP

 .gitlab-ci.yml | 165 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 163 insertions(+), 2 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 05259f6d6..dc89d7f0f 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,5 +1,8 @@
-# The container images used in this pipeline are built from this
-# GitLab project: https://gitlab.gnome.org/GNOME/tracker-oci-images
+include:
+  - remote: "https://gitlab.freedesktop.org/freedesktop/ci-templates/-/raw/master/templates/ci-fairy.yml";
+  - remote: 'https://gitlab.freedesktop.org/freedesktop/ci-templates/-/raw/master/templates/alpine.yml'
+  - remote: 'https://gitlab.freedesktop.org/freedesktop/ci-templates/-/raw/master/templates/fedora.yml'
+  - remote: 'https://gitlab.freedesktop.org/freedesktop/ci-templates/-/raw/master/templates/ubuntu.yml'
 
 variables:
   # These can be used to see verbose log output from the functional-tests.
@@ -10,10 +13,168 @@ variables:
   MESON_TEST_EXTRA_ARGS: ""
 
 stages:
+  - prepare
+  - build
   - test
   - analysis
   - website
 
+.tracker.fedora@common:
+  variables:
+    BASE_TAG: '2021-05-15.2'
+    FDO_UPSTREAM_REPO: GNOME/tracker
+    FDO_DISTRIBUTION_EXEC: |
+      dnf install -y 'dnf-command(builddep)' &&
+      dnf builddep -y tracker --setopt=install_weak_deps=False &&
+      dnf install -y clang gcovr git libasan libubsan python3-gobject python3-pip umockdev-devel xmlto &&
+      dnf clean all &&
+      pip3 install beautifulsoup4 mkdocs mkdocs-cinder tap.py meson
+
+.tracker.ubuntu@common:
+  variables:
+    BASE_TAG: '2021-05-15.2'
+    FDO_UPSTREAM_REPO: GNOME/tracker
+    FDO_DISTRIBUTION_EXEC: |
+      export DEBIAN_FRONTEND=noninteractive &&
+      sed -Ei 's/^# deb-src /deb-src /' /etc/apt/sources.list &&
+      apt-get -yq update && apt-get -yq upgrade &&
+      apt-get -yq build-dep tracker tracker-miners &&
+      apt-get -yq install python3-tap umockdev libumockdev-dev upower &&
+      apt-get -yq install --no-install-recommends asciidoc-base &&
+      apt-get -yq install git
+
+.tracker.alpine@common:
+  variables:
+    BASE_TAG: '2021-05-15.2'
+    FDO_UPSTREAM_REPO: GNOME/tracker
+    FDO_DISTRIBUTION_EXEC: |
+      echo 'https://alpine.global.ssl.fastly.net/alpine/edge/community/' >> /etc/apk/repositories &&
+      apk add -U alpine-sdk asciidoc bash-completion dbus-dev git glib-dev gobject-introspection-dev \
+               gtk-doc icu-dev json-glib-dev libsoup-dev libxml2-dev meson \
+               py3-gobject3 py3-setuptools py3-tappy sqlite-dev vala \
+               gdk-pixbuf-dev
+
+.tracker.fedora:34@x86_64:
+  extends: .tracker.fedora@common
+  variables:
+    FDO_DISTRIBUTION_VERSION: 34
+    FDO_DISTRIBUTION_TAG: "x86_64-${BASE_TAG}"
+
+.tracker.ubuntu:rolling@x86_64:
+  extends: .tracker.ubuntu@common
+  variables:
+    FDO_DISTRIBUTION_VERSION: rolling
+    FDO_DISTRIBUTION_TAG: "x86_64-${BASE_TAG}"
+
+.tracker.alpine:edge@x86_64:
+  extends: .tracker.alpine@common
+  variables:
+    FDO_DISTRIBUTION_VERSION: edge
+    FDO_DISTRIBUTION_TAG: "x86_64-${BASE_TAG}"
+
+build-fedora-container@x86_64:
+  extends:
+    - .fdo.container-build@fedora@x86_64
+    - .tracker.fedora:34@x86_64
+  stage: prepare
+  variables:
+    GIT_STRATEGY: none
+
+build-ubuntu-container@x86_64:
+  extends:
+    - .fdo.container-build@ubuntu@x86_64
+    - .tracker.ubuntu:rolling@x86_64
+  stage: prepare
+  variables:
+    GIT_STRATEGY: none
+
+build-alpine-container@x86_64:
+  extends:
+    - .fdo.container-build@alpine@x86_64
+    - .tracker.alpine:edge@x86_64
+  stage: prepare
+  variables:
+    GIT_STRATEGY: none
+
+.build-tracker:
+  stage: build
+  script:
+    - meson . build -Db_lto=true -Db_coverage=true -Dsystemd_user_services=false -Dtests_tap_protocol=true 
--prefix /usr
+    - ninja -C build
+  artifacts:
+    expire_in: 1 day
+    paths:
+      - build
+
+build-fedora-34@x86_64:
+  extends:
+    - .fdo.distribution-image@fedora
+    - .build-tracker
+    - .tracker.fedora:34@x86_64
+  needs:
+    - build-fedora-container@x86_64
+
+build-ubuntu-rolling@x86_64:
+  extends:
+    - .fdo.distribution-image@ubuntu
+    - .build-tracker
+    - .tracker.ubuntu:rolling@x86_64
+  needs:
+    - build-ubuntu-container@x86_64
+
+build-alpine-edge@x86_64:
+  extends:
+    - .fdo.distribution-image@alpine
+    - .build-tracker
+    - .tracker.alpine:edge@x86_64
+  needs:
+    - build-alpine-container@x86_64
+
+.test-tracker:
+  stage: test
+  variables:
+    G_SLICE: "always-malloc"
+    MALLOC_CHECK_: "3"
+  script:
+    - cd build
+    - |
+      # Remove the many "CI_" variables from the environment. Meson dumps the
+      # whole environment for every failed test, and that gives a whole
+      # screenful of junk each time unless we strip these.
+      unset $(env|grep -o '^CI_[^=]*')
+      env LANG=C.UTF-8 LC_ALL=C.UTF-8 dbus-run-session meson test --print-errorlogs ${MESON_TEST_EXTRA_ARGS}
+  artifacts:
+    expire_in: 1 day
+    when: always
+    paths:
+    - build
+    reports:
+      junit: "build/meson-logs/testlog.junit.xml"
+
+test-fedora@x86_64:
+  extends:
+    - .fdo.distribution-image@fedora
+    - .test-tracker
+    - .tracker.fedora:34@x86_64
+  needs:
+    - build-fedora-34@x86_64
+
+test-ubuntu@x86_64:
+  extends:
+    - .fdo.distribution-image@ubuntu
+    - .test-tracker
+    - .tracker.ubuntu:rolling@x86_64
+  needs:
+    - build-ubuntu-rolling@x86_64
+
+test-alpine@x86_64:
+  extends:
+    - .fdo.distribution-image@alpine
+    - .test-tracker
+    - .tracker.alpine:edge@x86_64
+  needs:
+    - build-alpine-edge@x86_64
+
 .test_template: &test
   stage: test
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]