Parameterise CI config ready for also using a Ubuntu image (!4)
Prepare the GitLab Continuous Integration configuration for also building and testing GParted on a Ubuntu image. The definition of the image and before_script, which so far specify the CentOS Docker image and how to install the required RPM packages, need to move from being top level nodes to being defined per job. Namely within jobs 'centos_build' and 'centos_test'. To avoid duplicating various nodes within multiple jobs, YAML anchors (&LABEL) and references (*LABEL) are used. They are defined in ignored jobs, job names starting with a dot (.). Closes !4 - Add GitLab CI jobs to build and test GParted
This commit is contained in:
parent
a6b0a26c74
commit
eb2435231b
|
@ -1,26 +1,24 @@
|
|||
# Use official CentOS image https://hub.docker.com/_/centos/.
|
||||
image: centos:latest
|
||||
|
||||
before_script:
|
||||
- yum update -y
|
||||
- yum install -y which gnome-common gnome-doc-utils glib2-devel intltool
|
||||
gcc-c++ libuuid-devel parted-devel gtkmm24-devel make
|
||||
polkit file
|
||||
|
||||
stages:
|
||||
- build
|
||||
- test
|
||||
|
||||
# Check GParted can be built and installed.
|
||||
centos_build:
|
||||
.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 gnome-doc-utils glib2-devel intltool
|
||||
gcc-c++ libuuid-devel parted-devel gtkmm24-devel make
|
||||
polkit file
|
||||
|
||||
.build_stage_template: &build_stage_definition
|
||||
stage: build
|
||||
script:
|
||||
- ./autogen.sh
|
||||
- make
|
||||
- make install
|
||||
|
||||
# Check GParted unit tests and distcheck pass.
|
||||
centos_test:
|
||||
.test_stage_template: &test_stage_definition
|
||||
stage: test
|
||||
script:
|
||||
- ./autogen.sh
|
||||
|
@ -29,3 +27,13 @@ centos_test:
|
|||
- export GTEST_FILTER='-BlockSpecialTest.NamedBlockSpecialObjectBySymlinkMatches'
|
||||
- make check
|
||||
- make distcheck
|
||||
|
||||
# Check GParted can be built and installed.
|
||||
centos_build:
|
||||
<<: *centos_image_definition
|
||||
<<: *build_stage_definition
|
||||
|
||||
# Check GParted unit tests and distcheck pass.
|
||||
centos_test:
|
||||
<<: *centos_image_definition
|
||||
<<: *test_stage_definition
|
||||
|
|
Loading…
Reference in New Issue