-
-
Notifications
You must be signed in to change notification settings - Fork 46
153 lines (151 loc) · 6.5 KB
/
build.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
147
148
149
150
151
152
153
name: packages
on:
push
jobs:
compile:
name: build
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Build on rhel8
uses: addnab/docker-run-action@v3
with:
image: almalinux:8
options: -v ${{ github.workspace }}:/work
run: |
yum -yq install rpm-build epel-release python3 util-linux
cd /work/
mkdir artifacts
python --version
python3.6 setup.py bdist_rpm --python /usr/bin/python3.6
rm /work/dist/*.tar.gz
rename .rpm .rhel8.rpm /work/dist/*.rpm
mv /work/dist/* artifacts/
- name: Build on rhel9
uses: addnab/docker-run-action@v3
with:
image: almalinux:9
options: -v ${{ github.workspace }}:/work
run: |
yum -yq install rpm-build epel-release python3 \
python3-setuptools util-linux
mkdir -p /work/dist/rhel9
cd /work/
python3.9 setup.py bdist_rpm --python /usr/bin/python3.9 \
--requires "python3-libvirt python3-libnbd python3-lxml python3-tqdm python3-lz4 nbdkit-server nbdkit-python-plugin python3-paramiko python3-typing-extensions python3-colorlog qemu-img openssh-clients"
rm /work/dist/*.tar.gz
rename .rpm .rhel9.rpm /work/dist/*.rpm
mv /work/dist/* artifacts/
- name: Build on fedora39
uses: addnab/docker-run-action@v3
with:
image: fedora:39
options: -v ${{ github.workspace }}:/work
run: |
yum -yq install rpm-build python3 \
python3-setuptools util-linux
mkdir -p /work/dist/fedora39
cd /work/
python3.12 setup.py bdist_rpm --python /usr/bin/python3.12 \
--requires "python3-libvirt python3-libnbd python3-lxml python3-tqdm python3-lz4 nbdkit-server nbdkit-python-plugin python3-paramiko python3-typing-extensions python3-colorlog qemu-img openssh-clients"
rm /work/dist/*.tar.gz
rename .rpm .fedora39.rpm /work/dist/*.rpm
mv /work/dist/* artifacts/
- name: Build on opensuse
uses: addnab/docker-run-action@v3
with:
image: opensuse/leap:15.5
options: -v ${{ github.workspace }}:/work
run: |
zypper in -y rpm-build python3 python3-setuptools
mkdir -p /work/dist/opensuse15
cd /work/
python3 setup.py bdist_rpm --requires "python3-libvirt-python python3-libnbd python3-lxml python3-tqdm python3-lz4 nbdkit-server nbdkit-python-plugin python3-paramiko python3-typing-extensions python3-colorlog python3-dataclasses qemu-tools openssh-clients"
rm /work/dist/*.tar.gz
rename .rpm .opensuse15.rpm /work/dist/*.rpm
mv /work/dist/* artifacts/
- name: Build on debian
uses: addnab/docker-run-action@v3
with:
image: debian:latest
options: -v ${{ github.workspace }}:/work
run: |
apt-get update -qy > /dev/null
apt-get install -qy python3-all \
python3-stdeb \
dh-python \
python3-libnbd \
python3-tqdm \
python3-lz4 \
python3-libvirt \
python3-lxml \
python3-paramiko \
python3-colorlog > /dev/null
cd /work/
python3 setup.py --command-packages=stdeb.command bdist_deb
mv deb_dist/*.tar.gz artifacts/
mv deb_dist/*.tar.xz artifacts/
mv deb_dist/*.deb artifacts/
python3 setup.py sdist
mv dist/*.tar.gz artifacts/
- name: Test installation on opensuse
uses: addnab/docker-run-action@v3
with:
image: opensuse/leap:15.5
options: -v ${{ github.workspace }}:/work
run: |
zypper in -y --allow-unsigned-rpm /work/artifacts/*noarch*opensuse*.rpm
virtnbdbackup -h
virtnbdrestore -h
virtnbdmap -h
- name: Test installation on rhel8
uses: addnab/docker-run-action@v3
with:
image: almalinux:8
options: -v ${{ github.workspace }}:/work
run: |
yum -yq install epel-release
yum -yq install /work/artifacts/*noarch*rhel8.rpm
virtnbdbackup -h
virtnbdrestore -h
virtnbdmap -h
- name: Test installation on rhel9
uses: addnab/docker-run-action@v3
with:
image: almalinux:9
options: -v ${{ github.workspace }}:/work
run: |
yum -yq install epel-release
yum -yq install /work/artifacts/*noarch*rhel9.rpm
virtnbdbackup -h
virtnbdrestore -h
virtnbdmap -h
- name: Test installation on fedora39
uses: addnab/docker-run-action@v3
with:
image: fedora:39
options: -v ${{ github.workspace }}:/work
run: |
yum -yq install epel-release
yum -yq install /work/artifacts/*noarch*fedora39.rpm
virtnbdbackup -h
virtnbdrestore -h
virtnbdmap -h
- name: Test installation on debian
uses: addnab/docker-run-action@v3
with:
image: debian:latest
options: -v ${{ github.workspace }}:/work
run: |
apt update -qy > /dev/null
apt install -qy /work/artifacts/*.deb > /dev/null
virtnbdbackup -h
virtnbdrestore -h
virtnbdmap -h
- name: Archive Results
if: always()
uses: actions/upload-artifact@v4
with:
name: packages
path: artifacts/