[tracker-miners/wip/carlosg/ci-updates: 5/7] ci: Update to using ci-fairy for building images




commit 764a222d8e086958713c631407a2ca63d89982e8
Author: Carlos Garnacho <carlosg gnome org>
Date:   Wed Aug 4 15:26:15 2021 +0200

    ci: Update to using ci-fairy for building images

 .gitlab-ci.yml | 193 +++++++++++++++++++++++++++++++++++++++++++++++++++++----
 1 file changed, 181 insertions(+), 12 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 1710944e4..a2a4e3dd6 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,7 +1,10 @@
-# 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/3d03cccd770c04e63b40325b42223495274d6a1d/templates/ci-fairy.yml";
+  - remote: 
'https://gitlab.freedesktop.org/freedesktop/ci-templates/-/raw/3d03cccd770c04e63b40325b42223495274d6a1d/templates/fedora.yml'
+  - remote: 
'https://gitlab.freedesktop.org/freedesktop/ci-templates/-/raw/3d03cccd770c04e63b40325b42223495274d6a1d/templates/ubuntu.yml'
 
 variables:
+  MESON_TEST_TIMEOUT_MULTIPLIER: 3
   # These can be used to see verbose log output from the functional-tests.
   # See HACKING.md for more information.
   G_MESSAGES_DEBUG: ""
@@ -13,12 +16,105 @@ variables:
   TRACKER_TESTS_AWAIT_TIMEOUT: 60
 
 stages:
+  - prepare
+  - build
   - test
   - analysis
 
-.test_template: &test
-  stage: test
+.tracker-miners.fedora@common:
+  variables:
+    BASE_TAG: '2021-08-04.1'
+    FDO_UPSTREAM_REPO: GNOME/tracker
+    FDO_DISTRIBUTION_PACKAGES: 'clang clang-analyzer gcovr git libasan libubsan python3-gobject python3-pip 
umockdev-devel xmlto uncrustify patch diffutils gstreamer1-plugins-good redhat-rpm-config'
+    FDO_DISTRIBUTION_EXEC: |
+      dnf install -y 'dnf-command(builddep)' &&
+      dnf builddep -y tracker tracker-miners --setopt=install_weak_deps=False &&
+      dnf clean all &&
+      pip3 install beautifulsoup4 mkdocs mkdocs-cinder tap.py meson &&
+      dnf install -y https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E 
%fedora).noarch.rpm https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E 
%fedora).noarch.rpm &&
+      dnf install -y --setopt=install_weak_deps=False gstreamer1-libav &&
+      curl --get 'https://www.flamingspork.com/projects/libeatmydata/libeatmydata-105.tar.gz' --output 
libeatmydata-105.tar.gz &&
+      tar -x -f ./libeatmydata-105.tar.gz &&
+      cd libeatmydata-105 &&
+      ./configure --prefix=/usr &&
+      make install &&
+      sed -e '/dpkg-architecture/ d' -i /usr/bin/eatmydata &&
+      sed -e 's@shlib="/usr/lib/$DEB_BUILD_MULTIARCH/eatmydata.sh@shlib="/usr/libexec/eatmydata.sh@' -i 
/usr/bin/eatmydata &&
+      cd .. &&
+      rm ./libeatmydata-105.tar.gz &&
+      rm -Rf ./libeatmydata-105
+
+.tracker-miners.ubuntu@common:
+  variables:
+    BASE_TAG: '2021-08-04.0'
+    FDO_UPSTREAM_REPO: GNOME/tracker
+    FDO_DISTRIBUTION_PACKAGES: 'python3-tap umockdev libumockdev-dev upower asciidoc-base git libgrss-dev 
eatmydata'
+    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
+
+.tracker-miners.fedora:34@x86_64:
+  extends: .tracker-miners.fedora@common
+  variables:
+    FDO_DISTRIBUTION_VERSION: 34
+    FDO_DISTRIBUTION_TAG: "x86_64-${BASE_TAG}"
+
+.tracker-miners.fedora:rawhide@x86_64:
+  extends: .tracker-miners.fedora@common
+  variables:
+    FDO_DISTRIBUTION_VERSION: rawhide
+    FDO_DISTRIBUTION_TAG: "x86_64-${BASE_TAG}"
+
+.tracker-miners.fedora:34@aarch64:
+  extends: .tracker-miners.fedora@common
+  variables:
+    FDO_DISTRIBUTION_VERSION: 34
+    FDO_DISTRIBUTION_TAG: "aarch64-${BASE_TAG}"
+  tags:
+    - aarch64
+
+.tracker-miners.ubuntu:rolling@x86_64:
+  extends: .tracker-miners.ubuntu@common
+  variables:
+    FDO_DISTRIBUTION_VERSION: rolling
+    FDO_DISTRIBUTION_TAG: "x86_64-${BASE_TAG}"
+
+build-fedora-container@x86_64:
+  extends:
+    - .fdo.container-build@fedora
+    - .tracker-miners.fedora:34@x86_64
+  stage: prepare
+  variables:
+    GIT_STRATEGY: none
 
+build-fedora-rawhide-container@x86_64:
+  extends:
+    - .fdo.container-build@fedora
+    - .tracker-miners.fedora:rawhide@x86_64
+  stage: prepare
+  variables:
+    GIT_STRATEGY: none
+
+build-fedora-container@aarch64:
+  extends:
+    - .fdo.container-build@fedora
+    - .tracker-miners.fedora:34@aarch64
+  stage: prepare
+  variables:
+    GIT_STRATEGY: none
+
+build-ubuntu-container@x86_64:
+  extends:
+    - .fdo.container-build@ubuntu
+    - .tracker-miners.ubuntu:rolling@x86_64
+  stage: prepare
+  variables:
+    GIT_STRATEGY: none
+
+.build-template: &build
+  stage: build
   script:
     # We can build and test tracker-miners against tracker just by building
     # tracker as a submodule.
@@ -28,6 +124,51 @@ stages:
     - cd build
     - meson .. --prefix=/usr -Dtracker_core=subproject -Db_lto=true -Db_coverage=true 
-Dtests_tap_protocol=true
     - ninja
+  artifacts:
+    expire_in: 1 day
+    paths:
+      - build
+
+build-fedora@x86_64:
+  extends:
+    - .fdo.distribution-image@fedora
+    - .tracker-miners.fedora:34@x86_64
+  needs:
+    - build-fedora-container@x86_64
+  <<: *build
+
+build-fedora-rawhide@x86_64:
+  extends:
+    - .fdo.distribution-image@fedora
+    - .tracker-miners.fedora:rawhide@x86_64
+  needs:
+    - build-fedora-rawhide-container@x86_64
+  <<: *build
+
+build-fedora@aarch64:
+  extends:
+    - .fdo.distribution-image@fedora
+    - .tracker-miners.fedora:34@aarch64
+  needs:
+    - build-fedora-container@aarch64
+  allow_failure: true
+  <<: *build
+
+build-ubuntu-rolling@x86_64:
+  extends:
+    - .fdo.distribution-image@ubuntu
+    - .tracker-miners.ubuntu:rolling@x86_64
+  needs:
+    - build-ubuntu-container@x86_64
+  <<: *build
+
+.test_template: &test
+  stage: test
+
+  script:
+    - .gitlab-ci/checkout-tracker.sh
+    - cd build
+    - ninja
     - |
       # Remove the many "CI_" variables from the environment. Meson dumps the
       # whole environment for every failed test, and that gives a whole
@@ -51,27 +192,51 @@ stages:
       echo "These values can be set at https://gitlab.gnome.org/GNOME/tracker/pipelines/new";
 
   artifacts:
+    expire_in: 1 day
     when: always
     paths:
     - build/meson-logs/*.txt
     reports:
       junit: "build/meson-logs/testlog.junit.xml"
 
-test-fedora-latest:
-  image: registry.gitlab.gnome.org/gnome/tracker-oci-images/amd64/fedora:latest
+test-fedora@x86_64:
+  extends:
+    - .fdo.distribution-image@fedora
+    - .tracker-miners.fedora:34@x86_64
+  needs:
+    - build-fedora@x86_64
   <<: *test
 
-test-fedora-rawhide:
-  image: registry.gitlab.gnome.org/gnome/tracker-oci-images/amd64/fedora:rawhide
+test-fedora-rawhide@x86_64:
+  extends:
+    - .fdo.distribution-image@fedora
+    - .tracker-miners.fedora:rawhide@x86_64
+  needs:
+    - build-fedora-rawhide@x86_64
+  <<: *test
+
+test-fedora@aarch64:
+  extends:
+    - .fdo.distribution-image@fedora
+    - .tracker-miners.fedora:34@aarch64
+  needs:
+    - build-fedora@aarch64
+  allow_failure: true
   <<: *test
 
-test-ubuntu-rolling:
-  image: registry.gitlab.gnome.org/gnome/tracker-oci-images/amd64/ubuntu:rolling
+test-ubuntu@x86_64:
+  extends:
+    - .fdo.distribution-image@ubuntu
+    - .tracker-miners.ubuntu:rolling@x86_64
+  needs:
+    - build-ubuntu-rolling@x86_64
   <<: *test
 
 coverage-analysis:
+  extends:
+    - .fdo.distribution-image@fedora
+    - .tracker-miners.fedora:rawhide@x86_64
   stage: analysis
-  image: registry.gitlab.gnome.org/gnome/tracker-oci-images/amd64/fedora:latest
   allow_failure: true
   script:
     - .gitlab-ci/checkout-tracker.sh
@@ -86,10 +251,14 @@ coverage-analysis:
     when: always
     paths:
     - coverage-build/coveragereport
+  needs:
+    - test-fedora@x86_64
 
 coverity:
+  extends:
+    - .fdo.distribution-image@fedora
+    - .tracker-miners.fedora:rawhide@x86_64
   stage: analysis
-  image: registry.gitlab.gnome.org/gnome/tracker-oci-images/amd64/fedora:latest
   allow_failure: true
   script:
     # Build tracker, we must go out the subproject route as we don't want


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