[gssdp/wip/ci: 72/72] ci: Switch back to extensive CI
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gssdp/wip/ci: 72/72] ci: Switch back to extensive CI
- Date: Mon, 3 Jan 2022 11:28:10 +0000 (UTC)
commit d583b5ed305962e4acf79763840ef4fce402392e
Author: Jens Georg <mail jensge org>
Date: Mon Jan 3 11:29:36 2022 +0100
ci: Switch back to extensive CI
We can use F35 now which has a recent enough glib to build libsoup3
.gitlab-ci.yml | 419 ++++++++++++++++++++-----------------------
doc/meson.build | 20 ++-
libgssdp/meson.build | 8 +-
meson.build | 4 +-
subprojects/libsoup-3.0.wrap | 8 +
vala/meson.build | 12 ++
6 files changed, 242 insertions(+), 229 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 591ab8e..7f1a018 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,225 +1,204 @@
-flatpak:
- tags:
- - flatpak
- image: registry.gitlab.gnome.org/gnome/gnome-runtime-images/gnome:master
+include:
+ - remote:
"https://gitlab.freedesktop.org/freedesktop/ci-templates/-/raw/290b79e0e78eab67a83766f4e9691be554fc4afd/templates/ci-fairy.yml"
+ - remote:
'https://gitlab.freedesktop.org/freedesktop/ci-templates/-/raw/290b79e0e78eab67a83766f4e9691be554fc4afd/templates/fedora.yml'
+
+variables:
+ MESON_TEST_TIMEOUT_MULTIPLIER: 3
+
+stages:
+ - review
+ - prepare
+ - build
+ - test
+ - analysis
+ - website
+
+.check-template: &check
+ extends:
+ - .fdo.ci-fairy
+ artifacts:
+ expire_in: 1 week
+ paths:
+ - check-junit-report.xml
+ reports:
+ junit: check-junit-report.xml
+
+check-commit-log:
+ variables:
+ GIT_DEPTH: "100"
+ stage: review
+ script:
+ - if [[ x"$CI_MERGE_REQUEST_TARGET_BRANCH_NAME" != "x" ]] ;
+ then
+ ci-fairy check-commits --junit-xml=check-junit-report.xml ;
+ else
+ echo "Not a merge request" ;
+ fi
+ <<: *check
+
+check-merge-request:
+ variables:
+ GIT_STRATEGY: none
+ stage: review
+ script:
+ - if [[ x"$CI_MERGE_REQUEST_TARGET_BRANCH_NAME" != "x" ]] ;
+ then
+ ci-fairy check-merge-request --require-allow-collaboration --junit-xml=check-junit-report.xml ;
+ else
+ echo "Not a merge request" ;
+ fi
+ <<: *check
+
+.build-template: &build
stage: build
script:
- - flatpak-builder build-dir build-aux/org.gnome.GUPnP.json --stop-at=gssdp --user --disable-rofiles-fuse
- - flatpak build build-dir meson _build
- - flatpak build build-dir ninja -C _build
- - flatpak build build-dir meson test -C _build --gdb
+ - meson . build --prefix=/usr -Db_coverage=true
+ - ninja -C build
artifacts:
- when: on_failure
- name: "gssdp-_${CI_COMMIT_REF_NAME}"
+ expire_in: 1 day
+ paths:
+ - build
+
+.gssdp.fedora@common:
+ variables:
+ BASE_TAG: '2022-01-03.0'
+ FDO_UPSTREAM_REPO: GNOME/gssdp
+ FDO_DISTRIBUTION_PACKAGES: 'clang clang-analyzer gcovr git libasan libubsan python3-gobject python3-pip
xmlto gtk4-devel'
+ FDO_DISTRIBUTION_EXEC: |
+ dnf install -y 'dnf-command(builddep)' &&
+ dnf builddep -y gssdp --setopt=install_weak_deps=False &&
+ dnf clean all &&
+ pip3 install meson markdown toml typogrify
+
+.gssdp.fedora:35@x86_64:
+ extends: .gssdp.fedora@common
+ variables:
+ FDO_DISTRIBUTION_VERSION: 35
+ FDO_DISTRIBUTION_TAG: "x86_64-${BASE_TAG}"
+
+build-fedora-container@x86_64:
+ extends:
+ - .fdo.container-build@fedora
+ - .gssdp.fedora:35@x86_64
+ stage: prepare
+ variables:
+ GIT_STRATEGY: none
+
+
+build-fedora@x86_64:
+ extends:
+ - .fdo.distribution-image@fedora
+ - .gssdp.fedora:35@x86_64
+ needs:
+ - build-fedora-container@x86_64
+ <<: *build
+
+
+.test-template: &test
+ 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 meson test --print-errorlogs ${MESON_TEST_EXTRA_ARGS}
+ after_script:
+ - |
+ echo "Distribution: "
+ echo
+ egrep '^NAME=|^VERSION=' /etc/os-release
+ echo
+ echo "Test suite settings:"
+ echo
+ echo "G_MESSAGES_DEBUG: ${G_MESSAGES_DEBUG}"
+ echo "MESON_TEST_EXTRA_ARGS: ${MESON_TEST_EXTRA_ARGS}"
+ echo
+ echo "These values can be set at https://gitlab.gnome.org/GNOME/gssdp/pipelines/new"
+ artifacts:
+ expire_in: 1 day
+ when: always
paths:
- - "${CI_PROJECT_DIR}/_build/meson-logs"
+ - build
+ reports:
+ junit: "build/meson-logs/testlog.junit.xml"
+
+test-fedora@x86_64:
+ extends:
+ - .fdo.distribution-image@fedora
+ - .gssdp.fedora:35@x86_64
+ needs:
+ - build-fedora@x86_64
+ <<: *test
+
+trigger-gupnp:
+ stage: analysis
+ needs:
+ - test-fedora@x86_64
+ trigger: GNOME/gupnp
+ only:
+ - master
+
+coverage-analysis:
+ extends:
+ - .fdo.distribution-image@fedora
+ - .gssdp.fedora:35@x86_64
+ stage: analysis
+ allow_failure: true
+ script:
+ - cd build
+ - mkdir -p coveragereport
+ - gcovr --html-details --print-summary --root=.. --exclude=../docs/reference --exclude=../tests
--exclude=../tools --exclude=../examples --output coveragereport/index.html
+ coverage: '/^lines: (\d+\.\d+\%)/'
+ artifacts:
+ when: always
+ paths:
+ - build/coveragereport
+ needs:
+ - test-fedora@x86_64
+
+static-scan:
+ extends:
+ - .fdo.distribution-image@fedora
+ - .gssdp.fedora:35@x86_64
+ stage: analysis
+ needs:
+ - build-fedora-container@x86_64
+ script:
+ - meson --buildtype=debug _scan_build
+ - export SCANBUILD="$PWD/.gitlab-ci/scanbuild-wrapper.sh"
+ - ninja -C _scan_build scan-build
+ artifacts:
+ paths:
+ - _scan_build/meson-logs
+ after_script:
+ - .gitlab-ci/scanbuild-plist-to-junit.py _scan_build/meson-logs/scanbuild/ >
_scan_build/junit-scan-build.xml
+ artifacts:
+ reports:
+ junit: "_scan_build/junit-scan-build.xml"
+
+pages:
+ extends:
+ - .fdo.distribution-image@fedora
+ - .gssdp.fedora:35@x86_64
+ stage: website
+ script:
+ - meson doc-build -Dgtk_doc=true
+ - ninja -C doc-build doc/GSSDP
+ - mkdir -p public
+ - mv doc-build/doc/GSSDP public/docs
+
+ artifacts:
+ paths:
+ - public
+ needs:
+ - build-fedora-container@x86_64
+ only:
+ - master
+ - /^wip\/.*\/ci.*$/
+ - /^wip\/.*\/.*doc.*$/
-stages:
- - build
-
-#include:
-# - remote:
"https://gitlab.freedesktop.org/freedesktop/ci-templates/-/raw/290b79e0e78eab67a83766f4e9691be554fc4afd/templates/ci-fairy.yml"
-# - remote:
'https://gitlab.freedesktop.org/freedesktop/ci-templates/-/raw/290b79e0e78eab67a83766f4e9691be554fc4afd/templates/fedora.yml'
-#
-#variables:
-# MESON_TEST_TIMEOUT_MULTIPLIER: 3
-#
-#stages:
-# - review
-# - prepare
-# - build
-# - test
-# - analysis
-# - website
-#
-#.check-template: &check
-# extends:
-# - .fdo.ci-fairy
-# artifacts:
-# expire_in: 1 week
-# paths:
-# - check-junit-report.xml
-# reports:
-# junit: check-junit-report.xml
-#
-#check-commit-log:
-# variables:
-# GIT_DEPTH: "100"
-# stage: review
-# script:
-# - if [[ x"$CI_MERGE_REQUEST_TARGET_BRANCH_NAME" != "x" ]] ;
-# then
-# ci-fairy check-commits --junit-xml=check-junit-report.xml ;
-# else
-# echo "Not a merge request" ;
-# fi
-# <<: *check
-#
-#check-merge-request:
-# variables:
-# GIT_STRATEGY: none
-# stage: review
-# script:
-# - if [[ x"$CI_MERGE_REQUEST_TARGET_BRANCH_NAME" != "x" ]] ;
-# then
-# ci-fairy check-merge-request --require-allow-collaboration --junit-xml=check-junit-report.xml ;
-# else
-# echo "Not a merge request" ;
-# fi
-# <<: *check
-#
-#.build-template: &build
-# stage: build
-# script:
-# - meson . build --prefix=/usr -Db_coverage=true
-# - ninja -C build
-# artifacts:
-# expire_in: 1 day
-# paths:
-# - build
-#
-#.gssdp.fedora@common:
-# variables:
-# BASE_TAG: '2021-06-19.0'
-# FDO_UPSTREAM_REPO: GNOME/gssdp
-# FDO_DISTRIBUTION_PACKAGES: 'clang clang-analyzer gcovr git libasan libubsan python3-gobject python3-pip
xmlto gtk4-devel'
-# FDO_DISTRIBUTION_EXEC: |
-# dnf install -y 'dnf-command(builddep)' &&
-# dnf builddep -y gssdp --setopt=install_weak_deps=False &&
-# dnf clean all &&
-# pip3 install meson markdown toml typogrify
-#
-#.gssdp.fedora:34@x86_64:
-# extends: .gssdp.fedora@common
-# variables:
-# FDO_DISTRIBUTION_VERSION: 34
-# FDO_DISTRIBUTION_TAG: "x86_64-${BASE_TAG}"
-#
-#build-fedora-container@x86_64:
-# extends:
-# - .fdo.container-build@fedora
-# - .gssdp.fedora:34@x86_64
-# stage: prepare
-# variables:
-# GIT_STRATEGY: none
-#
-#
-#build-fedora@x86_64:
-# extends:
-# - .fdo.distribution-image@fedora
-# - .gssdp.fedora:34@x86_64
-# needs:
-# - build-fedora-container@x86_64
-# <<: *build
-#
-#
-#.test-template: &test
-# 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 meson test --print-errorlogs ${MESON_TEST_EXTRA_ARGS}
-# after_script:
-# - |
-# echo "Distribution: "
-# echo
-# egrep '^NAME=|^VERSION=' /etc/os-release
-# echo
-# echo "Test suite settings:"
-# echo
-# echo "G_MESSAGES_DEBUG: ${G_MESSAGES_DEBUG}"
-# echo "MESON_TEST_EXTRA_ARGS: ${MESON_TEST_EXTRA_ARGS}"
-# echo
-# echo "These values can be set at https://gitlab.gnome.org/GNOME/gssdp/pipelines/new"
-# artifacts:
-# expire_in: 1 day
-# when: always
-# paths:
-# - build
-# reports:
-# junit: "build/meson-logs/testlog.junit.xml"
-#
-#test-fedora@x86_64:
-# extends:
-# - .fdo.distribution-image@fedora
-# - .gssdp.fedora:34@x86_64
-# needs:
-# - build-fedora@x86_64
-# <<: *test
-#
-#trigger-gupnp:
-# stage: analysis
-# needs:
-# - test-fedora@x86_64
-# trigger: GNOME/gupnp
-# only:
-# - master
-#
-#coverage-analysis:
-# extends:
-# - .fdo.distribution-image@fedora
-# - .gssdp.fedora:34@x86_64
-# stage: analysis
-# allow_failure: true
-# script:
-# - cd build
-# - mkdir -p coveragereport
-# - gcovr --html-details --print-summary --root=.. --exclude=../docs/reference --exclude=../tests
--exclude=../tools --exclude=../examples --output coveragereport/index.html
-# coverage: '/^lines: (\d+\.\d+\%)/'
-# artifacts:
-# when: always
-# paths:
-# - build/coveragereport
-# needs:
-# - test-fedora@x86_64
-#
-#static-scan:
-# extends:
-# - .fdo.distribution-image@fedora
-# - .gssdp.fedora:34@x86_64
-# stage: analysis
-# needs:
-# - build-fedora-container@x86_64
-# script:
-# - meson --buildtype=debug _scan_build
-# - export SCANBUILD="$PWD/.gitlab-ci/scanbuild-wrapper.sh"
-# - ninja -C _scan_build scan-build
-# artifacts:
-# paths:
-# - _scan_build/meson-logs
-# after_script:
-# - .gitlab-ci/scanbuild-plist-to-junit.py _scan_build/meson-logs/scanbuild/ >
_scan_build/junit-scan-build.xml
-# artifacts:
-# reports:
-# junit: "_scan_build/junit-scan-build.xml"
-#
-#pages:
-# extends:
-# - .fdo.distribution-image@fedora
-# - .gssdp.fedora:34@x86_64
-# stage: website
-# script:
-# - meson doc-build -Dgtk_doc=true
-# - ninja -C doc-build doc/GSSDP
-# - mkdir -p public
-# - mv doc-build/doc/GSSDP public/docs
-#
-# artifacts:
-# paths:
-# - public
-# needs:
-# - build-fedora-container@x86_64
-# only:
-# - master
-# - /^wip\/.*\/ci.*$/
-# - /^wip\/.*\/.*doc.*$/
-#
-#
-#
diff --git a/doc/meson.build b/doc/meson.build
index 2ef2f9f..099f894 100644
--- a/doc/meson.build
+++ b/doc/meson.build
@@ -11,11 +11,8 @@ gssdp_toml = configure_file (
docs_dir = join_paths(get_option('prefix'), get_option('datadir'), 'doc', GSSDP_API_NAME, 'reference')
-custom_target(
- 'gssdp-doc',
- input: [ gssdp_toml, gir[0] ],
- output: 'GSSDP',
- command : [
+
+command = [
gidocgen,
'generate',
'--quiet',
@@ -25,7 +22,18 @@ custom_target(
'--no-namespace-dir',
'--content-dir=@0@'.format(meson.current_source_dir()),
'@INPUT1@',
- ],
+]
+
+if libsoup.type_name() == 'internal'
+ dir = fs.parent (subproject('libsoup-3.0').get_variable('soup_gir_gen_sources')[0].full_path())
+ command += '--add-include-path=@0@'.format(dir)
+endif
+
+custom_target(
+ 'gssdp-doc',
+ input: [ gssdp_toml, gir[0] ],
+ output: 'GSSDP',
+ command : command,
depend_files : gssdp_toml,
build_by_default: true,
install: true,
diff --git a/libgssdp/meson.build b/libgssdp/meson.build
index 9412e6f..9352aa8 100644
--- a/libgssdp/meson.build
+++ b/libgssdp/meson.build
@@ -89,6 +89,12 @@ pkg.generate(libgssdp,
if get_option('introspection')
gssdp_gir_dir = meson.current_build_dir()
+ gir_includes = ['GObject-2.0', 'Gio-2.0']
+ if libsoup.type_name() == 'internal'
+ gir_includes += subproject('libsoup-3.0').get_variable('soup_gir_gen_sources').get(0)
+ else
+ gir_includes += 'Soup-3.0'
+ endif
gir = gnome.generate_gir(libgssdp,
sources : headers + sources + enums,
namespace : 'GSSDP',
@@ -97,6 +103,6 @@ if get_option('introspection')
symbol_prefix : 'gssdp',
identifier_prefix : 'GSSDP',
export_packages : GSSDP_API_NAME,
- includes : ['GObject-2.0', 'Gio-2.0', 'Soup-3.0'],
+ includes : gir_includes,
install: true)
endif
diff --git a/meson.build b/meson.build
index 71dab96..ef3599d 100644
--- a/meson.build
+++ b/meson.build
@@ -71,12 +71,12 @@ endif
# Assume "other" unix or linux then
generic_unix = not bionic_available and host_machine.system() != 'windows'
-
+libsoup = dependency('libsoup-3.0', version : '>= 2.99.0')
dependencies = [
dependency('glib-2.0', version : '>= ' + glib_version),
dependency('gobject-2.0', version : '>= ' + glib_version),
dependency('gio-2.0', version : '>= ' + glib_version),
- dependency('libsoup-3.0', version : '>= 2.99.0')
+ libsoup
]
subdir('libgssdp')
diff --git a/subprojects/libsoup-3.0.wrap b/subprojects/libsoup-3.0.wrap
new file mode 100644
index 0000000..bdf0560
--- /dev/null
+++ b/subprojects/libsoup-3.0.wrap
@@ -0,0 +1,8 @@
+[wrap-git]
+url = https://gitlab.gnome.org/GNOME/libsoup.git
+revision = master
+depth = 1
+
+[provide]
+# libsoup does not use override_dependency so we have to code the variable here
+libsoup-3.0 = libsoup_dep
diff --git a/vala/meson.build b/vala/meson.build
index 889f880..179e685 100644
--- a/vala/meson.build
+++ b/vala/meson.build
@@ -1,4 +1,16 @@
+fs = import('fs')
+if libsoup.type_name() == 'internal'
+ dir = fs.parent (subproject('libsoup-3.0').get_variable('soup_gir_gen_sources')[0].full_path())
+ vapi_dirs = [dir]
+ gir_dirs = [dir]
+else
+ vapi_dirs = []
+ gir_dirs = []
+endif
+
vapi = gnome.generate_vapi(GSSDP_API_NAME,
sources : gir.get(0),
packages : ['gio-2.0', 'libsoup-3.0'],
+ gir_dirs : gir_dirs,
+ vapi_dirs : vapi_dirs,
install : true)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]