.gitlab-ci.yml 1.65 KB
Newer Older
1 2 3
stages:
  - build

4 5 6 7 8
before_script:
  - apt-get -y update
  - apt-get -y install build-essential libgtk-3-doc lcov
  - apt-get -y build-dep .

9
.tags: &tags
10 11
  tags:
    - librem5
12 13 14 15

build-debian-gcc:
  image: debian:buster
  <<: *tags
16 17 18
  stage: build
  script:
    - export LC_ALL=C.UTF-8
19
    - meson . _build -Dgtk_doc=true -Db_coverage=true --werror
20
    - ninja -C _build
Guido Günther's avatar
Guido Günther committed
21
    - ninja -C _build meson-libhandy-doc 2>&1 | tee _build/doc/buildlog
22
    - if grep -qs 'warning' _build/doc/buildlog; then exit 1; fi
23
    - xvfb-run ninja -C _build test
24 25 26 27 28 29
    - ninja -C _build coverage
  coverage: '/^\s+lines\.+:\s+([\d.]+\%)\s+/'
  artifacts:
    when: always
    paths:
      - _build
30

31 32 33 34
build-debian-clang:
  image: debian:buster
  before_script:
    - apt-get -y update
35
    - apt-get -y install build-essential clang-tools
36
    - apt-get -y build-dep .
37
  <<: *tags
38 39 40 41 42 43 44 45 46 47 48 49 50
  stage: build
  script:
    - export LC_ALL=C.UTF-8
    - meson . _build
    # With meson 0.49 we can do
    # SCANBUILD="scan-build --status-bugs" ninja scan-build
    # https://github.com/mesonbuild/meson/commit/1e7aea65e68a43b0319a4a28908daddfec621548
    - ninja -C _build scan-build
  artifacts:
    when: always
    paths:
      - _build/meson-logs/scanbuild

51 52 53 54 55 56 57 58 59 60 61 62 63
build-fedora-gcc:
  image: fedora:29
  <<: *tags
  stage: build
  before_script:
    - dnf -y update
    - dnf -y install @development-tools redhat-rpm-config dnf-plugins-core
    - dnf -y builddep data/packaging/rpm/libhandy.spec
  script:
    - export LC_ALL=C.UTF-8
    - meson . _build -Dgtk_doc=true -Db_coverage=true --werror
    - ninja -C _build

64 65
build-debian-package:
  image: debian:buster
66
  <<: *tags
67 68 69
  stage: build
  script:
    - dpkg-buildpackage -uc -us