forked from Nogesma/xrootd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
97 lines (85 loc) · 2.38 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
stages:
- build
default:
tags:
- docker_node
.deb_build: &deb_build
stage: build
variables:
DEBIAN_FRONTEND: noninteractive
script:
- source /etc/os-release
- apt update -qq
- apt install -y build-essential devscripts equivs git
- mk-build-deps --install --remove debian/control <<< y
- VERSION=$(git describe --match 'v*' | sed -e 's/v//; s/-rc/~rc/; s/-g/+git/; s/-/.post/; s/-/./')
- dch --create --package xrootd -v ${VERSION} -M 'XRootD automated build.'
- debuild --no-tgz-check --no-sign -b
- apt install -y ../*.d*eb
- mkdir -p DEB/${ID}/${VERSION_CODENAME}
- mv ../*.* DEB/${ID}/${VERSION_CODENAME}
- tests/post-install.sh
artifacts:
paths: [ DEB ]
expire_in: 1d
.rpm_build_yum: &rpm_build_yum
stage: build
script:
- yum install -y centos-release-scl epel-release git
- yum install -y epel-rpm-macros rpmdevtools yum-utils
- yum-builddep -y xrootd.spec
- rpmdev-setuptree
- git archive --prefix xrootd/ -o $(rpm -E '%{_sourcedir}')/xrootd.tar.gz HEAD
- rpmbuild -bb --with git xrootd.spec
- yum install -y $(rpm -E '%{_rpmdir}')/*/*.rpm
- tests/post-install.sh
- mkdir -p RPMS
- mv $(rpm -E '%{_rpmdir}')/ RPMS$(rpm -E '%{dist}' | tr . /)
artifacts:
paths: [ RPMS ]
expire_in: 1d
.rpm_build_dnf: &rpm_build_dnf
stage: build
script:
- dnf install -y dnf-plugins-core git rpmdevtools
- rpmdev-setuptree
- dnf builddep -y xrootd.spec
- git archive --prefix xrootd/ -o $(rpm -E '%{_sourcedir}')/xrootd.tar.gz HEAD
- rpmbuild -bb --with git xrootd.spec
- dnf install -y $(rpm -E '%{_rpmdir}')/*/*.rpm
- tests/post-install.sh
- mkdir -p RPMS
- mv $(rpm -E '%{_rpmdir}')/ RPMS$(rpm -E '%{dist}' | tr . /)
artifacts:
paths: [ RPMS ]
expire_in: 1d
Debian 11:
image: debian:11
<<: *deb_build
Debian 12:
image: debian:12
<<: *deb_build
Ubuntu 22.04:
image: ubuntu:22.04
<<: *deb_build
CentOS 7:
image: centos:7
<<: *rpm_build_yum
AlmaLinux 8:
image: almalinux:8
before_script:
- dnf install -y epel-release
- dnf config-manager --set-enabled powertools
<<: *rpm_build_dnf
AlmaLinux 9:
image: almalinux:9
before_script:
- dnf install -y epel-release
- dnf config-manager --set-enabled crb
<<: *rpm_build_dnf
Fedora 38:
image: fedora:38
<<: *rpm_build_dnf
Fedora 39:
image: fedora:39
<<: *rpm_build_dnf