.gitlab-ci.yml 1.96 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 -s -noreset 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 35 36 37 38 39
build-debian-gcc-static:
  image: debian:buster
  <<: *tags
  stage: build
  script:
    - export LC_ALL=C.UTF-8
    - meson . _build -Dintrospection=disabled -Dstatic=true -Dgtk_doc=false --werror
    - ninja -C _build
    - test -f _build/src/libhandy-0.0.a
40
    - xvfb-run -s -noreset ninja -C _build test
41

42 43 44 45
build-debian-clang:
  image: debian:buster
  before_script:
    - apt-get -y update
46
    - apt-get -y install build-essential clang-tools
47
    - apt-get -y build-dep .
48
  <<: *tags
49 50 51 52 53 54 55 56 57 58 59 60 61
  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

62 63 64 65 66 67 68 69 70 71 72 73 74
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

75 76
build-debian-package:
  image: debian:buster
77
  <<: *tags
78 79 80
  stage: build
  script:
    - dpkg-buildpackage -uc -us