-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Well, sort of. UBI by itself does not provide all of the build requirements. Even when enabling EPEL. Some things are from the RHEL-9 CodeReady Builder repo, and that has been stripped down for UBI (along with BaseOS and AppStream). So, create a kind-of-UBI test environment. I start with UBI9 then I enable the CentOS Stream 9 BaseOS, AppStream, and CRB repos at a lower cost than UBI repos. Then install the build requirements and go from there. There does not appear to get the rest of RHEL-9 for UBI without getting a subscription, and I can't enable that in GitHub Actions. So I will just glue CentOS Stream packages on the UBI and hope for the best. In most cases this should mean my UBI CI job is "released UBI9 plus what will be in the next y-release of RHEL-9". Probably. Signed-off-by: David Cantrell <dcantrell@redhat.com>
- Loading branch information
Showing
7 changed files
with
170 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
name: RHEL UBI | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
paths-ignore: | ||
- AUTHORS.md | ||
- CC-BY-4.0.txt | ||
- CHANGES.md | ||
- CODE_OF_CONDUCT.md | ||
- CONTRIBUTING.md | ||
- COPYING | ||
- COPYING.LIB | ||
- HISTORY | ||
- LICENSE-2.0.txt | ||
- MISSING | ||
- MIT.txt | ||
- README.md | ||
- RELEASE | ||
- TODO | ||
- 'contrib/**' | ||
- 'data/**' | ||
- 'doc/**' | ||
- 'po/**' | ||
- 'regress/**' | ||
|
||
jobs: | ||
centos: | ||
# Use containers on their ubuntu latest image | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
container: ["registry.access.redhat.com/ubi9/ubi:latest"] | ||
|
||
container: | ||
image: ${{ matrix.container }} | ||
|
||
# All of these steps run from within the main source | ||
# directory, so think of that as your $PWD | ||
steps: | ||
# Requirements before the git clone can happen | ||
- name: git clone requirements | ||
run: | | ||
case "${{ matrix.container }}" in | ||
*ubi9) | ||
# UBI by itself does not contain every BR we | ||
# need, so supplement with CentOS Stream 9 | ||
if [ -d /etc/yum.repos.d ]; then | ||
rm -f /etc/yum.repos.d/ubi.repo | ||
else | ||
mkdir -p /etc/yum.repos.d | ||
fi | ||
for c in BaseOS AppStream CRB ; do | ||
echo "[c9s-${c}]" >> /etc/yum.repos.d/ubi.repo | ||
echo "name = CentOS Stream 9 - ${c}" >> /etc/yum.repos.d/ubi.repo | ||
echo "baseurl = https://mirror.stream.centos.org/9-stream/${c}/\$basearch/os/" >> /etc/yum.repos.d/ubi.repo | ||
echo "cost = 100" >> /etc/yum.repos.d/ubi.repo | ||
echo "enabled = 1" >> /etc/yum.repos.d/ubi.repo | ||
echo "gpgcheck = 0" >> /etc/yum.repos.d/ubi.repo | ||
echo >> /etc/yum.repos.d/ubi.repo | ||
done | ||
# Upgrade things | ||
dnf upgrade -y | ||
# Now enable EPEL and install git | ||
dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm | ||
dnf install -y git | ||
;; | ||
esac | ||
# This means clone the git repo | ||
- uses: actions/checkout@v4 | ||
|
||
# Within the container, install the dependencies, build, | ||
# and run the test suite | ||
- name: Build and run the test suite | ||
run: | | ||
# Install make(1) so we can use the instreqs target | ||
dnf install -y make | ||
# Install build dependencies and set up the target | ||
make instreqs | ||
# Build and run the test suite | ||
make debug | ||
make check | ||
# Report coverage | ||
ninja -C build coverage && ( curl -s https://codecov.io/bash | bash ) || : |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
PKG_CMD = dnf install -y | ||
PIP_CMD = pip3 install -I |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
cpp-coveralls | ||
gcovr | ||
PyYAML | ||
rpmfluff | ||
timeout-decorator |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/sh | ||
PATH=/bin:/usr/bin:/sbin:/usr/sbin | ||
|
||
# Install 32-bit development files on x86_64 systems | ||
if [ "$(uname -m)" = "x86_64" ]; then | ||
dnf install -y glibc-devel.i686 glibc.i686 libgcc.i686 | ||
fi | ||
|
||
# Update clamav database | ||
freshclam |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/sh | ||
PATH=/usr/bin | ||
|
||
# Update pip and setuptools | ||
dnf install -y python3-pip | ||
pip3 install --upgrade pip setuptools |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
annobin | ||
bash | ||
clamav-data | ||
clamav-devel | ||
clamav-update | ||
CUnit | ||
CUnit-devel | ||
desktop-file-utils | ||
elfutils-devel | ||
file-devel | ||
gcc | ||
gettext | ||
gettext-devel | ||
git | ||
glibc-devel | ||
json-c-devel | ||
kernel-core | ||
kernel-devel | ||
kmod-devel | ||
ksh | ||
libabigail | ||
libarchive-devel | ||
libcap-devel | ||
libcdson-devel | ||
libcurl-devel | ||
libffi-devel | ||
libicu-devel | ||
libmandoc-devel | ||
libxml2-devel | ||
libyaml-devel | ||
make | ||
meson | ||
ninja-build | ||
openssl-devel | ||
patchelf | ||
python3-devel | ||
python3-pip | ||
python3-pyyaml | ||
python3-rpm | ||
rc | ||
rpm-build | ||
rpm-devel | ||
sssd-client | ||
tcsh | ||
valgrind | ||
xhtml1-dtds | ||
xmlrpc-c-devel | ||
zlib-devel | ||
zsh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters