gparted/.gitlab-ci.yml

75 lines
2.5 KiB
YAML

stages:
- build
- test
.centos_image_template: &centos_image_definition
# Use official CentOS image https://hub.docker.com/_/centos/.
image: centos:centos7
before_script:
- yum update -y
- yum install -y which gnome-common yelp-tools glib2-devel intltool
gcc-c++ libuuid-devel parted-devel gtkmm30-devel make
polkit file
# Extra packages only needed during the test stage.
# Install EPEL repo first for f2fs-tools and ntfsprogs.
- yum install -y epel-release
- yum install -y btrfs-progs e2fsprogs f2fs-tools dosfstools mtools
hfsplus-tools util-linux cryptsetup device-mapper lvm2
ntfsprogs udftools xfsprogs xfsdump
xorg-x11-server-Xvfb
- cat /etc/os-release
.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 yelp-tools libglib2.0-dev-bin
uuid-dev libparted-dev libgtkmm-3.0-dev make
policykit-1
# Extra packages only needed during the test stage.
- apt-get install -y btrfs-progs e2fsprogs f2fs-tools dosfstools mtools
hfsutils hfsprogs jfsutils util-linux cryptsetup-bin
dmsetup lvm2 nilfs-tools ntfs-3g reiser4progs
reiserfsprogs udftools xfsprogs xfsdump xvfb
- cat /etc/os-release
.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
- 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