-
Notifications
You must be signed in to change notification settings - Fork 27
197 lines (173 loc) · 6.68 KB
/
o2-full-deps.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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
---
# Create repositories with all O2 prerequisites plus aliBuild and push them
# upstream (e.g. to S3).
name: o2-full-deps release
# Controls when the action will run. This workflow is triggered manually.
"on":
workflow_dispatch:
permissions: {}
jobs:
rpm-el7:
runs-on: ubuntu-latest
container: centos:7
env:
ALIBUILD_TAG: v1.14.5
steps:
# For rpms/*.spec
- uses: actions/checkout@v3
- name: Install prerequisites
run: |
set -x
yum install -y rpm-build scl-utils-build createrepo unzip git python3-setuptools
curl https://rclone.org/install.sh | bash
cat << EOF > /tmp/rclone.conf
${{ secrets.S3_RCLONE_CONFIG }}
EOF
- name: Build the EL7 RPM and create a yum repo
run: |
set -x
rpmbuild -ba rpms/o2-prereq.spec
git clone -b "$ALIBUILD_TAG" https://github.com/alisw/alibuild
pushd alibuild
perl -p -i -e "s/LAST_TAG/$ALIBUILD_TAG/g" alibuild_helpers/__init__.py
python3 setup.py bdist_rpm --requires python3,python3-requests,git,python3-PyYAML
cp dist/alibuild-*.noarch.rpm ~/rpmbuild/RPMS/x86_64/
popd
cd ~/rpmbuild/RPMS/x86_64/
createrepo .
rclone --config /tmp/rclone.conf --transfers=10 --progress --delete-before \
sync local:./ rpms3:alibuild-repo/RPMS/o2-full-deps_x86-64/
rpm-el8:
runs-on: ubuntu-latest
container: centos:8
env:
ALIBUILD_TAG: v1.14.5
steps:
# For rpms/*.spec
- uses: actions/checkout@v3
- name: Install prerequisites
run: |
set -x
sed -i.bak -e 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
sed -i.bak -e 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
find /etc/yum.repos.d -name "*.bak" -delete
yum clean all
yum update -y
yum install -y rpm-build scl-utils-build createrepo unzip git python3-setuptools python3
curl https://rclone.org/install.sh | bash
cat << EOF > /tmp/rclone.conf
${{ secrets.S3_RCLONE_CONFIG }}
EOF
- name: Build the EL8 RPM and create a yum repo
run: |
set -x
rpmbuild -ba rpms/o2-prereq-cc8.spec
git clone -b "$ALIBUILD_TAG" https://github.com/alisw/alibuild
pushd alibuild
perl -p -i -e "s/LAST_TAG/$ALIBUILD_TAG/g" alibuild_helpers/__init__.py
python3 setup.py bdist_rpm --requires python3,git,python3-pyyaml
cp dist/alibuild-*.noarch.rpm ~/rpmbuild/RPMS/x86_64/
popd
cd ~/rpmbuild/RPMS/x86_64/
createrepo .
ls -la
rclone --config /tmp/rclone.conf --transfers=10 --progress --delete-before \
sync local:./ rpms3:alibuild-repo/RPMS/o2-full-deps_el8.x86-64/
rpm-el9:
runs-on: ubuntu-latest
container: almalinux:9
env:
ALIBUILD_TAG: v1.15.0
steps:
# For rpms/*.spec
- uses: actions/checkout@v3
- name: Install prerequisites
run: |
set -x
yum clean all
yum update -y
yum install -y rpm-build scl-utils-build createrepo unzip git python3 python3-pip python3-setuptools
curl https://rclone.org/install.sh | bash
cat << EOF > /tmp/rclone.conf
${{ secrets.S3_RCLONE_CONFIG }}
EOF
- name: Build the EL9 RPM and create a yum repo
run: |
set -x
rpmbuild -ba rpms/o2-prereq-alma9.spec
git clone -b "$ALIBUILD_TAG" https://github.com/alisw/alibuild
pushd alibuild
python3 setup.py bdist_rpm --requires python3,git,python3-pyyaml,python3-requests,python3-distro
cp dist/alibuild-*.noarch.rpm ~/rpmbuild/RPMS/x86_64/
popd
cd ~/rpmbuild/RPMS/x86_64/
createrepo .
ls -la
rclone --config /tmp/rclone.conf --transfers=10 --progress --delete-before \
sync local:./ rpms3:alibuild-repo/RPMS/o2-full-deps_el9.x86-64/
rpm-fedora:
runs-on: ubuntu-latest
container: fedora:33
env:
ALIBUILD_TAG: v1.14.5
steps:
# For rpms/*.spec
- uses: actions/checkout@v3
- name: Install prerequisites
run: |
set -x
yum install -y rpm-build scl-utils-build createrepo unzip git python3-setuptools python3
curl https://rclone.org/install.sh | bash
cat << EOF > /tmp/rclone.conf
${{ secrets.S3_RCLONE_CONFIG }}
EOF
- name: Build the Fedora RPM and create a yum repo.
run: |
set -x
rpmbuild -ba --define '__python %__python3' rpms/o2-prereq-fedora.spec
git clone -b "$ALIBUILD_TAG" https://github.com/alisw/alibuild
pushd alibuild
perl -p -i -e "s/LAST_TAG/$ALIBUILD_TAG/g" alibuild_helpers/__init__.py
python3 setup.py bdist_rpm --requires python3,git,python3-pyyaml,python3-requests
cp dist/alibuild-*.noarch.rpm ~/rpmbuild/RPMS/x86_64/
popd
cd ~/rpmbuild/RPMS/x86_64/
createrepo .
ls -la
rclone --config /tmp/rclone.conf --transfers=10 --progress --delete-before \
sync local:./ rpms3:alibuild-repo/RPMS/o2-full-deps_fedora.x86-64/
deb-ubuntu:
runs-on: ubuntu-latest
strategy:
# Keep running jobs for other Ubuntu versions, even if one fails.
fail-fast: false
matrix:
ubuntu_codename:
- bionic # 18.04
- focal # 20.04
- jammy # 22.04
container: ubuntu:${{ matrix.ubuntu_codename }}
env:
ALIBUILD_TAG: v1.14.5
ALIBUILD_DISTRO: ${{ matrix.ubuntu_codename }}
DEBIAN_FRONTEND: noninteractive
steps:
- name: Install prerequisites
run: |
apt update
apt install -y vim git devscripts build-essential lintian debhelper dh-python python3-all python3-setuptools python3-setuptools-scm
gpg --import - <<\EOF
${{ secrets.LAUNCHPAD_PPA_GPG_KEY }}
EOF
- name: Build a DEB for Ubuntu and push it to the PPA
run: |
set -x
git clone -b "$ALIBUILD_TAG" https://github.com/alisw/alibuild
cd alibuild
cat <<EOF > debian/changelog
python3-alibuild (${ALIBUILD_TAG#v}~$ALIBUILD_DISTRO) $ALIBUILD_DISTRO; urgency=medium
* Bump to $ALIBUILD_TAG
-- Giulio Eulisse <[email protected]> $(date -R -u)
EOF
debuild --no-lintian -k48F330BAFFA564EF2383E2B472E9262B5C0D9DE5 -S
dput ppa:alisw/ppa "../python3-alibuild_${ALIBUILD_TAG#v}~${ALIBUILD_DISTRO}_source.changes"