diff options
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r-- | .gitlab-ci.yml | 83 |
1 files changed, 51 insertions, 32 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8f08b606..5eec8941 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,23 +1,35 @@ -image: fedora:rawhide +image: registry.gitlab.gnome.org/gnome/gnome-settings-daemon:fedora.dev stages: - build - test - - deploy -variables: - DEPENDENCIES: alsa-lib-devel colord-devel cups-devel fontconfig-devel geoclue2-devel geocode-glib-devel - gettext git glib2-devel gnome-desktop3-devel gnome-session gobject-introspection - gsettings-desktop-schemas-devel gtk3-devel lcms2-devel libcanberra-devel libgtop2-devel - libgudev-devel libgweather-devel libnotify-devel librsvg2-devel libX11-devel libXi-devel - libwacom-devel meson NetworkManager-libnm-devel nss-devel perl-interpreter - polkit-devel pulseaudio-libs-devel pygobject3 python3-dbusmock upower-devel wayland-devel - which xorg-x11-drv-wacom-devel xorg-x11-server-Xvfb xorg-x11-utils mutter - mesa-dri-drivers umockdev libcanberra-gtk3 +.Log files: &log_files [./*.log, _build/meson-logs/] +.Build logs: &save_build_logs + artifacts: + name: log + when: always + paths: *log_files -before_script: - - dnf update -y --nogpgcheck && dnf install -y --nogpgcheck $DEPENDENCIES +.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} && + ninja -C _build 2>&1 | tee compilation.log + +.Run Tests: &run_tests + echo "== Testing ==" && + ninja -C _build test ## # Stage: Build @@ -27,12 +39,21 @@ before_script: # any of them. ## build: + <<: *save_untracked_files stage: build + script: - - meson . _build - - ninja -C _build + - *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 ## # Stage: Test @@ -40,24 +61,22 @@ build: # Runs the unit tests. ## test: + <<: *save_build_logs stage: test - script: - - meson . _build - - ninja -C _build - - meson test -C _build --verbose --no-stdsplit + dependencies: + - build -## -# Stage: Deploy -# -# Checks if the released version is in a good shape. -## -deploy: - stage: deploy script: - - meson . _build - - ninja -C _build - - meson test -C _build --verbose - - ninja dist -C _build - only: - - tags + - *environment_information + + - | + if [[ -n "${CI_COMMIT_TAG}" ]]; then + *run_tests + + echo "== Distro Test ==" + ninja dist -C _build + else + echo "== Testing ==" + meson test -C _build --verbose --no-stdsplit + fi |