2018-06-22 03:31:33 -06:00
|
|
|
stages:
|
|
|
|
- build
|
2018-06-22 05:56:01 -06:00
|
|
|
- test
|
2018-06-22 03:31:33 -06:00
|
|
|
|
2018-06-23 06:28:57 -06:00
|
|
|
.centos_image_template: ¢os_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
|
2018-07-24 14:56:06 -06:00
|
|
|
polkit file rarian-compat
|
2018-06-23 06:28:57 -06:00
|
|
|
|
2018-06-23 06:47:43 -06:00
|
|
|
.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
|
2018-07-24 14:56:06 -06:00
|
|
|
policykit-1 rarian-compat
|
2018-06-23 06:47:43 -06:00
|
|
|
|
2018-06-23 06:28:57 -06:00
|
|
|
.build_stage_template: &build_stage_definition
|
2018-06-22 03:31:33 -06:00
|
|
|
stage: build
|
|
|
|
script:
|
|
|
|
- ./autogen.sh
|
2018-07-06 00:35:10 -06:00
|
|
|
- nproc=`grep -c '^processor' /proc/cpuinfo` || nproc=1
|
|
|
|
- echo nproc=$nproc
|
|
|
|
- make -j $nproc
|
2018-06-22 03:31:33 -06:00
|
|
|
- make install
|
2018-06-22 05:56:01 -06:00
|
|
|
|
2018-06-23 06:28:57 -06:00
|
|
|
.test_stage_template: &test_stage_definition
|
2018-06-22 05:56:01 -06:00
|
|
|
stage: test
|
|
|
|
script:
|
|
|
|
- ./autogen.sh
|
2018-07-06 00:35:10 -06:00
|
|
|
- nproc=`grep -c '^processor' /proc/cpuinfo` || nproc=1
|
|
|
|
- echo nproc=$nproc
|
2018-07-24 14:56:06 -06:00
|
|
|
# Prevent xmllint fetching scrollkeeper DTD file remotely.
|
|
|
|
- sed -i '/xmllint.*http.*scrollkeeper-omf.dtd/s|xmllint |xmllint --nonet |' help/Makefile
|
2018-07-06 00:35:10 -06:00
|
|
|
- make -j $nproc
|
2018-06-22 08:27:29 -06:00
|
|
|
# Exclude specific unit test which fails without /dev/disk in Docker images.
|
|
|
|
- export GTEST_FILTER='-BlockSpecialTest.NamedBlockSpecialObjectBySymlinkMatches'
|
2018-06-22 05:56:01 -06:00
|
|
|
- make check
|
2018-07-06 04:28:55 -06:00
|
|
|
- make distcheck
|
2018-06-23 06:28:57 -06:00
|
|
|
|
2018-06-23 06:47:43 -06:00
|
|
|
# Check GParted can be built and installed on CentOS and Ubuntu.
|
2018-06-23 06:28:57 -06:00
|
|
|
centos_build:
|
|
|
|
<<: *centos_image_definition
|
|
|
|
<<: *build_stage_definition
|
|
|
|
|
2018-06-23 06:47:43 -06:00
|
|
|
ubuntu_build:
|
|
|
|
<<: *ubuntu_image_definition
|
|
|
|
<<: *build_stage_definition
|
|
|
|
|
2018-06-24 06:51:21 -06:00
|
|
|
# Check GParted unit tests and distcheck pass on CentOS and Ubuntu.
|
2018-06-23 06:28:57 -06:00
|
|
|
centos_test:
|
|
|
|
<<: *centos_image_definition
|
|
|
|
<<: *test_stage_definition
|
2018-06-24 06:51:21 -06:00
|
|
|
|
|
|
|
ubuntu_test:
|
|
|
|
<<: *ubuntu_image_definition
|
|
|
|
<<: *test_stage_definition
|