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
|
2019-02-23 03:39:57 -07:00
|
|
|
- yum install -y which gnome-common yelp-tools glib2-devel intltool
|
2018-08-27 11:58:56 -06:00
|
|
|
gcc-c++ libuuid-devel parted-devel gtkmm30-devel make
|
2019-02-21 09:30:03 -07:00
|
|
|
polkit file
|
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
|
2019-02-23 03:39:57 -07:00
|
|
|
- apt-get install -y gnome-common yelp-tools libglib2.0-dev-bin
|
2018-08-27 11:58:56 -06:00
|
|
|
uuid-dev libparted-dev libgtkmm-3.0-dev make
|
2019-02-21 09:30:03 -07:00
|
|
|
policykit-1
|
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
|
|
|
|
- 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
|