From 2a26258077b987ddba0633d07aaec0abfb5462a2 Mon Sep 17 00:00:00 2001 From: Vincent Fu Date: Mon, 26 Aug 2024 18:27:28 +0000 Subject: [PATCH] ci: add containers for Alma, Oracle, and Rocky Linux Expand our testing platforms with these distributions. They mostly use the same package names as Fedora with a handful of exceptions. Signed-off-by: Vincent Fu --- .github/workflows/ci.yml | 3 ++ ci/actions-build.sh | 2 +- ci/actions-install.sh | 99 ++++++++++++++++++++++++++++++---------- 3 files changed, 79 insertions(+), 25 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 52df3712..6fbba591 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,6 +14,9 @@ jobs: container: - {os: 'debian', dh: 'debian', ver: 'bookworm', target_arch: 'x86_64'} - {os: 'fedora', dh: 'fedora', ver: '40', target_arch: 'x86_64'} + - {os: 'alma', dh: 'almalinux', ver: '9', target_arch: 'x86_64'} + - {os: 'oracle', dh: 'oraclelinux', ver: '9', target_arch: 'x86_64'} + - {os: 'rocky', dh: 'rockylinux', ver: '9', target_arch: 'x86_64'} - {os: 'ubuntu', dh: 'ubuntu', ver: 'noble', target_arch: 'i686'} - {os: 'ubuntu', dh: 'ubuntu', ver: 'noble', target_arch: 'x86_64'} diff --git a/ci/actions-build.sh b/ci/actions-build.sh index de444a22..861ed3a8 100755 --- a/ci/actions-build.sh +++ b/ci/actions-build.sh @@ -38,7 +38,7 @@ main() { ;; esac ;;& - */linux | */ubuntu | */debian | */fedora) + */linux | */ubuntu | */debian | */fedora | */alma | */oracle | */rocky) case "${CI_TARGET_ARCH}" in "i686") extra_cflags="${extra_cflags} -m32" diff --git a/ci/actions-install.sh b/ci/actions-install.sh index db3aa0f3..77c511af 100755 --- a/ci/actions-install.sh +++ b/ci/actions-install.sh @@ -102,36 +102,87 @@ DPKGCFG fi } +# Fedora and related distributions install_fedora() { - dnf install -y \ - bison-devel \ - cmake \ - cunit-devel \ - flex-devel \ - isa-l-devel \ - kernel-devel \ - libaio-devel \ - libgfapi-devel \ - libibverbs-devel \ - libiscsi-devel \ - libnbd-devel \ - libnfs-devel \ - libpmem-devel \ - libpmem2-devel \ - librbd-devel \ - numactl-devel \ - protobuf-c-devel \ - python3-scipy \ - python3-sphinx \ - python3-statsmodels \ - unzip \ - valgrind-devel \ - wget \ + pkgs=( + bison-devel + git + cmake + flex-devel + gperftools + isa-l-devel + kernel-devel + libaio-devel + libibverbs-devel + libiscsi-devel + libnbd-devel + libnfs-devel + libpmem-devel + libpmem2-devel + librbd-devel + numactl-devel + protobuf-c-devel + python3-scipy + python3-sphinx + sudo + unzip + valgrind-devel + wget + ) + + case "${CI_TARGET_OS}" in + "fedora") + pkgs+=( + cunit-devel + libgfapi-devel + python3-statsmodels + ) + ;; + "rocky" | "alma" | "oracle") + pkgs+=( + CUnit-devel + python-pip + ) + ;;& + "rocky" | "alma") + pkgs+=( + glusterfs-api-devel + ) + ;; + esac + dnf install -y "${pkgs[@]}" # install librpma from sources ci/actions-install-librpma.sh } +install_rhel_clone() { + dnf install -y epel-release + install_fedora + + # I could not find a python3-statsmodels package in the repos + pip3 install statsmodels +} + +install_oracle() { + dnf config-manager --set-enabled ol9_codeready_builder + install_rhel_clone +} + +install_alma() { + dnf install -y 'dnf-command(config-manager)' + dnf config-manager --set-enabled crb + dnf install -y almalinux-release-devel + install_rhel_clone +} + +install_rocky() { + dnf install -y 'dnf-command(config-manager)' + dnf config-manager --set-enabled crb + dnf config-manager --set-enabled devel + install_rhel_clone +} + install_debian() { install_ubuntu } -- 2.25.1