diff options
Diffstat (limited to '')
-rw-r--r-- | .gitlab-ci.yml | 410 | ||||
-rw-r--r-- | .gitlab/issue_templates/Bug.md | 18 | ||||
-rw-r--r-- | .gitlab/issue_templates/Epic.md | 41 | ||||
-rw-r--r-- | .gitlab/issue_templates/Feature.md | 27 |
4 files changed, 496 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..5a37131 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,410 @@ +include: + - remote: 'https://gitlab.freedesktop.org/freedesktop/ci-templates/-/raw/34f4ade99434043f88e164933f570301fd18b125/templates/fedora.yml' + +variables: + FDO_UPSTREAM_REPO: gnome/gnome-control-center + +stages: + - prepare + - build + - test + - manual + - deploy + +.Log files: &log_files [./*.log, _build/meson-logs/] + +.Build logs: &save_build_logs + artifacts: + name: log + when: always + paths: *log_files + +.Git Untracked files: &save_untracked_files + artifacts: + name: untracked + paths: [$(pwd)] + expire_in: 3h30min + +.Show Info: &environment_information + build-aux/ci/ci-helper.sh "INFO" && + build-aux/ci/ci-helper.sh "GIT_INFO" + +.Build procedure: &build_procedure + echo "== Building ==" && + rm -rf _build/ && + meson . _build ${BUILD_OPTS} -Dprofile=development && + ninja -C _build 2>&1 | tee compilation.log + +.Run Tests: &run_tests + echo "== Testing ==" && + meson test -C _build --verbose --no-stdsplit + +.fedora.container.common: + # As of 2022-03-07 runners not tagged with "crun" have broken seccomp rules + # affecting the close_range syscall and breaking g_spawn + # Note that "asan" tests are disabled for the same reason, see below. + # https://gitlab.gnome.org/Infrastructure/GitLab/-/issues/545 + tags: [ crun ] + variables: + # When branching a stable release, change 'main' + # to the release number/branch to ensure that + # a new image will be created, tailored for the + # stable branch. + # Could probably also switch away from rawhide, + # to stable fedora branch as well. + FDO_DISTRIBUTION_TAG: '2022-10-25.0-main' + FDO_DISTRIBUTION_VERSION: rawhide + +############################################# +# Create CI Docker Images # +############################################# + +# See also https://gitlab.freedesktop.org/freedesktop/ci-templates +build.container.fedora@x86_64: + extends: + - '.fdo.container-build@fedora' + - '.fedora.container.common' + stage: 'prepare' + variables: + # no need to pull the whole tree for rebuilding the image + GIT_STRATEGY: none + # Expiry sets fdo.expires on the image + FDO_EXPIRES_AFTER: 8w + # NOTES: + # - gobject-introspection-devel is needed for gsettings-desktop-schemas + FDO_DISTRIBUTION_PACKAGES: >- + @c-development @development-tools + git + llvm clang libasan libtsan libubsan gcovr + meson + accountsservice-devel + cheese-libs-devel + chrpath + colord-devel colord-gtk-devel + cups-devel + desktop-file-utils + docbook-style-xsl + flatpak-devel + gdk-pixbuf2-devel + gettext + glib2-devel + gobject-introspection-devel + gnome-bluetooth-libs-devel + gnome-desktop3-devel + gnome-online-accounts-devel + grilo-devel + gsettings-desktop-schemas-devel + gsound-devel + gtk3-devel ibus-devel + gtk4-devel + intltool + libadwaita-devel + libcanberra-devel + libgtop2-devel + libgudev-devel + libnma-devel + libnotify-devel + libpwquality-devel + libsmbclient-devel + libsoup-devel + libudisks2-devel + libwacom-devel + libX11-devel + libXi-devel + libxml2-devel + libxslt + ModemManager-glib-devel + NetworkManager-libnm-devel + polkit-devel + pulseaudio-libs-devel + upower-devel + python3-dbusmock + xorg-x11-server-Xvfb + mesa-dri-drivers + libsecret-devel + geocode-glib-devel + libgweather-devel + lcms2-devel + geoclue2-devel + libnotify-devel + alsa-lib-devel + nss-devel + gcr-devel + setxkbmap + FDO_DISTRIBUTION_EXEC: |- + git clone https://gitlab.gnome.org/GNOME/gsettings-desktop-schemas.git && \ + cd gsettings-desktop-schemas && \ + meson . _build --prefix=/usr && \ + ninja -C _build && \ + ninja -C _build install && \ + cd .. && \ + git clone https://gitlab.gnome.org/GNOME/gnome-desktop.git && \ + cd gnome-desktop && \ + meson . _build --prefix=/usr -Ddesktop_docs=false && \ + ninja -C _build && \ + ninja -C _build install && \ + cd .. && \ + git clone https://gitlab.gnome.org/GNOME/gnome-bluetooth.git && \ + cd gnome-bluetooth && \ + meson . _build --prefix=/usr -Dsendto=false && \ + ninja -C _build && \ + ninja -C _build install && \ + cd .. && \ + git clone https://gitlab.gnome.org/GNOME/libnma.git && \ + cd libnma && \ + meson . _build --prefix=/usr -Dlibnma_gtk4=true -Dmobile_broadband_provider_info=false -Dgcr=false -Dgtk_doc=false && \ + ninja -C _build && \ + ninja -C _build install && \ + cd .. && \ + git clone https://github.com/hughsie/colord-gtk.git && \ + cd colord-gtk && \ + meson . _build --prefix=/usr -Dgtk4=true -Ddocs=false -Dtests=false -Dman=false && \ + ninja -C _build && \ + ninja -C _build install && \ + cd .. && \ + git clone https://gitlab.gnome.org/GNOME/libgweather.git && \ + cd libgweather && \ + meson . _build --prefix=/usr -Denable_vala=false -Dgtk_doc=false -Dintrospection=false && \ + ninja -C _build && \ + ninja -C _build install && \ + cd .. && \ + git clone https://gitlab.gnome.org/GNOME/gnome-settings-daemon.git && \ + cd gnome-settings-daemon && \ + meson . _build --prefix=/usr && \ + ninja -C _build && \ + ninja -C _build install && \ + cd .. + +## +# Stage: Build +# +# Checks if GNOME Control Center is properly building and installing. This is the +# most important stage of the CI, and no MR should ever be merged if it breaks +# any of them. +## +build: + extends: + - '.fdo.distribution-image@fedora' + - '.fedora.container.common' + + <<: *save_untracked_files + stage: build + + script: + - *environment_information + - *build_procedure + + - echo "== Installing ==" + - ninja -C _build install + + - echo "== Report ==" + - build-aux/ci/ci-helper.sh "WARNINGS" + + # Save all but git-related files + - rm -rf .git .gitignore .gitmodules + + except: + variables: + - $CI_PIPELINE_SOURCE == "schedule" + +## +# Stage: Test +# +# Runs the unit tests. +## +test: + extends: + - '.fdo.distribution-image@fedora' + - '.fedora.container.common' + <<: *save_build_logs + stage: test + + dependencies: + - build + + script: + - *environment_information + - *build_procedure + - *run_tests + + - | + if [[ -n "${CI_COMMIT_TAG}" ]]; then + echo "== Distro Test ==" + ninja dist -C _build + fi + + except: + variables: + - $CI_PIPELINE_SOURCE == "schedule" + - $CI_COMMIT_TITLE =~ /^Update.*translation$/ + +# Runs the coverage test. +coverage: + extends: + - '.fdo.distribution-image@fedora' + - '.fedora.container.common' + <<: *save_build_logs + stage: test + variables: + BUILD_OPTS: "-Db_coverage=true" + coverage: '/^Lines:.\d+.\d+.(\d+\.\d+\%)/' + only: + - main@GNOME/gnome-control-center + + script: + - *environment_information + - *build_procedure + - *run_tests + + - ninja -C _build coverage-html + + # Parse the report to get the coverage result + - | + echo == Coverage == + sed -e 's/<[^>]*>//g' _build/meson-logs/coveragereport/index.html | tr -d ' \t' | grep -A3 -P '^Lines:$' | tr '\n' ' '; echo + + except: + variables: + - $CI_PIPELINE_SOURCE == "schedule" + - $CI_COMMIT_TITLE =~ /^Update.*translation$/ + +# Runs the address sanitizer. +# - below, at the "sanitizers section" + +## +# Stage: Deploy +# +# Publishes the Coverage Report generated above +## +pages: + extends: + - '.fdo.distribution-image@fedora' + - '.fedora.container.common' + stage: deploy + dependencies: + - coverage + script: + - mv _build/meson-logs/coveragereport/ public/ + artifacts: + paths: + - public + only: + - main@GNOME/gnome-control-center + + except: + variables: + - $CRON_TASK == "BUILD_CI_IMAGES" + - $CI_COMMIT_TITLE =~ /^Update.*translation$/ + +## +# Stage: Manual +# +# Creates a flatpak +## +flatpak: + stage: manual + image: quay.io/gnome_infrastructure/gnome-runtime-images:gnome-master + artifacts: + name: package + paths: + - $(pwd)/*.flatpak + expire_in: 7 days + + variables: + OLD_APPID: "org.gnome.Settings" + APPID: "org.gnome.SettingsDevel" + BUNDLE: "org.gnome.SettingsDevel.flatpak" + MANIFEST_PATH: "build-aux/flatpak/org.gnome.Settings.json" + PROJECT_ID: "org.gnome.Settings" + PROJECT_NAME: "gnome-control-center.git" + RUNTIME_REPO: "https://sdk.gnome.org/gnome-nightly.flatpakrepo" + + script: + - echo "== Flatpak packaging ==" + + # Make it a develoment manifest + - sed -i -n "p; s/$PROJECT_NAME//p" ${MANIFEST_PATH} + - > + sed -i "s,\"app-id\" : \"$PROJECT_ID\",\"app-id\" : \"<<ID>>\",g" ${MANIFEST_PATH} + - > + sed -i "s,\"url\" : \"https://gitlab.gnome.org/GNOME/$PROJECT_NAME\",\"branch\" : \"<<current>>\"\,,g" ${MANIFEST_PATH} + - > + sed -i "s,\"url\" : \"https://gitlab.gnome.org/GNOME/\",\"path\" : \".\",g" ${MANIFEST_PATH} + + # Adjust the manifest to HEAD + - sed -i "s,<<ID>>,$APPID,g" ${MANIFEST_PATH} + - sed -i "s,<<current>>,origin/$CI_COMMIT_REF_NAME,g" ${MANIFEST_PATH} + + # Update the icon name + - mv data/icons/hicolor/scalable/apps/$OLD_APPID.svg data/icons/hicolor/scalable/apps/$APPID.svg + - mv data/icons/hicolor/symbolic/apps/$OLD_APPID-symbolic.svg data/icons/hicolor/symbolic/apps/$APPID-symbolic.svg + + - flatpak-builder --bundle-sources --disable-rofiles-fuse --repo=devel build ${MANIFEST_PATH} + - flatpak build-bundle devel ${BUNDLE} --runtime-repo=${RUNTIME_REPO} ${APPID} + + cache: + paths: + - .flatpak-builder/cache + when: manual + except: + - tags + - gnome-3-.* + - main@GNOME/gnome-control-center + + +# Runs the sanitizers [address, thread, undefined, and memory]. +.sanitizer: &sanitizer + extends: + - '.fdo.distribution-image@fedora' + - '.fedora.container.common' + <<: *save_build_logs + stage: manual + when: manual + script: + - *environment_information + - *build_procedure + - *run_tests + + except: + variables: + - $CI_PIPELINE_SOURCE == "schedule" + - $CI_COMMIT_TITLE =~ /^Update.*translation$/ + +# Disabled because we currently need "crun" tagged runners, see above +#asan: +# extends: +# - '.fdo.distribution-image@fedora' +# - '.fedora.container.common' +# <<: *sanitizer +# # ASAN requires debugging capabilities +# tags: [ asan ] +# stage: manual +# when: manual +# variables: +# BUILD_OPTS: "-Db_sanitize=address" +# LSAN_OPTIONS: "suppressions=${CI_PROJECT_DIR}/build-aux/ci/lsan.supp" + +tsan: + extends: + - '.fdo.distribution-image@fedora' + - '.fedora.container.common' + <<: *sanitizer + variables: + BUILD_OPTS: "-Db_sanitize=thread" + +ubsan: + extends: + - '.fdo.distribution-image@fedora' + - '.fedora.container.common' + <<: *sanitizer + variables: + BUILD_OPTS: "-Db_sanitize=undefined" + +msan: + extends: + - '.fdo.distribution-image@fedora' + - '.fedora.container.common' + <<: *sanitizer + variables: + BUILD_OPTS: "-Db_sanitize=memory" + CC: "clang" diff --git a/.gitlab/issue_templates/Bug.md b/.gitlab/issue_templates/Bug.md new file mode 100644 index 0000000..0c88a3c --- /dev/null +++ b/.gitlab/issue_templates/Bug.md @@ -0,0 +1,18 @@ +<!-- + +Not following the communication guidelines [1] will mean your issue or comment +will be removed. Read it carefully before submitting this issue. + + +[1] https://gitlab.gnome.org/GNOME/gnome-control-center/blob/main/docs/CONTRIBUTING.md#communication-guidelines + + --> + +Detailed description of the issue. Put as much information as you can, potentially +with images showing the issue. + +Steps to reproduce: + +1. Open GNOME Settings +2. Change X to something else +3. ... diff --git a/.gitlab/issue_templates/Epic.md b/.gitlab/issue_templates/Epic.md new file mode 100644 index 0000000..aa7c6a3 --- /dev/null +++ b/.gitlab/issue_templates/Epic.md @@ -0,0 +1,41 @@ +# Current problems +<!-- +What are the problems that the current project has? + +For example: +* User cannot use the keyboard to perform most common actions +or +* User cannot see documents from cloud services +--> + +# Goals & use cases +<!-- +What are the use cases that this proposal will cover? What are the end goals? + +For example: +* User needs to share a file with their friends. +or +* It should be easy to edit a picture within the app. +--> + +# Requirements +<!-- +What does the solution needs to ensure for being succesful? + +For example: +* Work on small form factors and touch +or +* Use the Meson build system and integrate with it +--> + +# Relevant art +<!-- +Is there any product that has implemented something similar? Put links to other +projects, pictures, links to other code, etc. +--> + +# Proposal & plan +<!-- What's the solution and how should be achieved? It can be split in smaller +tasks of minimum change, so they can be delivered across several releases. --> + +/label ~"1. Epic" diff --git a/.gitlab/issue_templates/Feature.md b/.gitlab/issue_templates/Feature.md new file mode 100644 index 0000000..11fc570 --- /dev/null +++ b/.gitlab/issue_templates/Feature.md @@ -0,0 +1,27 @@ +<!-- + +Not following the communication guidelines [1] will mean your issue or comment +will be removed. Read it carefully before submitting this issue. + + +[1] https://gitlab.gnome.org/GNOME/gnome-control-center/blob/main/docs/CONTRIBUTING.md#communication-guidelines + + --> + +Detailed description of the feature. Put as much information as you can. + +Proposed Mockups: + +(Add mockups of the proposed feature) + +## Design Tasks + +* [ ] design tasks + +## Development Tasks + +* [ ] development tasks + +## QA Tasks + +* [ ] qa (quality assurance) tasks |