[gtranslator/new-gitlab-ci] CI: Update gitlabci with new templates



commit 1a2c57312406ba09baded6925f34248178cd19bf
Author: Daniel GarcĂ­a Moreno <dani danigm net>
Date:   Tue Oct 8 08:23:52 2019 +0200

    CI: Update gitlabci with new templates

 .gitlab-ci.yml                                  | 73 +++++++------------------
 build-aux/flatpak/gspell-gettext-fix.patch      | 48 ++++++++++++++++
 build-aux/flatpak/gspell-no-code-coverage.patch | 64 ++++++++++++++++++++++
 build-aux/flatpak/org.gnome.Gtranslator.json    | 38 ++++++++-----
 4 files changed, 157 insertions(+), 66 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index dd97fbb4..f9a822e0 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,67 +1,34 @@
----
+include: 'https://gitlab.gnome.org/GNOME/citemplates/raw/master/flatpak/flatpak_ci_initiative.yml'
+
 stages:
   - test
   - review
+  - deploy
 
 variables:
-  BUNDLE: "org.gnome.Gtranslator.flatpak"
-  MANIFEST_PATH: "build-aux/flatpak/org.gnome.Gtranslator.json"
-  FLATPAK_MODULE: "gtranslator"
-  DBUS_ID: "org.gnome.GtranslatorDevel"
-
-.flatpak_cache_template: &flatpak_cache
-  cache:
-    key: "flatpak"
-    paths:
-      - .flatpak-builder/cache/
+  BUNDLE: "org.gnome.GtranslatorDevel.flatpak"
 
 flatpak:
-  image: "registry.gitlab.gnome.org/gnome/gnome-runtime-images/gnome:3.32"
-  stage: "test"
-  script:
-    - flatpak-builder --stop-at=${FLATPAK_MODULE} --force-clean app ${MANIFEST_PATH}
-
-    # Build the flatpak repo
-    - flatpak-builder --run app ${MANIFEST_PATH} meson --prefix=/app _build
-    - flatpak-builder --run app ${MANIFEST_PATH} ninja -C _build install
+  extends: .flatpak
+  variables:
+    GIT_SUBMODULE_STRATEGY: normal
 
-    # Create a flatpak bundle
-    - flatpak-builder --finish-only app ${MANIFEST_PATH}
-    - flatpak build-export repo app
-    - flatpak build-bundle repo ${BUNDLE} ${DBUS_ID}
-
-  artifacts:
-    paths:
-      - "${BUNDLE}"
-    expire_in: 30 days
-  <<: *flatpak_cache
+    # Replace with your manifest path
+    MANIFEST_PATH: "build-aux/flatpak/org.gnome.Gtranslator.json"
+    RUNTIME_REPO: "https://nightly.gnome.org/gnome-nightly.flatpakrepo";
+    # Replace with your application name, as written in the manifest
+    FLATPAK_MODULE: "gtranslator"
+    APP_ID: "org.gnome.GtranslatorDevel"
 
 review:
-  stage: review
+  extends: .review
   dependencies:
     - flatpak
-  script:
-    - echo "Generating flatpak deployment"
-  artifacts:
-    paths:
-      - ${BUNDLE}
-    expire_in: 30 days
-  environment:
-    name: review/$CI_COMMIT_REF_NAME
-    url: https://gitlab.gnome.org/$CI_PROJECT_PATH/-/jobs/$CI_JOB_ID/artifacts/raw/${BUNDLE}
-    on_stop: stop_review
-  except:
-    - master@GNOME/gtranslator
-    - tags
 
 stop_review:
-  stage: review
-  script:
-    - echo "Stopping flatpak deployment"
-  when: manual
-  environment:
-    name: review/$CI_COMMIT_REF_NAME
-    action: stop
-  except:
-    - master@GNOME/gtranslator
-    - tags
+  extends: .stop_review
+
+nightly:
+  extends: '.publish_nightly'
+  dependencies:
+    - 'flatpak'
diff --git a/build-aux/flatpak/gspell-gettext-fix.patch b/build-aux/flatpak/gspell-gettext-fix.patch
new file mode 100644
index 00000000..780fe02f
--- /dev/null
+++ b/build-aux/flatpak/gspell-gettext-fix.patch
@@ -0,0 +1,48 @@
+From 8bd7cac01d8cd27a25b48858843cb21e91f3952e Mon Sep 17 00:00:00 2001
+From: Ting-Wei Lan <lantw src gnome org>
+Date: Wed, 24 Jul 2019 16:38:39 +0800
+Subject: [PATCH] =?UTF-8?q?build:=20Allow=20building=20with=20gettext=20?=
+ =?UTF-8?q?=E2=89=A5=200.20?=
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The use of AM_GNU_GETTEXT_VERSION in configure.ac instructs autopoint to
+copy po/Makefile.in.in from the exact gettext version. It is fine if the
+version of gettext installed on the system has the same minor version
+number with the requested version, but it fails if you have a newer
+version of gettext because of the mismatch between autoconf macros and
+Makefile.in.in.
+
+  *** error: gettext infrastructure mismatch: using a Makefile.in.in
+  from gettext version 0.19 but the autoconf macros are from gettext
+  version 0.20
+
+Instead of specifying the exact version with AM_GNU_GETTEXT_VERSION, we
+can use AM_GNU_GETTEXT_REQUIRE_VERSION to ask autopoint to simply use
+the gettext version installed on the system to prevent the mismatch.
+
+This also bumps the version requirement on gettext to 0.19.6 because
+AM_GNU_GETTEXT_REQUIRE_VERSION was added in this version.
+---
+ configure.ac | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 9135987..189ba95 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -121,7 +121,9 @@ fi
+ 
+ # i18n
+ AM_GNU_GETTEXT([external])
+-AM_GNU_GETTEXT_VERSION([0.19.4])
++# FIXME: Remove AM_GNU_GETTEXT_VERSION once autoreconf supports REQUIRE_VERSION
++AM_GNU_GETTEXT_VERSION([0.19.6])
++AM_GNU_GETTEXT_REQUIRE_VERSION([0.19.6])
+ AC_SUBST([GETTEXT_PACKAGE], [gspell-$GSPELL_API_VERSION])
+ AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], ["$GETTEXT_PACKAGE"], [Define to the gettext package name.])
+ 
+-- 
+2.21.0
+
diff --git a/build-aux/flatpak/gspell-no-code-coverage.patch b/build-aux/flatpak/gspell-no-code-coverage.patch
new file mode 100644
index 00000000..515b58d0
--- /dev/null
+++ b/build-aux/flatpak/gspell-no-code-coverage.patch
@@ -0,0 +1,64 @@
+From a70d50a7781f1a4528e99625c6fe907833dc70cf Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner gnome org>
+Date: Thu, 1 Aug 2019 00:00:44 +0200
+Subject: [PATCH] build: Disable code coverage
+
+---
+ Makefile.am           | 2 --
+ configure.ac          | 4 ----
+ gspell/Makefile.am    | 2 --
+ testsuite/Makefile.am | 2 --
+ 4 files changed, 10 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index f732667..3ccf942 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -1,7 +1,5 @@
+ SUBDIRS = po gspell gspell-app tests testsuite docs
+ 
+-@CODE_COVERAGE_RULES@
+-
+ AM_DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --enable-introspection --enable-vala
+ 
+ pkgconfig_DATA = gspell-$(GSPELL_API_VERSION).pc
+diff --git a/configure.ac b/configure.ac
+index 9135987..22d4198 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -145,10 +145,6 @@ GOBJECT_INTROSPECTION_CHECK([1.42.0])
+ AX_REQUIRE_DEFINED([VAPIGEN_CHECK])
+ VAPIGEN_CHECK
+ 
+-# Code coverage for unit tests
+-AX_REQUIRE_DEFINED([AX_CODE_COVERAGE])
+-AX_CODE_COVERAGE
+-
+ # Valgrind check
+ AX_REQUIRE_DEFINED([AX_VALGRIND_CHECK])
+ AX_VALGRIND_CHECK
+diff --git a/gspell/Makefile.am b/gspell/Makefile.am
+index 88f6577..973c683 100644
+--- a/gspell/Makefile.am
++++ b/gspell/Makefile.am
+@@ -1,7 +1,5 @@
+ SUBDIRS = resources
+ 
+-@CODE_COVERAGE_RULES@
+-
+ AM_CPPFLAGS =                         \
+       -DDATADIR=\""$(datadir)"\"      \
+       -DG_LOG_DOMAIN=\"gspell\"       \
+diff --git a/testsuite/Makefile.am b/testsuite/Makefile.am
+index 4384baf..e628834 100644
+--- a/testsuite/Makefile.am
++++ b/testsuite/Makefile.am
+@@ -1,5 +1,3 @@
+-@CODE_COVERAGE_RULES@
+-
+ @VALGRIND_CHECK_RULES@
+ 
+ # https://github.com/dtrebbien/GNOME.supp
+-- 
+2.21.0
+
diff --git a/build-aux/flatpak/org.gnome.Gtranslator.json b/build-aux/flatpak/org.gnome.Gtranslator.json
index 65a69f5e..2197323a 100644
--- a/build-aux/flatpak/org.gnome.Gtranslator.json
+++ b/build-aux/flatpak/org.gnome.Gtranslator.json
@@ -55,7 +55,17 @@
             "sources" : [
                 {
                     "type" : "git",
-                    "url" : "https://gitlab.gnome.org/GNOME/gspell.git";
+                    "url" : "https://gitlab.gnome.org/GNOME/gspell.git";,
+                    "tag": "1.8.1",
+                    "commit": "ba03499234037861e01ce1e83075e8a32b9790f3"
+                },
+                {
+                    "type": "patch",
+                    "path": "gspell-no-code-coverage.patch"
+                },
+                {
+                    "type": "patch",
+                    "path": "gspell-gettext-fix.patch"
                 }
             ]
         },
@@ -69,22 +79,11 @@
                 }
             ]
         },
-
-        /** this is needed by libgda **/
-        {
-            "name": "intltool",
-            "sources": {
-                "type": "archive",
-                "url": "https://launchpad.net/intltool/trunk/0.51.0/+download/intltool-0.51.0.tar.gz";,
-                "md5": "12e517cac2b57a0121cda351570f1e63"
-            }
-        },
         {
             "name": "libgda",
             "config-opts": [
                 "--enable-json=yes",
-                "--enable-system-sqlite=yes",
-                "--disable-gi-system-install"
+                "--enable-system-sqlite=yes"
             ],
             "sources": [
                 {
@@ -93,6 +92,19 @@
                     "sha256": "59caed8ca72b1ac6437c9844f0677f8a296d52cfd1c0049116026abfb1d87d9b"
                 }
             ],
+            "modules": [
+                {
+                  "name": "intltool",
+                  "cleanup": [ "*" ],
+                  "sources": [
+                    {
+                      "type": "archive",
+                      "url": "https://launchpad.net/intltool/trunk/0.51.0/+download/intltool-0.51.0.tar.gz";,
+                      "sha256": "67c74d94196b153b774ab9f89b2fa6c6ba79352407037c8c14d5aeb334e959cd"
+                    }
+                  ]
+                }
+            ],
             "cleanup": [
                 "/include",
                 "/lib/*.a",


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