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




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

    ci: WIP

 .gitlab-ci.yml | 81 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
 1 file changed, 79 insertions(+), 2 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 05259f6d6..9e6634fc2 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,84 @@ variables:
   MESON_TEST_EXTRA_ARGS: ""
 
 stages:
+  - prepare
+  - build
   - test
   - analysis
   - website
 
+.tracker.fedora:34@common:
+  variables:
+    FDO_DISTRIBUTION_VERSION: 34
+    BASE_TAG: '2021-05-15.1'
+    FDO_UPSTREAM_REPO: GNOME/tracker
+    FDO_DISTRIBUTION_EXEC: |
+      dnf install -y 'dnf-command(builddep)' &&
+      dnf builddep -y tracker --setopt=install_weak_deps=False &&
+      dnf clean all
+
+.tracker.fedora:34@x86_64:
+  extends: .tracker.fedora:34@common
+  variables:
+    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-tracker:
+  extends:
+    - .fdo.distribution-image@fedora
+  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-tracker@x86_64:
+  extends:
+    - .build-tracker
+    - .tracker.fedora:34@x86_64
+  needs:
+    - build-fedora-container@x86_64
+
+.test-tracker:
+  extends:
+    - .fdo.distribution-image@fedora
+  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 eatmydata meson test --print-errorlogs 
${MESON_TEST_EXTRA_ARGS}
+  artifacts:
+    expire_in: 1 day
+    when: always
+    paths:
+    - build/meson-logs/testlog.txt
+    reports:
+      junit: "build/meson-logs/testlog.junit.xml"
+
+test-tracker@x86_64:
+  extends:
+    - .test-tracker
+    - .tracker.fedora:34@x86_64
+  needs:
+    - build-tracker@x86_64
+
 .test_template: &test
   stage: test
 


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