summaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
blob: 3668e753efdf58e0749c9aba466c2d90625d5df6 (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
image: fedora:33

stages:
  - build

before_script:
  - dnf install -y gcc gettext git glib2-devel gobject-introspection-devel gtk-doc meson ninja-build redhat-rpm-config

build-json-glib:
  stage: build
  script:
    - meson setup --prefix /usr -Dman=true _build .
    - meson compile -C _build
    - meson test -C _build
  except:
    - tags
  artifacts:
    when: on_failure
    name: "json-glib-${CI_COMMIT_REF_NAME}"
    paths:
      - "${CI_PROJECT_DIR}/_build/meson-logs"

dist-json-glib:
  stage: build
  only:
    - tags
  script:
    - meson setup --prefix /usr --buildtype release -Dman=true -Dgtk_doc=enabled_build .
    - meson compile -C _build
    - meson dist -C _build
    - ninja -C _build json-glib-doc
    - tar -c -f "json-glib-docs-${CI_COMMIT_TAG}.tar.xz" -C docs html
  artifacts:
    paths:
      - "${CI_PROJECT_DIR}/_build/json-glib-docs-${CI_COMMIT_TAG}.tar.xz"
      - "${CI_PROJECT_DIR}/_build/meson-dist/json-glib-*.tar.xz"