<commit_before>image: debian:unstable

before_script:
  - apt update -qq
  - apt install -y -qq build-essential meson pkg-config gtk-doc-tools
                       libxml2-utils gobject-introspection dbus dbus-x11
                       libdbus-1-dev libgirepository1.0-dev libglib2.0-dev
                       bash-completion lcov valac
  - export LANG=C.UTF-8

stages:
  - build
  - test
  - deploy

variables:
  MESON_TEST_TIMEOUT_MULTIPLIER: 2

build-job:
  stage: build
  script:
    - meson --buildtype debug --werror _build .
    - ninja -C _build
  except:
    - tags
  artifacts:
    when: on_failure
    name: "dconf-_${CI_COMMIT_REF_NAME}"
    paths:
      - "_build/meson-logs"

test:
  stage: test
  script:
    - meson _build . -Db_coverage=true
    - ninja -C _build
    - mkdir -p _coverage
    - lcov --rc lcov_branch_coverage=1 --directory _build --capture --initial --output-file "_coverage/${CI_JOB_NAME}-baseline.lcov"
    - meson test -C _build --timeout-multiplier ${MESON_TEST_TIMEOUT_MULTIPLIER}
    - lcov --rc lcov_branch_coverage=1 --directory _build --capture --output-file "_coverage/${CI_JOB_NAME}.lcov"
  coverage: '/^\s+lines\.+:\s+([\d.]+\%)\s+/'
  except:
    - tags
  artifacts:
    when: on_failure
    name: "dconf-_${CI_COMMIT_REF_NAME}"
    paths:
      - "_build/meson-logs"
      - "_coverage"

# FIXME: Run gtkdoc-check when we can. See:
# https://github.com/mesonbuild/meson/issues/3580

dist-job:
  stage: build
  only:
    - tags
  script:
    - meson --buildtype release _build .
    - ninja -C _build dist
  artifacts:
    paths:
      - "_build/meson-dist/dconf-*.tar.xz"

pages:
  stage: deploy
  only:
    - master
  script:
    - meson -Denable-gtk-doc=true _build .
    - ninja -C _build dconf-doc
    - mkdir -p public/
    - mv _build/docs/html/ public/docs/
    - mv _coverage/ public/coverage/
  artifacts:
    paths:
      - public<commit_msg>Correct the meson option to build gtk docs, also enable man pages and gtk docs in the build and test stage to catch errors earlier<commit_after>image: debian:unstable

before_script:
  - apt update -qq
  - apt install -y -qq build-essential meson pkg-config gtk-doc-tools
                       libxml2-utils gobject-introspection dbus dbus-x11
                       libdbus-1-dev libgirepository1.0-dev libglib2.0-dev
                       bash-completion lcov valac
  - export LANG=C.UTF-8

stages:
  - build
  - test
  - deploy

variables:
  MESON_TEST_TIMEOUT_MULTIPLIER: 2

build-job:
  stage: build
  script:
    - meson -Db_coverage=true -Dman=true -Dgtk_doc=true --buildtype debug --werror _build .
    - ninja -C _build all dconf-doc
  except:
    - tags
  artifacts:
    when: on_failure
    name: "dconf-_${CI_COMMIT_REF_NAME}"
    paths:
      - "_build/meson-logs"

test:
  stage: test
  script:
    - meson _build . -Db_coverage=true -Dman=true -Dgtk_doc=true
    - ninja -C _build all dconf-doc
    - mkdir -p _coverage
    - lcov --rc lcov_branch_coverage=1 --directory _build --capture --initial --output-file "_coverage/${CI_JOB_NAME}-baseline.lcov"
    - meson test -C _build --timeout-multiplier ${MESON_TEST_TIMEOUT_MULTIPLIER}
    - lcov --rc lcov_branch_coverage=1 --directory _build --capture --output-file "_coverage/${CI_JOB_NAME}.lcov"
  coverage: '/^\s+lines\.+:\s+([\d.]+\%)\s+/'
  except:
    - tags
  artifacts:
    when: on_failure
    name: "dconf-_${CI_COMMIT_REF_NAME}"
    paths:
      - "_build/meson-logs"
      - "_coverage"

# FIXME: Run gtkdoc-check when we can. See:
# https://github.com/mesonbuild/meson/issues/3580

dist-job:
  stage: build
  only:
    - tags
  script:
    - meson --buildtype release _build .
    - ninja -C _build dist
  artifacts:
    paths:
      - "_build/meson-dist/dconf-*.tar.xz"

pages:
  stage: deploy
  only:
    - master
  script:
    - meson -Dgtk_doc=true _build .
    - ninja -C _build dconf-doc
    - mkdir -p public/
    - mv _build/docs/html/ public/docs/
    - mv _coverage/ public/coverage/
  artifacts:
    paths:
      - public
{'fraction_non_alphanumeric': 0.11977091633466136, 'fraction_numerical': 0.00796812749003984, 'mean_word_length': 2.28992628992629, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5849461', 'n_tokens_mistral': 1515, 'n_tokens_neox': 1474, 'n_words': 336}