summaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
blob: 8c1b9472ba25d07baf7061b5f78ef5600d4e8320 (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
# The container images used in this pipeline are built from this
# GitLab project: https://gitlab.gnome.org/GNOME/tracker-oci-images
#
# This CI config is based on https://gitlab.gnome.org/GNOME/tracker/-/blob/master/.gitlab-ci.yml

variables:
  G_MESSAGES_DEBUG: "libmediaart"
  # This can be used when debugging test failures that only occur within GitLab CI.
  MESON_TEST_EXTRA_ARGS: ""

stages:
  - test

.test_template: &test
  stage: test

  script:
    - meson setup _build .
    - meson compile -C _build
    - |
      # 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 meson test -C _build --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 "MESON_TEST_EXTRA_ARGS: ${MESON_TEST_EXTRA_ARGS}"
      echo
      echo "These values can be set at https://gitlab.gnome.org/GNOME/libmediaart/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