.gitlab-ci.yml | 462 +++++++++++++------------------------------------ .gitlab-ci/ci.template | 155 +++++++++++----- .gitlab-ci/config.yml | 160 +++++++--------- .gitlab-ci/other.yml | 4 4 files changed, 304 insertions(+), 477 deletions(-) New commits: commit a7957436d80178ae632ad34504d98e5764bceef1 Merge: 9e61da4 e1d9944 Author: Akira TAGOH <akira@xxxxxxxxx> Date: Wed Apr 23 05:52:39 2025 +0000 Merge branch 'ci-cleanup' into 'main' ci: clean up and add changelog to the release note through changelog API See merge request fontconfig/fontconfig!391 commit e1d99448cf0bdd1e39d5a6ad2a5dd774299bc60c Author: Akira TAGOH <akira@xxxxxxxxx> Date: Wed Apr 23 11:51:22 2025 +0900 ci: clean up and add changelog to the release note through changelog API diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index efa0fd8..4fa6385 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -29,8 +29,9 @@ include: stages: - sanity check - prep - - style check + - build - test + - distro - deploy - container_clean @@ -42,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-17.1-a21ccc3b8989' - FREEBSD_TAG: '2025-04-17.1-c694c9922fb9' + FEDORA_TAG: '2025-04-23.1-dd4daa0bc582' + FREEBSD_TAG: '2025-04-23.1-e06fb6df1f3e' FEDORA_EXEC: 'bash .gitlab-ci/fedora-install.sh' FREEBSD_EXEC: 'bash .gitlab-ci/freebsd-install.sh' @@ -205,30 +206,7 @@ freebsd:14.1@container-clean: ####################################### # # -# style check # -# # -####################################### - -clang-format: - stage: style check - extends: - - .fdo.distribution-image@fedora - variables: - FDO_DISTRIBUTION_VERSION: 'rawhide' - FDO_DISTRIBUTION_TAG: $FEDORA_TAG - needs: - - 'fedora:rawhide@container-prep' - script: - - | - commit="${CI_MERGE_REQUEST_TARGET_BRANCH_SHA:-${CI_MERGE_REQUEST_DIFF_BASE_SHA:?}}" || exit - echo sh .gitlab-ci/check-style.sh "$commit" - sh .gitlab-ci/check-style.sh "$commit" - rules: - - if: $CI_PIPELINE_SOURCE == 'merge_request_event' - -####################################### -# # -# build stage # +# build template # # # ####################################### @@ -354,308 +332,227 @@ clang-format: ####################################### # # -# test stage # +# build stage # # # ####################################### - -t_fedora:rawhide:autotools shared expat: +build-autotools shared expat: + stage: build extends: - .build@template - .fdo.distribution-image@fedora - .fc_artifacts variables: FC_DISTRO_NAME: fedora - FDO_DISTRIBUTION_VERSION: 'rawhide' + FDO_DISTRIBUTION_VERSION: rawhide FDO_DISTRIBUTION_TAG: $FEDORA_TAG FC_BUILDSYS: autotools FC_BUILD_TYPE: shared FC_XML_BACKEND: expat needs: - - 'fedora:rawhide@container-prep' - - - -t_fedora:rawhide:autotools shared libxml2: + - fedora:rawhide@container-prep +build-autotools shared libxml2: + stage: build extends: - .build@template - .fdo.distribution-image@fedora - .fc_artifacts variables: FC_DISTRO_NAME: fedora - FDO_DISTRIBUTION_VERSION: 'rawhide' + FDO_DISTRIBUTION_VERSION: rawhide FDO_DISTRIBUTION_TAG: $FEDORA_TAG FC_BUILDSYS: autotools FC_BUILD_TYPE: shared FC_XML_BACKEND: libxml2 - FC_BUILD_DISTCHECK: 1 needs: - - 'fedora:rawhide@container-prep' - - - -t_fedora:rawhide:meson shared expat: - extends: - - .build@template - - .fdo.distribution-image@fedora - - .fc_artifacts - variables: - FC_DISTRO_NAME: fedora - FDO_DISTRIBUTION_VERSION: 'rawhide' - FDO_DISTRIBUTION_TAG: $FEDORA_TAG - FC_BUILDSYS: meson - FC_BUILD_TYPE: shared - FC_XML_BACKEND: expat - needs: - - 'fedora:rawhide@container-prep' - - - -t_fedora:rawhide:meson shared libxml2: - extends: - - .build@template - - .fdo.distribution-image@fedora - - .fc_artifacts - variables: - FC_DISTRO_NAME: fedora - FDO_DISTRIBUTION_VERSION: 'rawhide' - FDO_DISTRIBUTION_TAG: $FEDORA_TAG - FC_BUILDSYS: meson - FC_BUILD_TYPE: shared - FC_XML_BACKEND: libxml2 - FC_BUILD_DISTCHECK: 1 - needs: - - 'fedora:rawhide@container-prep' - -upload_asset:t_fedora:rawhide:meson shared libxml2: - needs: - - t_fedora:rawhide:meson shared libxml2 - extends: - - .fdo.distribution-image@fedora - - .upload - variables: - FDO_DISTRIBUTION_VERSION: 'rawhide' - FDO_DISTRIBUTION_TAG: $FEDORA_TAG - - -t_fedora:rawhide:subproject_build: - extends: - - .build@template - - .fdo.distribution-image@fedora - - .fc_artifacts - variables: - FC_DISTRO_NAME: fedora - FDO_DISTRIBUTION_VERSION: 'rawhide' - FDO_DISTRIBUTION_TAG: $FEDORA_TAG - FC_BUILDSYS: meson - FC_BUILD_TYPE: shared - FC_XML_BACKEND: libxml2 - FC_BUILD_SUBPROJECT: 1 - needs: - - 'fedora:rawhide@container-prep' - - - -t_fedora:rawhide:autotools static expat: + - fedora:rawhide@container-prep +build-autotools static expat: + stage: build extends: - .build@template - .fdo.distribution-image@fedora - .fc_artifacts variables: FC_DISTRO_NAME: fedora - FDO_DISTRIBUTION_VERSION: 'rawhide' + FDO_DISTRIBUTION_VERSION: rawhide FDO_DISTRIBUTION_TAG: $FEDORA_TAG FC_BUILDSYS: autotools FC_BUILD_TYPE: static FC_XML_BACKEND: expat needs: - - 'fedora:rawhide@container-prep' - - - -t_fedora:rawhide:autotools static libxml2: + - fedora:rawhide@container-prep +build-autotools static libxml2: + stage: build extends: - .build@template - .fdo.distribution-image@fedora - .fc_artifacts variables: FC_DISTRO_NAME: fedora - FDO_DISTRIBUTION_VERSION: 'rawhide' + FDO_DISTRIBUTION_VERSION: rawhide FDO_DISTRIBUTION_TAG: $FEDORA_TAG FC_BUILDSYS: autotools FC_BUILD_TYPE: static FC_XML_BACKEND: libxml2 needs: - - 'fedora:rawhide@container-prep' - - - -t_fedora:rawhide:meson static expat: + - fedora:rawhide@container-prep +build-meson shared expat: + stage: build extends: - .build@template - .fdo.distribution-image@fedora - .fc_artifacts variables: FC_DISTRO_NAME: fedora - FDO_DISTRIBUTION_VERSION: 'rawhide' + FDO_DISTRIBUTION_VERSION: rawhide FDO_DISTRIBUTION_TAG: $FEDORA_TAG FC_BUILDSYS: meson - FC_BUILD_TYPE: static + FC_BUILD_TYPE: shared FC_XML_BACKEND: expat needs: - - 'fedora:rawhide@container-prep' - - - -t_fedora:rawhide:meson static libxml2: + - fedora:rawhide@container-prep +build-meson shared libxml2: + stage: build extends: - .build@template - .fdo.distribution-image@fedora - .fc_artifacts variables: FC_DISTRO_NAME: fedora - FDO_DISTRIBUTION_VERSION: 'rawhide' + FDO_DISTRIBUTION_VERSION: rawhide FDO_DISTRIBUTION_TAG: $FEDORA_TAG FC_BUILDSYS: meson - FC_BUILD_TYPE: static + FC_BUILD_TYPE: shared FC_XML_BACKEND: libxml2 needs: - - 'fedora:rawhide@container-prep' - - - -t_fedora:rawhide:mingw autotools static libxml2: + - fedora:rawhide@container-prep +build-meson static expat: + stage: build extends: - .build@template - .fdo.distribution-image@fedora - .fc_artifacts variables: FC_DISTRO_NAME: fedora - FDO_DISTRIBUTION_VERSION: 'rawhide' + FDO_DISTRIBUTION_VERSION: rawhide FDO_DISTRIBUTION_TAG: $FEDORA_TAG - FC_BUILDSYS: autotools + FC_BUILDSYS: meson FC_BUILD_TYPE: static - FC_XML_BACKEND: libxml2 - FC_BUILD_PLATFORM: mingw - FC_BUILD_ARCH: x86_64-mingw32 + FC_XML_BACKEND: expat needs: - - 'fedora:rawhide@container-prep' - - - -t_fedora:rawhide:mingw meson static expat: + - fedora:rawhide@container-prep +build-meson static libxml2: + stage: build extends: - .build@template - .fdo.distribution-image@fedora - .fc_artifacts variables: FC_DISTRO_NAME: fedora - FDO_DISTRIBUTION_VERSION: 'rawhide' + FDO_DISTRIBUTION_VERSION: rawhide FDO_DISTRIBUTION_TAG: $FEDORA_TAG FC_BUILDSYS: meson FC_BUILD_TYPE: static - FC_XML_BACKEND: expat - FC_BUILD_PLATFORM: mingw - FC_BUILD_ARCH: linux-mingw-w64-64bit - FC_BUILD_NO_INSTALL: 1 + FC_XML_BACKEND: libxml2 needs: - - 'fedora:rawhide@container-prep' - - - -t_fedora:rawhide:meson static libxml2 fontations: + - fedora:rawhide@container-prep +build-meson static fontations: + stage: build extends: - .build@template - .fdo.distribution-image@fedora - .fc_artifacts variables: FC_DISTRO_NAME: fedora - FDO_DISTRIBUTION_VERSION: 'rawhide' + FDO_DISTRIBUTION_VERSION: rawhide FDO_DISTRIBUTION_TAG: $FEDORA_TAG FC_BUILDSYS: meson FC_BUILD_TYPE: static - FC_XML_BACKEND: libxml2 FC_BUILD_ENABLED: fontations needs: - - 'fedora:rawhide@container-prep' - + - fedora:rawhide@container-prep +####################################### +# # +# test # +# # +####################################### -t_fedora:rawhide:android aarch64: +clang-format: + stage: test extends: - - .build@template - .fdo.distribution-image@fedora - - .fc_artifacts variables: - FC_DISTRO_NAME: fedora FDO_DISTRIBUTION_VERSION: 'rawhide' FDO_DISTRIBUTION_TAG: $FEDORA_TAG - FC_BUILDSYS: meson - FC_BUILD_TYPE: shared - FC_XML_BACKEND: expat - FC_BUILD_PLATFORM: android - FC_BUILD_ARCH: aarch64-linux-android - FC_BUILD_NO_INSTALL: 1 - FC_BUILD_DISABLED: nls - FC_BUILD_NO_CHECK: 1 needs: - 'fedora:rawhide@container-prep' + script: + - | + commit="${CI_MERGE_REQUEST_TARGET_BRANCH_SHA:-${CI_MERGE_REQUEST_DIFF_BASE_SHA:?}}" || exit + echo sh .gitlab-ci/check-style.sh "$commit" + sh .gitlab-ci/check-style.sh "$commit" + rules: + - if: $CI_PIPELINE_SOURCE == 'merge_request_event' - - -t_fedora:41:autotools shared expat: +subproject-build shared: + stage: test extends: - .build@template - .fdo.distribution-image@fedora - .fc_artifacts variables: FC_DISTRO_NAME: fedora - FDO_DISTRIBUTION_VERSION: '41' + FDO_DISTRIBUTION_VERSION: rawhide FDO_DISTRIBUTION_TAG: $FEDORA_TAG - FC_BUILDSYS: autotools + FC_BUILDSYS: meson FC_BUILD_TYPE: shared - FC_XML_BACKEND: expat + FC_BUILD_SUBPROJECT: 1 needs: - - 'fedora:41@container-prep' - - - -t_fedora:41:autotools shared libxml2: + - fedora:rawhide@container-prep +subproject-build static: + stage: test extends: - .build@template - .fdo.distribution-image@fedora - .fc_artifacts variables: FC_DISTRO_NAME: fedora - FDO_DISTRIBUTION_VERSION: '41' + FDO_DISTRIBUTION_VERSION: rawhide FDO_DISTRIBUTION_TAG: $FEDORA_TAG - FC_BUILDSYS: autotools - FC_BUILD_TYPE: shared - FC_XML_BACKEND: libxml2 - FC_BUILD_DISTCHECK: 1 + FC_BUILDSYS: meson + FC_BUILD_TYPE: static + FC_BUILD_SUBPROJECT: 1 needs: - - 'fedora:41@container-prep' + - fedora:rawhide@container-prep +####################################### +# # +# distro stage # +# # +####################################### -t_fedora:41:meson shared expat: +t_fedora:rawhide:standard build: + stage: distro extends: - .build@template - .fdo.distribution-image@fedora - .fc_artifacts variables: FC_DISTRO_NAME: fedora - FDO_DISTRIBUTION_VERSION: '41' + FDO_DISTRIBUTION_VERSION: 'rawhide' FDO_DISTRIBUTION_TAG: $FEDORA_TAG FC_BUILDSYS: meson FC_BUILD_TYPE: shared - FC_XML_BACKEND: expat + FC_XML_BACKEND: libxml2 + FC_BUILD_DISTCHECK: 1 needs: - - 'fedora:41@container-prep' - + - 'fedora:rawhide@container-prep' -t_fedora:41:meson shared libxml2: +t_fedora:41:standard build: + stage: distro extends: - .build@template - .fdo.distribution-image@fedora @@ -672,52 +569,8 @@ t_fedora:41:meson shared libxml2: - 'fedora:41@container-prep' - - - - - - - - - - - - - - - - - - - - - - - - - - - - -t_fedora:40:autotools shared expat: - extends: - - .build@template - - .fdo.distribution-image@fedora - - .fc_artifacts - variables: - FC_DISTRO_NAME: fedora - FDO_DISTRIBUTION_VERSION: '40' - FDO_DISTRIBUTION_TAG: $FEDORA_TAG - FC_BUILDSYS: autotools - FC_BUILD_TYPE: shared - FC_XML_BACKEND: expat - needs: - - 'fedora:40@container-prep' - - - -t_fedora:40:autotools shared libxml2: +t_fedora:40:standard build: + stage: distro extends: - .build@template - .fdo.distribution-image@fedora @@ -726,7 +579,7 @@ t_fedora:40:autotools shared libxml2: FC_DISTRO_NAME: fedora FDO_DISTRIBUTION_VERSION: '40' FDO_DISTRIBUTION_TAG: $FEDORA_TAG - FC_BUILDSYS: autotools + FC_BUILDSYS: meson FC_BUILD_TYPE: shared FC_XML_BACKEND: libxml2 FC_BUILD_DISTCHECK: 1 @@ -734,126 +587,49 @@ t_fedora:40:autotools shared libxml2: - 'fedora:40@container-prep' - -t_fedora:40:meson shared expat: +t_fedora:rawhide:MinGW: + stage: distro extends: - .build@template - .fdo.distribution-image@fedora - .fc_artifacts variables: FC_DISTRO_NAME: fedora - FDO_DISTRIBUTION_VERSION: '40' + FDO_DISTRIBUTION_VERSION: 'rawhide' FDO_DISTRIBUTION_TAG: $FEDORA_TAG FC_BUILDSYS: meson - FC_BUILD_TYPE: shared - FC_XML_BACKEND: expat + FC_BUILD_TYPE: static + FC_BUILD_PLATFORM: mingw + FC_BUILD_ARCH: linux-mingw-w64-64bit + FC_BUILD_NO_INSTALL: 1 needs: - - 'fedora:40@container-prep' - + - 'fedora:rawhide@container-prep' -t_fedora:40:meson shared libxml2: +t_fedora:rawhide:android aarch64: + stage: distro extends: - .build@template - .fdo.distribution-image@fedora - .fc_artifacts variables: FC_DISTRO_NAME: fedora - FDO_DISTRIBUTION_VERSION: '40' + FDO_DISTRIBUTION_VERSION: 'rawhide' FDO_DISTRIBUTION_TAG: $FEDORA_TAG FC_BUILDSYS: meson FC_BUILD_TYPE: shared - FC_XML_BACKEND: libxml2 - FC_BUILD_DISTCHECK: 1 - needs: - - 'fedora:40@container-prep' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -t_freebsd:14.1:autotools shared expat: - extends: - - .build-in-qemu@template - - .fdo.distribution-image@freebsd - - .fc_artifacts - variables: - FC_DISTRO_NAME: freebsd - FDO_DISTRIBUTION_VERSION: '14.1' - FDO_DISTRIBUTION_TAG: $FREEBSD_TAG - FC_BUILDSYS: autotools - FC_BUILD_TYPE: shared - FC_XML_BACKEND: expat - MAKE: gmake - FC_BUILD_NO_CHECK: 1 - needs: - - 'freebsd:14.1@container-prep' - - - -t_freebsd:14.1:autotools shared libxml2: - extends: - - .build-in-qemu@template - - .fdo.distribution-image@freebsd - - .fc_artifacts - variables: - FC_DISTRO_NAME: freebsd - FDO_DISTRIBUTION_VERSION: '14.1' - FDO_DISTRIBUTION_TAG: $FREEBSD_TAG - FC_BUILDSYS: autotools - FC_BUILD_TYPE: shared - FC_XML_BACKEND: libxml2 - MAKE: gmake - FC_BUILD_NO_CHECK: 1 - needs: - - 'freebsd:14.1@container-prep' - - - -t_freebsd:14.1:meson shared expat: - extends: - - .build-in-qemu@template - - .fdo.distribution-image@freebsd - - .fc_artifacts - variables: - FC_DISTRO_NAME: freebsd - FDO_DISTRIBUTION_VERSION: '14.1' - FDO_DISTRIBUTION_TAG: $FREEBSD_TAG - FC_BUILDSYS: meson - FC_BUILD_TYPE: shared FC_XML_BACKEND: expat + FC_BUILD_PLATFORM: android + FC_BUILD_ARCH: aarch64-linux-android + FC_BUILD_NO_INSTALL: 1 + FC_BUILD_DISABLED: nls FC_BUILD_NO_CHECK: 1 needs: - - 'freebsd:14.1@container-prep' - + - 'fedora:rawhide@container-prep' -t_freebsd:14.1:meson shared libxml2: +t_freebsd:14.1:standard build: + stage: distro extends: - .build-in-qemu@template - .fdo.distribution-image@freebsd @@ -870,7 +646,6 @@ t_freebsd:14.1:meson shared libxml2: - 'freebsd:14.1@container-prep' - ####################################### # # # deploy stage # @@ -891,8 +666,22 @@ check-merge-request: rules: - if: $CI_PIPELINE_SOURCE == "merge_request_event" +upload_asset: + stage: deploy + needs: + - t_fedora:rawhide:standard build + extends: + - .fdo.distribution-image@fedora + - .upload + variables: + FDO_DISTRIBUTION_VERSION: 'rawhide' + FDO_DISTRIBUTION_TAG: $FEDORA_TAG pages: stage: deploy + needs: + - t_fedora:rawhide:standard build + dependencies: + - t_fedora:rawhide:standard build script: - | mkdir public || : @@ -900,10 +689,6 @@ pages: artifacts: paths: - public - dependencies: - - t_fedora:rawhide:autotools shared libxml2 - needs: - - t_fedora:rawhide:autotools shared libxml2 rules: - if: $CI_COMMIT_BRANCH == "main" && $CI_PIPELINE_SOURCE != "merge_request_event" @@ -917,7 +702,8 @@ make-release: script: - glab auth login -h ${CI_SERVER_HOST} -j ${CI_JOB_TOKEN} - | - glab release create ${CI_COMMIT_TAG} --name "Release ${CI_COMMIT_TAG}" -a "[{\"name\": \"fontconfig-${CI_COMMIT_TAG}.tar.xz\", \"url\": \"${PACKAGE_REGISTRY_URL}/fontconfig-${CI_COMMIT_TAG}.tar.xz\"}, {\"name\": \"fontconfig-${CI_COMMIT_TAG}.tar.xz (sha256sum)\", \"url\": \"${PACKAGE_REGISTRY_URL}/fontconfig-${CI_COMMIT_TAG}.tar.xz.sha256sum\"}]" + glab changelog generate -v ${CI_COMMIT_TAG} > changelog-${CI_COMMIT_TAG}.md + glab release create ${CI_COMMIT_TAG} --name "Release ${CI_COMMIT_TAG}" -F changelog-${CI_COMMIT_TAG}.md -a "[{\"name\": \"fontconfig-${CI_COMMIT_TAG}.tar.xz\", \"url\": \"${PACKAGE_REGISTRY_URL}/fontconfig-${CI_COMMIT_TAG}.tar.xz\"}, {\"name\": \"fontconfig-${CI_COMMIT_TAG}.tar.xz (sha256sum)\", \"url\": \"${PACKAGE_REGISTRY_URL}/fontconfig-${CI_COMMIT_TAG}.tar.xz.sha256sum\"}]" workflow: rules: diff --git a/.gitlab-ci/ci.template b/.gitlab-ci/ci.template index d357fdb..0a6397d 100644 --- a/.gitlab-ci/ci.template +++ b/.gitlab-ci/ci.template @@ -15,7 +15,7 @@ .templates_sha: &template_sha ef5e4669b7500834a17ffe9277e15fbb6d977fff include: - {% for distro in distributions|sort(attribute="name") %} + {% for distro in distributions|sort(attribute="name")|unique(attribute="name") %} # {{ distro.name.capitalize() }} container builder template - project: 'freedesktop/ci-templates' ref: *template_sha @@ -29,8 +29,9 @@ include: stages: - sanity check - prep - - style check + - build - test + - distro - deploy - container_clean @@ -42,14 +43,14 @@ variables: # changing these will force rebuilding the associated image # Note: these tags have no meaning and are not tied to a particular # fontconfig version -{% for distro in distributions %} +{% for distro in distributions|unique(attribute="name") %} {{"%-15s"| format(distro.name.upper() + '_TAG:')}}'{{distro.tag}}-{{ (ci_fairy.hashfiles('.gitlab-ci/config.yml', '.gitlab-ci/' + distro.name + '-install.sh'))[0:12] }}' {% endfor %} -{% for distro in distributions %} +{% for distro in distributions|unique(attribute="name") %} {{"%-15s"| format(distro.name.upper() + '_EXEC:')}}'bash .gitlab-ci/{{distro.name}}-install.sh' {% endfor %} @@ -95,7 +96,7 @@ check-ci-script: # Build a container for each distribution + version. The ci-templates # will re-use the containers if the tag doesn't change. -{% for distro in distributions %} +{% for distro in distributions|unique(attribute="name") %} {% for version in distro.versions %} {{distro.name}}:{{version}}@container-prep: @@ -151,7 +152,7 @@ check-ci-script: only: - schedules -{% for distro in distributions %} +{% for distro in distributions|unique(attribute="name") %} {% for version in distro.versions %} {{distro.name}}:{{version}}@container-clean: extends: @@ -167,30 +168,7 @@ check-ci-script: ####################################### # # -# style check # -# # -####################################### - -clang-format: - stage: style check - extends: - - .fdo.distribution-image@fedora - variables: - FDO_DISTRIBUTION_VERSION: 'rawhide' - FDO_DISTRIBUTION_TAG: $FEDORA_TAG - needs: - - 'fedora:rawhide@container-prep' - script: - - | - commit="${CI_MERGE_REQUEST_TARGET_BRANCH_SHA:-${CI_MERGE_REQUEST_DIFF_BASE_SHA:?}}" || exit - echo sh .gitlab-ci/check-style.sh "$commit" - sh .gitlab-ci/check-style.sh "$commit" - rules: - - if: $CI_PIPELINE_SOURCE == 'merge_request_event' - -####################################### -# # -# build stage # +# build template # # # ####################################### @@ -316,7 +294,78 @@ clang-format: ####################################### # # -# test stage # +# build stage # +# # +####################################### + +{% for build in build_patterns %} +build-{{build.name}}: + stage: build + extends: + - .build@template + - .fdo.distribution-image@fedora + - .fc_artifacts + variables: + FC_DISTRO_NAME: fedora + FDO_DISTRIBUTION_VERSION: rawhide + FDO_DISTRIBUTION_TAG: $FEDORA_TAG + {# Where we have extra_variables defined, add them to the list #} + {% if build.variables is defined %} + {% for key, value in build.variables.items() %} + {{key}}: {{value}} + {% endfor %} + {% endif %} + needs: + - fedora:rawhide@container-prep +{% endfor %} + +####################################### +# # +# test # +# # +####################################### + +clang-format: + stage: test + extends: + - .fdo.distribution-image@fedora + variables: + FDO_DISTRIBUTION_VERSION: 'rawhide' + FDO_DISTRIBUTION_TAG: $FEDORA_TAG + needs: + - 'fedora:rawhide@container-prep' + script: + - | + commit="${CI_MERGE_REQUEST_TARGET_BRANCH_SHA:-${CI_MERGE_REQUEST_DIFF_BASE_SHA:?}}" || exit + echo sh .gitlab-ci/check-style.sh "$commit" + sh .gitlab-ci/check-style.sh "$commit" + rules: + - if: $CI_PIPELINE_SOURCE == 'merge_request_event' + +{% for test in test_patterns %} +{{test.name}}: + stage: test + extends: + - .build@template + - .fdo.distribution-image@fedora + - .fc_artifacts + variables: + FC_DISTRO_NAME: fedora + FDO_DISTRIBUTION_VERSION: rawhide + FDO_DISTRIBUTION_TAG: $FEDORA_TAG + {# Where we have extra_variables defined, add them to the list #} + {% if test.variables is defined %} + {% for key, value in test.variables.items() %} + {{key}}: {{value}} + {% endfor %} + {% endif %} + needs: + - fedora:rawhide@container-prep +{% endfor %} + +####################################### +# # +# distro stage # # # ####################################### @@ -326,6 +375,7 @@ clang-format: {% if not 'build_only' in build or build.build_only == version %} t_{{distro.name}}:{{version}}:{{build.name}}: + stage: distro extends: {% if distro.qemu_based %} - .build-in-qemu@template @@ -348,18 +398,6 @@ t_{{distro.name}}:{{version}}:{{build.name}}: - '{{distro.name}}:{{version}}@container-prep' {% endif %} -{% if 'upload' in build and build.upload == version %} -upload_asset:t_{{distro.name}}:{{version}}:{{build.name}}: - needs: - - t_{{distro.name}}:{{version}}:{{build.name}} - extends: - - .fdo.distribution-image@{{distro.name}} - - .upload - variables: - FDO_DISTRIBUTION_VERSION: '{{version}}' - FDO_DISTRIBUTION_TAG: ${{distro.name.upper()}}_TAG -{% endif %} - {% endfor %} {% endfor %} {% endfor %} @@ -384,8 +422,28 @@ check-merge-request: rules: - if: $CI_PIPELINE_SOURCE == "merge_request_event" +{% for distro in distributions %} +{% for version in distro.versions %} +{% for build in distro.builds %} +{% if 'upload' in build and build.upload == version %} +upload_asset: + stage: deploy + needs: + - t_{{distro.name}}:{{version}}:{{build.name}} + extends: + - .fdo.distribution-image@{{distro.name}} + - .upload + variables: + FDO_DISTRIBUTION_VERSION: '{{version}}' + FDO_DISTRIBUTION_TAG: ${{distro.name.upper()}}_TAG +{% endif %} +{% if 'doc' in build and build.doc == version %} pages: stage: deploy + needs: + - t_{{distro.name}}:{{version}}:{{build.name}} + dependencies: + - t_{{distro.name}}:{{version}}:{{build.name}} script: - | mkdir public || : @@ -393,12 +451,12 @@ pages: artifacts: paths: - public - dependencies: - - t_fedora:rawhide:autotools shared libxml2 - needs: - - t_fedora:rawhide:autotools shared libxml2 rules: - if: $CI_COMMIT_BRANCH == "main" && $CI_PIPELINE_SOURCE != "merge_request_event" +{% endif %} +{% endfor %} +{% endfor %} +{% endfor %} make-release: stage: deploy @@ -410,7 +468,8 @@ make-release: script: - glab auth login -h ${CI_SERVER_HOST} -j ${CI_JOB_TOKEN} - | - glab release create ${CI_COMMIT_TAG} --name "Release ${CI_COMMIT_TAG}" -a "[{\"name\": \"fontconfig-${CI_COMMIT_TAG}.tar.xz\", \"url\": \"${PACKAGE_REGISTRY_URL}/fontconfig-${CI_COMMIT_TAG}.tar.xz\"}, {\"name\": \"fontconfig-${CI_COMMIT_TAG}.tar.xz (sha256sum)\", \"url\": \"${PACKAGE_REGISTRY_URL}/fontconfig-${CI_COMMIT_TAG}.tar.xz.sha256sum\"}]" + glab changelog generate -v ${CI_COMMIT_TAG} > changelog-${CI_COMMIT_TAG}.md + glab release create ${CI_COMMIT_TAG} --name "Release ${CI_COMMIT_TAG}" -F changelog-${CI_COMMIT_TAG}.md -a "[{\"name\": \"fontconfig-${CI_COMMIT_TAG}.tar.xz\", \"url\": \"${PACKAGE_REGISTRY_URL}/fontconfig-${CI_COMMIT_TAG}.tar.xz\"}, {\"name\": \"fontconfig-${CI_COMMIT_TAG}.tar.xz (sha256sum)\", \"url\": \"${PACKAGE_REGISTRY_URL}/fontconfig-${CI_COMMIT_TAG}.tar.xz.sha256sum\"}]" workflow: rules: diff --git a/.gitlab-ci/config.yml b/.gitlab-ci/config.yml index 73902b5..6a1bc46 100644 --- a/.gitlab-ci/config.yml +++ b/.gitlab-ci/config.yml @@ -1,4 +1,63 @@ -.default_tag: &default_tag "2025-04-17.1" +.default_tag: &default_tag "2025-04-23.1" + +build_patterns: + - name: "autotools shared expat" + variables: + FC_BUILDSYS: autotools + FC_BUILD_TYPE: shared + FC_XML_BACKEND: expat + - name: "autotools shared libxml2" + variables: + FC_BUILDSYS: autotools + FC_BUILD_TYPE: shared + FC_XML_BACKEND: libxml2 + - name: "autotools static expat" + variables: + FC_BUILDSYS: autotools + FC_BUILD_TYPE: static + FC_XML_BACKEND: expat + - name: "autotools static libxml2" + variables: + FC_BUILDSYS: autotools + FC_BUILD_TYPE: static + FC_XML_BACKEND: libxml2 + - name: "meson shared expat" + variables: + FC_BUILDSYS: meson + FC_BUILD_TYPE: shared + FC_XML_BACKEND: expat + - name: "meson shared libxml2" + variables: + FC_BUILDSYS: meson + FC_BUILD_TYPE: shared + FC_XML_BACKEND: libxml2 + - name: "meson static expat" + variables: + FC_BUILDSYS: meson + FC_BUILD_TYPE: static + FC_XML_BACKEND: expat + - name: "meson static libxml2" + variables: + FC_BUILDSYS: meson + FC_BUILD_TYPE: static + FC_XML_BACKEND: libxml2 + - name: "meson static fontations" + variables: + FC_BUILDSYS: meson + FC_BUILD_TYPE: static + FC_BUILD_ENABLED: "fontations" + +test_patterns: + - name: "subproject-build shared" + variables: + FC_BUILDSYS: meson + FC_BUILD_TYPE: shared + FC_BUILD_SUBPROJECT: 1 + - name: "subproject-build static" + variables: + FC_BUILDSYS: meson + FC_BUILD_TYPE: static + FC_BUILD_SUBPROJECT: 1 distributions: - name: fedora @@ -10,86 +69,29 @@ distributions: - "41" - "40" builds: - - name: "autotools shared expat" - variables: - FC_BUILDSYS: autotools - FC_BUILD_TYPE: shared - FC_XML_BACKEND: expat - - name: "autotools shared libxml2" - variables: - FC_BUILDSYS: autotools - FC_BUILD_TYPE: shared - FC_XML_BACKEND: libxml2 - FC_BUILD_DISTCHECK: 1 - - name: "meson shared expat" - variables: - FC_BUILDSYS: meson - FC_BUILD_TYPE: shared - FC_XML_BACKEND: expat - - name: "meson shared libxml2" + - name: "standard build" upload: "rawhide" + doc: "rawhide" variables: FC_BUILDSYS: meson FC_BUILD_TYPE: shared FC_XML_BACKEND: libxml2 FC_BUILD_DISTCHECK: 1 - - name: "subproject_build" - build_only: "rawhide" - variables: - FC_BUILDSYS: meson - FC_BUILD_TYPE: shared - FC_XML_BACKEND: libxml2 - FC_BUILD_SUBPROJECT: 1 - - name: "autotools static expat" - build_only: "rawhide" - variables: - FC_BUILDSYS: autotools - FC_BUILD_TYPE: static - FC_XML_BACKEND: expat - - name: "autotools static libxml2" - build_only: "rawhide" - variables: - FC_BUILDSYS: autotools - FC_BUILD_TYPE: static - FC_XML_BACKEND: libxml2 - - name: "meson static expat" - build_only: "rawhide" - variables: - FC_BUILDSYS: meson - FC_BUILD_TYPE: static - FC_XML_BACKEND: expat - - name: "meson static libxml2" - build_only: "rawhide" - variables: - FC_BUILDSYS: meson - FC_BUILD_TYPE: static - FC_XML_BACKEND: libxml2 - - name: "mingw autotools static libxml2" - build_only: "rawhide" - variables: - FC_BUILDSYS: autotools - FC_BUILD_TYPE: static - FC_XML_BACKEND: libxml2 - FC_BUILD_PLATFORM: mingw - FC_BUILD_ARCH: x86_64-mingw32 - - name: "mingw meson static expat" - build_only: "rawhide" + - name: fedora + tag: *default_tag + base_type: fedora + qemu_based: false + versions: + - "rawhide" + builds: + - name: "MinGW" variables: FC_BUILDSYS: meson FC_BUILD_TYPE: static - FC_XML_BACKEND: expat FC_BUILD_PLATFORM: mingw FC_BUILD_ARCH: linux-mingw-w64-64bit FC_BUILD_NO_INSTALL: 1 - - name: "meson static libxml2 fontations" - build_only: "rawhide" - variables: - FC_BUILDSYS: meson - FC_BUILD_TYPE: static - FC_XML_BACKEND: libxml2 - FC_BUILD_ENABLED: "fontations" - name: "android aarch64" - build_only: "rawhide" variables: FC_BUILDSYS: meson FC_BUILD_TYPE: shared @@ -106,27 +108,7 @@ distributions: versions: - "14.1" builds: - - name: "autotools shared expat" - variables: - FC_BUILDSYS: autotools - FC_BUILD_TYPE: shared - FC_XML_BACKEND: expat - MAKE: gmake - FC_BUILD_NO_CHECK: 1 # FIXME: There is GNU-specific parameter issue in touch command. - - name: "autotools shared libxml2" - variables: - FC_BUILDSYS: autotools - FC_BUILD_TYPE: shared - FC_XML_BACKEND: libxml2 - MAKE: gmake - FC_BUILD_NO_CHECK: 1 - - name: "meson shared expat" - variables: - FC_BUILDSYS: meson - FC_BUILD_TYPE: shared - FC_XML_BACKEND: expat - FC_BUILD_NO_CHECK: 1 - - name: "meson shared libxml2" + - name: "standard build" variables: FC_BUILDSYS: meson FC_BUILD_TYPE: shared diff --git a/.gitlab-ci/other.yml b/.gitlab-ci/other.yml index f019a88..14af564 100644 --- a/.gitlab-ci/other.yml +++ b/.gitlab-ci/other.yml @@ -3,7 +3,7 @@ # https://gitlab.freedesktop.org/gstreamer/gstreamer/-/blob/main/.gitlab-image-tags.yml#L18 .build meson windows: image: "registry.freedesktop.org/gstreamer/gstreamer/amd64/windows:2024-11-12.0-main" - stage: "test" + stage: "distro" tags: - "docker" - "windows" @@ -57,7 +57,7 @@ meson vs2019 x86: # Skip that configuration for now. .meson macos test: - stage: "test" + stage: "distro" # See https://gitlab.freedesktop.org/gstreamer/gstreamer/-/blob/main/.gitlab-ci.yml # As of 2024-11-21, this is a Mac OS 15 Sequia image on Apple silicon. image: "registry.freedesktop.org/gstreamer/gstreamer/macos-arm64/15-sequoia:2024-10-28.0"