~vcs-imports/gparted/master

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
stages:
  - build
  - test

.centos_image_template: &centos_image_definition
  # Use official CentOS image https://hub.docker.com/_/centos/.
  image: centos:latest
  before_script:
    - yum update -y
    - yum install -y which gnome-common gnome-doc-utils glib2-devel intltool
                     gcc-c++ libuuid-devel parted-devel gtkmm24-devel make
                     polkit file rarian-compat

.ubuntu_image_template: &ubuntu_image_definition
  # Use official Ubuntu image https://hub.docker.com/_/ubuntu/.
  image: ubuntu:latest
  before_script:
    - apt-get update
    - apt-get install -y gnome-common gnome-doc-utils libglib2.0-dev-bin
                         uuid-dev libparted-dev libgtkmm-2.4-dev make
                         policykit-1 rarian-compat

.build_stage_template: &build_stage_definition
  stage: build
  script:
    - ./autogen.sh
    - nproc=`grep -c '^processor' /proc/cpuinfo` || nproc=1
    - echo nproc=$nproc
    - make -j $nproc
    - make install

.test_stage_template: &test_stage_definition
  stage: test
  script:
    - ./autogen.sh
    - nproc=`grep -c '^processor' /proc/cpuinfo` || nproc=1
    - echo nproc=$nproc
    # Prevent xmllint fetching scrollkeeper DTD file remotely.
    - sed -i '/xmllint.*http.*scrollkeeper-omf.dtd/s|xmllint |xmllint --nonet |' help/Makefile
    - make -j $nproc
    # Exclude specific unit test which fails without /dev/disk in Docker images.
    - export GTEST_FILTER='-BlockSpecialTest.NamedBlockSpecialObjectBySymlinkMatches'
    - make check
    - make distcheck

# Check GParted can be built and installed on CentOS and Ubuntu.
centos_build:
  <<: *centos_image_definition
  <<: *build_stage_definition

ubuntu_build:
  <<: *ubuntu_image_definition
  <<: *build_stage_definition

# Check GParted unit tests and distcheck pass on CentOS and Ubuntu.
centos_test:
  <<: *centos_image_definition
  <<: *test_stage_definition

ubuntu_test:
  <<: *ubuntu_image_definition
  <<: *test_stage_definition