63 lines
1.9 KiB
YAML
63 lines
1.9 KiB
YAML
stages:
|
|
- build
|
|
- test
|
|
|
|
.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 glib2-devel intltool
|
|
gcc-c++ libuuid-devel parted-devel gtkmm30-devel make
|
|
polkit file
|
|
|
|
.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 libglib2.0-dev-bin
|
|
uuid-dev libparted-dev libgtkmm-3.0-dev make
|
|
policykit-1
|
|
|
|
.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
|