blob: e9043c364eace5fae1058e092b3c0a3dfa0cba7e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
|
# 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.
G_MESSAGES_DEBUG: "Tracker"
TRACKER_DEBUG: ""
TRACKER_TESTS_VERBOSE: "no"
# 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:
- su tracker -c 'mkdir build'
- su tracker -c 'cd build; meson .. -Db_lto=true -Db_coverage=true'
- su tracker -c 'cd build; 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_[^=]*')
su tracker -c 'cd build; 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 "TRACKER_TESTS_VERBOSE: ${TRACKER_TESTS_VERBOSE}"
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
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
coverity:
stage: analysis
image: registry.gitlab.gnome.org/gnome/tracker-oci-images/amd64/fedora:latest
allow_failure: true
script:
- dnf install -y clang
- su tracker -c 'curl https://scan.coverity.com/download/linux64 --data "token=$COVERITY_TOKEN&project=Tracker" --output /tmp/coverity_tool.tgz'
- su tracker -c 'tar zxf /tmp/coverity_tool.tgz'
- su tracker -c 'mkdir coverity-build'
- su tracker -c 'export CC=clang; cd coverity-build; meson ..'
- su tracker -c 'cd coverity-build; ../cov-analysis-linux64-*/bin/cov-build --dir cov-int ninja'
- su tracker -c 'cd coverity-build; tar czf cov-int.tar.gz cov-int'
- su tracker -c 'curl https://scan.coverity.com/builds?project=Tracker
--form token=$COVERITY_TOKEN --form email=carlosg@gnome.org
--form file=@coverity-build/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.
- su tracker -w install_prefix -c 'mkdir build; cd build; meson .. --prefix="$install_prefix"; ninja install'
# Build tracker-miners and install any documentation from there as well.
- su tracker -w install_prefix -c '.gitlab-ci/checkout-tracker-miners.sh'
- su tracker -w install_prefix -c 'cd extra/tracker-miners; mkdir build; cd build; env PKG_CONFIG_PATH="$install_prefix/lib64/pkgconfig" meson .. --prefix="$install_prefix"; ninja install'
# 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.*$/
|