-
Notifications
You must be signed in to change notification settings - Fork 41
/
Copy path.gitlab-ci.yml
126 lines (115 loc) · 4.25 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
stages:
- build
- test
.alpine_image_template: &alpine_image_definition
# Use official Alpine image https://hub.docker.com/_/alpine/.
image: alpine:3.17
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 eudev
.rocky_image_template: &rocky_image_definition
# Use official Rocky Linux image https://hub.docker.com/_/rockylinux/.
image: rockylinux:8
before_script:
- cat /proc/version
- cat /etc/os-release
- dnf update -y
# Enable PowerTools repo for development packages.
- dnf install -y 'dnf-command(config-manager)'
- dnf config-manager --set-enabled powertools
- dnf 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 exfatprogs and ntfsprogs.
- dnf install -y epel-release
- dnf install -y e2fsprogs dosfstools exfatprogs mtools util-linux
cryptsetup device-mapper lvm2 ntfsprogs udftools xfsprogs
xfsdump xorg-x11-server-Xvfb kmod
.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
libpolkit-gobject-1-dev
# 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
- cat /proc/partitions
- ls -l /dev
# 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
rocky_build:
<<: *rocky_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
rocky_test:
<<: *rocky_image_definition
<<: *test_stage_definition
ubuntu_test:
<<: *ubuntu_image_definition
<<: *test_stage_definition