summaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
blob: 22edb06ec25104ed24e22189f1812ccf22617126 (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
image: registry.gitlab.gnome.org/gnome/gtk-doc/debian:v2

stages:
  - build
  - test
  - deploy

# autotools

autotools-build:
  stage: build
  script:
    - ./autogen.sh --prefix=/usr
    - make
    - make dist
  except:
    - tags
  artifacts:
    paths:
      - gtk-doc-*.tar.*

autotools-test:
  stage: test
  script:
    - ./autogen.sh --prefix=/usr
    - make check
    - make -C tests coverage
  coverage: '/^TOTAL\s+\d+\s+\d+\s+([\d.]+\%)/'
  artifacts:
    when: on_failure
    name: "gtkdoc-testing-_${CI_COMMIT_REF_NAME}"
    paths:
      - "${CI_PROJECT_DIR}/tests/test-suite.log"

# meson

meson-build:
  stage: build
  script:
    - find . -name .git -prune -o -print | LC_ALL=C sort -u > git-filelist.txt
    - meson --prefix /usr _build .
    - ninja -C _build
    - meson test -C _build
  except:
    - tags
  artifacts:
    when: always
    paths:
      - _build/meson-logs/*
      - git-filelist.txt

meson-from-tarball:
  stage: test
  dependencies:
    - autotools-build
  variables:
    GIT_STRATEGY: none
  script:
    - tar -xvf gtk-doc-*.tar.*
    - ( cd gtk-doc-*/; find . -name .git -prune -o -print ) | LC_ALL=C sort -u > tar-filelist.txt
    - ( cd gtk-doc-*/; meson --prefix /usr ../_build . )
    - ninja -C _build
    - meson test -C _build
  artifacts:
    when: on_failure
    paths:
      - _build/meson-logs/*.log
      - tar-filelist.txt

# common

pages:
  stage: deploy
  only:
    - master
  script:
    - ./autogen.sh --prefix=/usr
    - make
    - make -C tests coverage
    - mkdir -p public/
    - mv tests/htmlcov public/
  artifacts:
    paths:
      - public