summaryrefslogtreecommitdiffstats
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 17:57:27 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 17:57:27 +0000
commit6f0f7d1b40a8fa8d46a2d6f4317600001cdbbb18 (patch)
treed423850ae901365e582137bdf2b5cbdffd7ca266 /.gitlab-ci.yml
parentInitial commit. (diff)
downloadgnome-software-6f0f7d1b40a8fa8d46a2d6f4317600001cdbbb18.tar.xz
gnome-software-6f0f7d1b40a8fa8d46a2d6f4317600001cdbbb18.zip
Adding upstream version 43.5.upstream/43.5upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml105
1 files changed, 105 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000..937cc34
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,105 @@
+include: 'https://gitlab.gnome.org/GNOME/citemplates/raw/HEAD/flatpak/flatpak_ci_initiative.yml'
+
+stages:
+ - build
+ - deploy
+
+cache:
+ paths:
+ - _ccache/
+
+variables:
+ MESON_TEST_TIMEOUT_MULTIPLIER: 4
+ G_MESSAGES_DEBUG: all
+ MESON_COMMON_OPTIONS: "--buildtype debug --wrap-mode=nodownload --prefix /usr -Dsoup2=true -Dwebapps=true -Dhardcoded_foss_webapps=false -Dhardcoded_proprietary_webapps=false"
+ BUNDLE: "gnome-software-dev.flatpak"
+
+.build:
+ before_script:
+ - cp -r $HOME/subprojects/* subprojects/
+
+fedora-x86_64:
+ extends: .build
+ image: registry.gitlab.gnome.org/gnome/gnome-software/fedora:v10
+ stage: build
+ except:
+ - tags
+ script:
+ - meson ${MESON_COMMON_OPTIONS}
+ -Drpm_ostree=true
+ -Dmalcontent=true
+ -Dsysprof=enabled
+ _build
+ - ninja -C _build
+ - .gitlab-ci/run-tests.sh
+ --no-suite packagekit
+ --no-suite fwupd
+ --no-suite libglib-testing
+ --no-suite malcontent
+ artifacts:
+ reports:
+ junit: "_build/${CI_JOB_NAME}-report.xml"
+ name: "gnome-software-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
+ when: always
+ paths:
+ - "_build/config.h"
+ - "_build/meson-logs"
+ - "_build/${CI_JOB_NAME}-report.xml"
+
+debian-stable-x86_64:
+ extends: .build
+ image: registry.gitlab.gnome.org/gnome/gnome-software/debian-stable:v9
+ stage: build
+ except:
+ - tags
+ script:
+ - meson ${MESON_COMMON_OPTIONS}
+ -Drpm_ostree=false
+ -Dmalcontent=false
+ -Dsysprof=disabled
+ _build
+ - ninja -C _build
+ - .gitlab-ci/run-tests.sh
+ --no-suite packagekit
+ --no-suite fwupd
+ --no-suite fedora-langpacks
+ --no-suite libxmlb
+ artifacts:
+ reports:
+ junit: "_build/${CI_JOB_NAME}-report.xml"
+ name: "gnome-software-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
+ when: always
+ paths:
+ - "_build/config.h"
+ - "_build/meson-logs"
+ - "_build/${CI_JOB_NAME}-report.xml"
+
+# Allow building a flatpak on demand to test out the gnome-software UI
+flatpak bundle:
+ extends: '.flatpak'
+ stage: 'build'
+ dependencies: []
+ variables:
+ MANIFEST_PATH: "contrib/org.gnome.SoftwareDevel.json"
+ FLATPAK_MODULE: "gnome-software"
+ RUNTIME_REPO: "https://nightly.gnome.org/gnome-nightly.flatpakrepo"
+ APP_ID: "org.gnome.SoftwareDevel"
+ when: manual
+ allow_failure: true
+ script:
+ # Modified from https://gitlab.gnome.org/GNOME/citemplates/-/blob/HEAD/flatpak/flatpak_ci_initiative.yml
+ # to drop the unit tests, since we don’t need them
+ - rewrite-flatpak-manifest ${MANIFEST_PATH} ${FLATPAK_MODULE} ${CONFIG_OPTS}
+ - flatpak-builder --user --disable-rofiles-fuse flatpak_app --repo=repo ${BRANCH:+--default-branch=$BRANCH} ${MANIFEST_PATH}
+ # Generate a Flatpak bundle
+ - flatpak build-bundle repo ${BUNDLE} --runtime-repo=${RUNTIME_REPO} ${APP_ID} ${BRANCH}
+ - tar cf repo.tar repo/
+
+# Due to the `only` clause in .publish_nightly, this will only publish on-demand
+# builds to nightly.gnome.org if they are built from a commit on `main`
+nightly:
+ extends: '.publish_nightly'
+ dependencies:
+ - 'flatpak bundle'
+ needs: ['flatpak bundle']
+ when: manual