gparted/.gitlab-ci.yml
Mike Fleetwood 0e46d6a7de Stop installing intltool package into Alpine and CentOS CI images (!107)
... as the GParted build no longer uses it.  (Intltool is not explicitly
installed into the Ubuntu CI image).

However removing intltool from the GitLab CentOS Continuous Integration
image causes the build job to fail like this:
    $ ./autogen.sh
    ...
    **Warning**: I am going to run `configure' with no arguments.
    If you wish to pass any to it, please specify them on the
    `./autogen.sh' command line.
    Processing ./configure.ac
    Running autoreconf...
    autoreconf: Entering directory `.'
    autoreconf: running: autopoint --force
    Can't exec "autopoint": No such file or directory at /usr/share/autoconf/Autom4te/FileUtils.pm line 345.
    autoreconf: failed to run autopoint: No such file or directory
    autoreconf: autopoint is needed because this package uses Gettext

This is because on CentOS 7 autopoint is provided by the gettext-devel
package which was installed as a requirement for intltool.  Fix the
build by explicitly installing the package.

(On Alpine Linux the gettext-dev package is automatically installed and
on Ubuntu the autopoint package is automatically installed so those CI
images don't need to explicitly include the relevant package).

Closes !107 - Migrate from intltool to gettext translation
2022-11-12 16:44:55 +00:00

123 lines
4.1 KiB
YAML

stages:
- build
- test
.alpine_image_template: &alpine_image_definition
# Use official Alpine image https://hub.docker.com/_/alpine/.
image: alpine:latest
before_script:
- cat /proc/version
- cat /etc/os-release
- apk update
- apk add gnome-common yelp-tools automake autoconf glib-dev libtool g++
parted-dev gtkmm3-dev itstool make git polkit-dev
# Extra packages only needed during the test stage.
- apk add btrfs-progs btrfs-progs-extra e2fsprogs e2fsprogs-extra exfatprogs
dosfstools mtools f2fs-tools jfsutils cryptsetup lvm2 udftools
xfsprogs xfsprogs-extra xvfb-run kmod gzip
.centos_image_template: &centos_image_definition
# Use official CentOS image https://hub.docker.com/_/centos/.
image: centos:centos7
before_script:
- cat /proc/version
- cat /etc/os-release
- yum update -y
- yum install -y which gnome-common yelp-tools glib2-devel gcc-c++
libuuid-devel parted-devel gtkmm30-devel make polkit file
polkit-devel gettext-devel
# 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 exfatprogs f2fs-tools dosfstools
mtools hfsplus-tools util-linux cryptsetup device-mapper
lvm2 ntfsprogs udftools xfsprogs xfsdump
xorg-x11-server-Xvfb kmod
- systemd-machine-id-setup
.ubuntu_image_template: &ubuntu_image_definition
# Use official Ubuntu image https://hub.docker.com/_/ubuntu/.
image: ubuntu:latest
before_script:
- cat /proc/version
- cat /etc/os-release
- export DEBIAN_FRONTEND=noninteractive
- apt update
- apt install -y build-essential gnome-common yelp-tools libglib2.0-dev-bin
uuid-dev libparted-dev libgtkmm-3.0-dev policykit-1
# Extra packages only needed during the test stage.
- apt install -y btrfs-progs e2fsprogs exfatprogs f2fs-tools dosfstools
mtools hfsutils hfsprogs jfsutils util-linux cryptsetup-bin
dmsetup lvm2 nilfs-tools ntfs-3g reiser4progs reiserfsprogs
udftools xfsprogs xfsdump xvfb kmod
.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=`tests/exclude_loopdev_tests.sh tests/test_SupportedFileSystems.cc`
- echo $GTEST_FILTER
- fgrep -v nodev /proc/filesystems | sort
# Create needed /dev entries for unit tests in Docker images.
- tests/makedev.sh
- make check
- make distcheck
- fgrep -v nodev /proc/filesystems | sort
# 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 Alpine Linux, CentOS and Ubuntu.
alpine_build:
<<: *alpine_image_definition
<<: *build_stage_definition
centos_build:
<<: *centos_image_definition
<<: *build_stage_definition
ubuntu_build:
<<: *ubuntu_image_definition
<<: *build_stage_definition
# Check GParted unit tests and distcheck pass on Alpine Linux, CentOS and
# Ubuntu.
alpine_test:
<<: *alpine_image_definition
<<: *test_stage_definition
centos_test:
<<: *centos_image_definition
<<: *test_stage_definition
ubuntu_test:
<<: *ubuntu_image_definition
<<: *test_stage_definition