-
Notifications
You must be signed in to change notification settings - Fork 18
146 lines (119 loc) · 5.05 KB
/
check-patch.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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
---
name: Check patch
permissions:
pull-requests: read
contents: read
on:
push:
pull_request:
jobs:
build-el8:
runs-on: ubuntu-latest
container:
image: quay.io/centos/centos:stream8
steps:
- name: prepare env
run: |
echo ${{ github.base_ref }}
echo ${{ github.ref }}
mkdir -p ${PWD}/tmp.repos/BUILD
yum install -y --setopt=tsflags=nodocs autoconf automake gettext-devel git systemd make git rpm-build
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Mark git repo as safe
run: git config --global --add safe.directory $(pwd)
- name: autoreconf
run: autoreconf -ivf
- name: configure
run: ./configure
- name: run distcheck
run: make -j distcheck
- name: Build RPM
run: |
mkdir -p ${PWD}/tmp.repos/SOURCES
cp ovirt-release*.tar.gz ${PWD}/tmp.repos/SOURCES/
SUFFIX=$(date -u +%Y%m%d%H%M%S).git$(git rev-parse --short HEAD)
rpmbuild -D "_topdir ${PWD}/tmp.repos" -D "release_suffix .${SUFFIX}" -ba ovirt-release45.spec
rpmbuild -D "_topdir ${PWD}/tmp.repos" -D "release_suffix .${SUFFIX}" -ba ovirt-release-host-node.spec
- name: Collect artifacts
run: |
mkdir -p exported-artifacts
find tmp.repos -iname \*rpm -exec mv "{}" exported-artifacts/ \;
mv ./*tar.gz exported-artifacts/
- name: install master built rpm
# On master the release rpm is named ovirt-release45
# The build produce also other packages like ovirt-release-host-node
# which require the repos to be enabled by the ovirt-release45 package
# in order to be installable.
run: |
yum install -y exported-artifacts/ovirt-release45-4*noarch.rpm
- name: test project installation
run: |
yum module enable -y javapackages-tools:201801
yum module enable -y maven:3.5
yum module enable -y pki-deps:10.6
yum module enable -y postgresql:12
yum module enable -y mod_auth_openidc:2.3
yum --downloadonly install -y exported-artifacts/*noarch.rpm exported-artifacts/*x86_64.rpm
yum --downloadonly install -y ovirt-engine ovirt-engine-setup-plugin-websocket-proxy
yum --downloadonly install -y ovirt-engine-appliance
- name: Upload artifacts
uses: ovirt/upload-rpms-action@v1
with:
directory: exported-artifacts
distro: el8stream
build-el9:
# Building only on master as we don't support el9 in 4.4.
runs-on: ubuntu-latest
container:
image: quay.io/centos/centos:stream9
if: contains(github.base_ref, 'master') || contains(github.ref, 'master') || contains(github.base_ref, 'ovirt-4.5') || contains(github.ref, 'ovirt-4.5')
steps:
- name: Use legacy cryptopolicy
# as workaround for https://bugzilla.redhat.com/show_bug.cgi?id=2059101
# until https://pagure.io/copr/copr/issue/2106 is fixed
#
# until crypto-policies-20220223-1.git5203b41 lands on mirrors
run: |
dnf upgrade -y \
https://kojihub.stream.centos.org/kojifiles/packages/crypto-policies/20220223/1.git5203b41.el9/noarch/crypto-policies-20220223-1.git5203b41.el9.noarch.rpm \
https://kojihub.stream.centos.org/kojifiles/packages/crypto-policies/20220223/1.git5203b41.el9/noarch/crypto-policies-scripts-20220223-1.git5203b41.el9.noarch.rpm
dnf upgrade -y crypto-policies-scripts crypto-policies
update-crypto-policies --set LEGACY
- name: prepare env
run: |
mkdir -p ${PWD}/tmp.repos/BUILD
yum install -y --setopt=tsflags=nodocs autoconf automake gettext-devel git systemd make git rpm-build
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Mark git repo as safe
run: git config --global --add safe.directory $(pwd)
- name: autoreconf
run: autoreconf -ivf
- name: configure
run: ./configure
- name: run distcheck
run: make -j distcheck
- name: Build RPM
run: |
mkdir -p ${PWD}/tmp.repos/SOURCES
cp ovirt-release*.tar.gz ${PWD}/tmp.repos/SOURCES
SUFFIX=$(date -u +%Y%m%d%H%M%S).git$(git rev-parse --short HEAD)
rpmbuild -D "_topdir ${PWD}/tmp.repos" -D "release_suffix .${SUFFIX}" -ba ovirt-release45.spec
rpmbuild -D "_topdir ${PWD}/tmp.repos" -D "release_suffix .${SUFFIX}" -ba ovirt-release-host-node.spec
- name: Collect artifacts
run: |
mkdir -p exported-artifacts
find tmp.repos -iname \*rpm -exec mv "{}" exported-artifacts/ \;
mv ./*tar.gz exported-artifacts/
- name: test install
run: |
yum install -y exported-artifacts/ovirt-release45-4*noarch.rpm
yum --downloadonly install -y exported-artifacts/*noarch.rpm exported-artifacts/*x86_64.rpm
- name: Upload artifacts
uses: ovirt/upload-rpms-action@v1
with:
directory: exported-artifacts
distro: el9stream