stages: - build - deploy variables: DEPENDENCIES: dbus-daemon diffutils gcc gi-docgen libsecret-devel meson ninja-build openssh openssh-clients python redhat-rpm-config systemd-devel gtk4-devel fedora:Werror: image: fedora:latest stage: build before_script: - dnf upgrade -y - dnf install -y 'dnf-command(builddep)' $DEPENDENCIES - dnf builddep -y gcr script: - meson _build -Dwerror=true -Dc_args=-Wno-error=deprecated-declarations -Dgtk_doc=false - meson compile -C _build - dbus-run-session -- meson test -C _build artifacts: reports: junit: "_build/meson-logs/testlog.junit.xml" name: "gcr-werror-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}" when: always paths: - "_build/config.h" - "_build/meson-logs" fedora:asan: image: fedora:latest stage: build tags: - asan # LSAN needs CAP_SYS_PTRACE before_script: - dnf upgrade -y - dnf install -y 'dnf-command(builddep)' $DEPENDENCIES libasan - dnf builddep -y gcr script: - meson _build -Db_sanitize=address -Dgtk_doc=false - export G_SLICE=always-malloc G_DEBUG=gc-friendly ASAN_OPTIONS=abort_on_error=1:fast_unwind_on_malloc=0 - dbus-run-session -- meson test -C _build allow_failure: true artifacts: name: "gcr-asan-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}" when: always reports: junit: "_build/meson-logs/testlog.junit.xml" paths: - "_build/config.h" - "_build/meson-logs" fedora:ubsan: image: fedora:latest stage: build before_script: - dnf upgrade -y - dnf install -y 'dnf-command(builddep)' $DEPENDENCIES libubsan - dnf builddep -y gcr script: - meson _build -Db_sanitize=undefined -Dgtk_doc=false - dbus-run-session -- meson test -C _build artifacts: name: "gcr-ubsan-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}" when: always reports: junit: "_build/meson-logs/testlog.junit.xml" paths: - "_build/config.h" - "_build/meson-logs" fedora:coverage: image: fedora:latest stage: build before_script: - dnf upgrade -y - dnf install -y 'dnf-command(builddep)' $DEPENDENCIES lcov git gi-docgen gcovr - dnf builddep -y gcr script: - meson _build -Db_coverage=true - dbus-run-session -- meson test -C _build - ninja coverage-html -C _build - ninja coverage-xml -C _build - ninja docs -C _build coverage: '/^\s+lines.+:\s+([\d.]+\%)\s+/' artifacts: name: "gcr-coverage-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}" when: always reports: junit: "_build/meson-logs/testlog.junit.xml" coverage_report: coverage_format: cobertura path: "_build/meson-logs/coverage.xml" paths: - "_build/config.h" - "_build/meson-logs" - "_build/docs" - "_build/meson-logs/coveragereport" pages: image: fedora:latest stage: deploy only: - master needs: ['fedora:coverage'] before_script: - dnf upgrade -y - dnf install -y curl unzip script: - mkdir public - 'curl --location --output gcr-3.zip "https://gitlab.gnome.org/api/v4/projects/${CI_PROJECT_ID}/jobs/artifacts/gnome-41-ci/download?job=fedora:coverage&job_token=${CI_JOB_TOKEN}"' - unzip -q gcr-3.zip -d gcr-3 - mv gcr-3/_build/docs/gck/gck-1 public/gck-1 - mv gcr-3/_build/docs/gcr/gcr-3 public/gcr-3 - mv gcr-3/_build/docs/ui/gcr-ui-3 public/gcr-ui-3 - mv _build/meson-logs/coveragereport public/coverage - mv _build/docs/gck/gck-2 public/gck-2 - mv _build/docs/gcr/gcr-4 public/gcr-4 artifacts: when: on_success paths: - public