# The container images used in this pipeline are built from this # GitLab project: https://gitlab.gnome.org/GNOME/tracker-oci-images variables: # These can be used to see verbose log output from the functional-tests. # See HACKING.md for more information. TRACKER_DEBUG: "" # This can be used when debugging test failures that only occur within GitLab CI. MESON_TEST_EXTRA_ARGS: "" stages: - test - analysis - website .test_template: &test stage: test script: - mkdir build - cd build - meson .. -Db_lto=true -Db_coverage=true -Dsystemd_user_services=false -Dtests_tap_protocol=true - ninja - | # Remove the many "CI_" variables from the environment. Meson dumps the # whole environment for every failed test, and that gives a whole # screenful of junk each time unless we strip these. unset $(env|grep -o '^CI_[^=]*') env LANG=C.UTF-8 LC_ALL=C.UTF-8 dbus-run-session eatmydata meson test --print-errorlogs ${MESON_TEST_EXTRA_ARGS} after_script: - | echo "Distribution: " echo egrep '^NAME=|^VERSION=' /etc/os-release echo echo "Test suite settings:" echo echo "G_MESSAGES_DEBUG: ${G_MESSAGES_DEBUG}" echo "TRACKER_DEBUG: ${TRACKER_DEBUG}" echo "MESON_TEST_EXTRA_ARGS: ${MESON_TEST_EXTRA_ARGS}" echo echo "These values can be set at https://gitlab.gnome.org/GNOME/tracker/pipelines/new" artifacts: when: always paths: - build/meson-logs/testlog.txt reports: junit: "build/meson-logs/testlog.junit.xml" test-alpine-edge: image: registry.gitlab.gnome.org/gnome/tracker-oci-images/amd64/alpine:edge <<: *test test-fedora-latest: image: registry.gitlab.gnome.org/gnome/tracker-oci-images/amd64/fedora:latest <<: *test test-ubuntu-rolling: image: registry.gitlab.gnome.org/gnome/tracker-oci-images/amd64/ubuntu:rolling <<: *test test-fedora-rawhide: image: registry.gitlab.gnome.org/gnome/tracker-oci-images/amd64/fedora:rawhide <<: *test coverage-analysis: stage: analysis image: registry.gitlab.gnome.org/gnome/tracker-oci-images/amd64/fedora:latest allow_failure: true script: - mkdir -p coverage-build/coveragereport - cd coverage-build - meson .. -Db_lto=true -Db_coverage=true - ninja - env LANG=C.UTF-8 LC_ALL=C.UTF-8 dbus-run-session eatmydata meson test --print-errorlogs ${MESON_TEST_EXTRA_ARGS} - gcovr --html-details --print-summary --root=.. --exclude=../docs/reference --exclude=../tests --exclude=../utils --exclude=../examples --output coveragereport/index.html coverage: '/^lines: (\d+\.\d+\%)/' artifacts: when: always paths: - coverage-build/coveragereport coverity: stage: analysis image: registry.gitlab.gnome.org/gnome/tracker-oci-images/amd64/fedora:latest allow_failure: true script: - curl https://scan.coverity.com/download/linux64 --data "token=$COVERITY_TOKEN&project=Tracker" --output /tmp/coverity_tool.tgz - tar zxf /tmp/coverity_tool.tgz - mkdir coverity-build - cd coverity-build - env CC=clang meson .. - ../cov-analysis-linux64-*/bin/cov-build --dir cov-int ninja - tar czf cov-int.tar.gz cov-int - curl https://scan.coverity.com/builds?project=Tracker --form token=$COVERITY_TOKEN --form email=carlosg@gnome.org --form file=@cov-int.tar.gz --form version="`git describe --tags`" --form description="gitlab CI build" only: - master pages: stage: website image: registry.gitlab.gnome.org/gnome/tracker-oci-images/amd64/fedora:latest dependencies: [] before_script: - pip3 install beautifulsoup4 mkdocs mkdocs-cinder script: - export install_prefix="$(pwd)/tracker-install" # Build tracker and install. - mkdir build; pushd build; meson .. --prefix="$install_prefix"; ninja install; popd # Build tracker-miners and install any documentation from there as well. - .gitlab-ci/checkout-tracker-miners.sh - pushd extra/tracker-miners; mkdir build; pushd build; env PKG_CONFIG_PATH="$install_prefix/lib64/pkgconfig" meson .. --prefix="$install_prefix"; ninja install; popd; popd # Generate the website using mkdocs. - | export tracker_commit=$CI_COMMIT_SHA export tracker_miners_commit=$(git -C ./extra/tracker-miners rev-parse HEAD) ./docs/website/build.py --api-docs="$install_prefix/share/gtk-doc/html" --tracker-commit=${tracker_commit} --man-pages ./docs/manpages/*.txt ./extra/tracker-miners/docs/manpages/*.txt artifacts: paths: - public only: - master - /^sam\/website.*$/