fontconfig: Branch 'main' - 4 commits

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Apr 30 07:24:27 UTC 2025


 .gitlab-ci.yml                          |   48 ++++++++++++++++++++++++++++++--
 .gitlab-ci/build.sh                     |    9 ++++--
 .gitlab-ci/ci.template                  |   22 ++++++++++++++
 .gitlab-ci/config.yml                   |    6 +++-
 .gitlab-ci/test-meson-install-shared.sh |   23 +++++++++++++++
 .gitlab-ci/test-meson-install-static.sh |   23 +++++++++++++++
 6 files changed, 126 insertions(+), 5 deletions(-)

New commits:
commit f25be57f7a08d8ac40ca8059d05bf36ae14f34f5
Merge: 3902e22 38ba898
Author: Akira TAGOH <akira at tagoh.org>
Date:   Wed Apr 30 07:24:23 2025 +0000

    Merge branch 'ci-build-script' into 'main'
    
    ci: few updates in build script
    
    See merge request fontconfig/fontconfig!397

commit 38ba8986224571aadd98bd8d73a048fe83102593
Author: Akira TAGOH <akira at tagoh.org>
Date:   Tue Apr 29 00:51:46 2025 +0900

    ci: add installation test

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 1f47d14..15a1f6c 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -43,8 +43,8 @@ variables:
 # changing these will force rebuilding the associated image
 # Note: these tags have no meaning and are not tied to a particular
 # fontconfig version
-  FEDORA_TAG:    '2025-04-23.1-7916b3c469ca'
-  FREEBSD_TAG:   '2025-04-23.1-58fbfb327c45'
+  FEDORA_TAG:    '2025-04-30.1-f55ea04ce447'
+  FREEBSD_TAG:   '2025-04-30.1-2e18059bfc52'
 
   FEDORA_EXEC:   'bash .gitlab-ci/fedora-install.sh'
   FREEBSD_EXEC:  'bash .gitlab-ci/freebsd-install.sh'
@@ -318,6 +318,7 @@ freebsd:14.1 at container-clean:
       - build*/fontconfig*/_build
       - build*/meson-logs/*
       - build*/meson-dist/*
+      - prefix*
 
 .upload:
   rules:
@@ -480,6 +481,19 @@ build-meson static fontations:
 #                                     #
 #######################################
 
+.test_hook at template:
+  script:
+    - export PREFIX="$(echo $(pwd)/prefix-*)"
+    - |
+      if [ -n "$FC_TEST_EXEC" -a -f ".gitlab-ci/test-${FC_TEST_EXEC}.sh" ]; then
+        sh ".gitlab-ci/test-${FC_TEST_EXEC}.sh"
+      else
+        echo "*** No test script found"
+        exit 1
+      fi
+  variables:
+    FC_TEST_EXEC: ""
+
 clang-format:
   stage: test
   extends:
@@ -507,6 +521,7 @@ subproject-build shared:
     FC_DISTRO_NAME: fedora
     FDO_DISTRIBUTION_VERSION: rawhide
     FDO_DISTRIBUTION_TAG: $FEDORA_TAG
+    FC_TEST_EXEC: subproject-build shared
     FC_BUILDSYS: meson
     FC_BUILD_TYPE: shared
     FC_BUILD_SUBPROJECT: 1
@@ -522,11 +537,40 @@ subproject-build static:
     FC_DISTRO_NAME: fedora
     FDO_DISTRIBUTION_VERSION: rawhide
     FDO_DISTRIBUTION_TAG: $FEDORA_TAG
+    FC_TEST_EXEC: subproject-build static
     FC_BUILDSYS: meson
     FC_BUILD_TYPE: static
     FC_BUILD_SUBPROJECT: 1
   needs:
     - fedora:rawhide at container-prep
+meson-install-shared:
+  stage: test
+  extends:
+    - .test_hook at template
+    - .fdo.distribution-image at fedora
+    - .fc_artifacts
+  variables:
+    FC_DISTRO_NAME: fedora
+    FDO_DISTRIBUTION_VERSION: rawhide
+    FDO_DISTRIBUTION_TAG: $FEDORA_TAG
+    FC_TEST_EXEC: meson-install-shared
+  needs:
+    - fedora:rawhide at container-prep
+    - build-meson shared libxml2
+meson-install-static:
+  stage: test
+  extends:
+    - .test_hook at template
+    - .fdo.distribution-image at fedora
+    - .fc_artifacts
+  variables:
+    FC_DISTRO_NAME: fedora
+    FDO_DISTRIBUTION_VERSION: rawhide
+    FDO_DISTRIBUTION_TAG: $FEDORA_TAG
+    FC_TEST_EXEC: meson-install-static
+  needs:
+    - fedora:rawhide at container-prep
+    - build-meson static libxml2
 
 #######################################
 #                                     #
diff --git a/.gitlab-ci/ci.template b/.gitlab-ci/ci.template
index 8fd8052..34240c2 100644
--- a/.gitlab-ci/ci.template
+++ b/.gitlab-ci/ci.template
@@ -281,6 +281,7 @@ check-ci-script:
       - build*/fontconfig*/_build
       - build*/meson-logs/*
       - build*/meson-dist/*
+      - prefix*
 
 .upload:
   rules:
@@ -330,6 +331,19 @@ build-{{build.name}}:
 #                                     #
 #######################################
 
+.test_hook at template:
+  script:
+    - export PREFIX="$(echo $(pwd)/prefix-*)"
+    - |
+      if [ -n "$FC_TEST_EXEC" -a -f ".gitlab-ci/test-${FC_TEST_EXEC}.sh" ]; then
+        sh ".gitlab-ci/test-${FC_TEST_EXEC}.sh"
+      else
+        echo "*** No test script found"
+        exit 1
+      fi
+  variables:
+    FC_TEST_EXEC: ""
+
 clang-format:
   stage: test
   extends:
@@ -351,13 +365,18 @@ clang-format:
 {{test.name}}:
   stage: test
   extends:
+    {% if 'parent' in test %}
+    - .test_hook at template
+    {% else %}
     - .build at template
+    {% endif %}
     - .fdo.distribution-image at fedora
     - .fc_artifacts
   variables:
     FC_DISTRO_NAME: fedora
     FDO_DISTRIBUTION_VERSION: rawhide
     FDO_DISTRIBUTION_TAG: $FEDORA_TAG
+    FC_TEST_EXEC: {{test.name}}
     {# Where we have extra_variables defined, add them to the list #}
     {% if test.variables is defined %}
     {% for key, value in test.variables.items() %}
@@ -366,6 +385,9 @@ clang-format:
     {% endif %}
   needs:
     - fedora:rawhide at container-prep
+    {% if 'parent' in test %}
+    - build-{{test.parent}}
+    {% endif %}
 {% endfor %}
 
 #######################################
diff --git a/.gitlab-ci/config.yml b/.gitlab-ci/config.yml
index 3d82cd9..15f37bc 100644
--- a/.gitlab-ci/config.yml
+++ b/.gitlab-ci/config.yml
@@ -1,4 +1,4 @@
-.default_tag: &default_tag "2025-04-23.1"
+.default_tag: &default_tag "2025-04-30.1"
 
 build_patterns:
   - name: "autotools shared expat"
@@ -59,6 +59,10 @@ test_patterns:
       FC_BUILDSYS: meson
       FC_BUILD_TYPE: static
       FC_BUILD_SUBPROJECT: 1
+  - name: "meson-install-shared"
+    parent: "meson shared libxml2"
+  - name: "meson-install-static"
+    parent: "meson static libxml2"
 
 distributions:
   - name: fedora
diff --git a/.gitlab-ci/test-meson-install-shared.sh b/.gitlab-ci/test-meson-install-shared.sh
new file mode 100644
index 0000000..c42bd19
--- /dev/null
+++ b/.gitlab-ci/test-meson-install-shared.sh
@@ -0,0 +1,23 @@
+#! /bin/bash
+
+set -e
+
+ret=0
+r=0
+echo -n "*** libfontconfig.so installation check: " 1>&2
+ret=$(find $PREFIX -name libfontconfig.so | wc -l)
+if [ $ret -eq 0 ]; then
+  echo "NG - libfontconfig.so not installed." 1>&2
+  r=1
+else
+  echo "OK" 1>&2
+fi
+echo -n "*** libfontconfig.a installation check: " 1>&2
+ret=$(find $PREFIX -name libfontconfig.a | wc -l)
+if [ $ret -ne 0 ]; then
+  echo "NG - libfontconfig.a installed." 1>&2
+  r=1
+else
+  echo "OK" 1>&2
+fi
+exit $r
diff --git a/.gitlab-ci/test-meson-install-static.sh b/.gitlab-ci/test-meson-install-static.sh
new file mode 100644
index 0000000..9298776
--- /dev/null
+++ b/.gitlab-ci/test-meson-install-static.sh
@@ -0,0 +1,23 @@
+#! /bin/bash
+
+set -e
+
+ret=0
+r=0
+echo -n "*** libfontconfig.so installation check: " 1>&2
+ret=$(find $PREFIX -name libfontconfig.so | wc -l)
+if [ $ret -ne 0 ]; then
+  echo "NG - libfontconfig.so installed." 1>&2
+  r=1
+else
+  echo "OK" 1>&2
+fi
+echo -n "*** libfontconfig.a installation check: " 1>&2
+ret=$(find $PREFIX -name libfontconfig.a | wc -l)
+if [ $ret -eq 0 ]; then
+  echo "NG - libfontconfig.a not installed." 1>&2
+  r=1
+else
+  echo "OK" 1>&2
+fi
+exit $r
commit dcc2312f10ecccaeeee9dcce10c8a445b548b366
Author: Akira TAGOH <akira at tagoh.org>
Date:   Tue Apr 29 00:11:32 2025 +0900

    ci: Add -O option to the build script for convenience

diff --git a/.gitlab-ci/build.sh b/.gitlab-ci/build.sh
index 2b38f6f..0cf6ae9 100755
--- a/.gitlab-ci/build.sh
+++ b/.gitlab-ci/build.sh
@@ -24,6 +24,7 @@ buildsys="meson"
 type="shared"
 arch=""
 buildopt=()
+optimization=""
 SRCDIR=$MyPWD
 export MAKE=${MAKE:-make}
 export BUILD_ID=${BUILD_ID:-fontconfig-$$}
@@ -43,7 +44,7 @@ if [ "x$FC_DISTRO_NAME" = "x" ]; then
     sleep 3
 fi
 
-while getopts a:cCe:d:hINs:St:X: OPT
+while getopts a:cCe:d:hINO:s:St:X: OPT
 do
     case $OPT in
         'a') arch=$OPTARG ;;
@@ -53,6 +54,7 @@ do
         'd') disable+=($OPTARG) ;;
         'I') enable_install=0 ;;
         'N') clean_build=0 ;;
+        'O') optimization=$OPTARG ;;
         's') buildsys=$OPTARG ;;
         'S') subproject=1 ;;
         't') type=$OPTARG ;;
@@ -190,6 +192,9 @@ elif [ x"$buildsys" == "xmeson" ]; then
         subprojectname="fontconfig:"
     fi
     TASK=
+    if [ -n "$optimization" ]; then
+        buildopt+=(--optimization=$optimization)
+    fi
     for i in "${disable[@]}"; do
         buildopt+=(-D${subprojectname}$i=disabled)
     done
commit 0c6596b999d0fdc5195cff5a82f246f930d7f9b6
Author: Akira TAGOH <akira at tagoh.org>
Date:   Tue Apr 29 00:09:51 2025 +0900

    ci: quote pip's requirement specifier in the build script

diff --git a/.gitlab-ci/build.sh b/.gitlab-ci/build.sh
index 54ec7aa..2b38f6f 100755
--- a/.gitlab-ci/build.sh
+++ b/.gitlab-ci/build.sh
@@ -147,7 +147,7 @@ if [ x"$buildsys" == "xautotools" ]; then
     fi
 elif [ x"$buildsys" == "xmeson" ]; then
     TASK="pip install"
-    pip install meson>=1.6.1
+    pip install "meson>=1.6.1"
 #   tomli not required for Python >= 3.11
     pip install tomli
     pip install pytest pytest-tap requests


More information about the Fontconfig mailing list