gparted/.gitlab-ci.yml
Mike Fleetwood 19ba6df8f0 Add /dev/disk/by-id/ symlink in CI for test_BlockSpecial
This previous commit [1] excluded unit test
BlockSpecialTest.NamedBlockSpecialObjectBySymlinkMatches because GNOME
GitLab Docker CI images don't have /dev/disk hierarchy and so no
symbolic links to block devices.

Create the /dev/disk/by-id directory and a symlink for this unit test to
use in the new tests/makedev.sh script.

[1] fe2fc33e67
    Exclude unit test which fails in Docker CI image (!4)
2020-03-14 15:31:37 +00:00

110 lines
4.2 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 kmod
- 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 kmod
- 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
# Save all files on job failure for investigation.
artifacts:
when: on_failure
name: "$CI_PROJECT_NAME-ci-job-$CI_JOB_ID-$CI_JOB_NAME"
untracked: true
paths:
- ./
expire_in: 1 week
.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 tests which fail without being able to create
# loop devices in Docker images.
- export GTEST_FILTER='-My/SupportedFileSystemsTest.Create/lvm2pv'
- GTEST_FILTER+=':My/SupportedFileSystemsTest.CreateAndReadUsage/btrfs'
- GTEST_FILTER+=':My/SupportedFileSystemsTest.CreateAndReadUsage/lvm2pv'
- GTEST_FILTER+=':My/SupportedFileSystemsTest.CreateAndReadUsage/nilfs2'
- GTEST_FILTER+=':My/SupportedFileSystemsTest.CreateAndReadLabel/btrfs'
- GTEST_FILTER+=':My/SupportedFileSystemsTest.CreateAndReadLabel/nilfs2'
- GTEST_FILTER+=':My/SupportedFileSystemsTest.CreateAndReadUUID/btrfs'
- GTEST_FILTER+=':My/SupportedFileSystemsTest.CreateAndReadUUID/nilfs2'
- GTEST_FILTER+=':My/SupportedFileSystemsTest.CreateAndWriteLabel/nilfs2'
- GTEST_FILTER+=':My/SupportedFileSystemsTest.CreateAndWriteUUID/nilfs2'
- GTEST_FILTER+=':My/SupportedFileSystemsTest.CreateAndCheck/lvm2pv'
- GTEST_FILTER+=':My/SupportedFileSystemsTest.CreateAndRemove/lvm2pv'
- GTEST_FILTER+=':My/SupportedFileSystemsTest.CreateAndGrow/btrfs'
- GTEST_FILTER+=':My/SupportedFileSystemsTest.CreateAndGrow/lvm2pv'
- GTEST_FILTER+=':My/SupportedFileSystemsTest.CreateAndGrow/xfs'
- GTEST_FILTER+=':My/SupportedFileSystemsTest.CreateAndShrink/btrfs'
- GTEST_FILTER+=':My/SupportedFileSystemsTest.CreateAndShrink/lvm2pv'
# Create needed /dev entries for unit tests in Docker images.
- tests/makedev.sh
- make check
- make distcheck
# Save all files on job failure for investigation.
artifacts:
when: on_failure
name: "$CI_PROJECT_NAME-ci-job-$CI_JOB_ID-$CI_JOB_NAME"
untracked: true
paths:
- ./
expire_in: 1 week
# 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