ci: add containers for Alma, Oracle, and Rocky Linux
authorVincent Fu <vincent.fu@samsung.com>
Mon, 26 Aug 2024 18:27:28 +0000 (18:27 +0000)
committerVincent Fu <vincent.fu@samsung.com>
Tue, 27 Aug 2024 18:29:54 +0000 (18:29 +0000)
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 <vincent.fu@samsung.com>
.github/workflows/ci.yml
ci/actions-build.sh
ci/actions-install.sh

index 52df37127d150d138f80592e85d15ba6dfb46ed7..6fbba591f25e99da845ca0b408f509cbbb4c6f44 100644 (file)
@@ -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'}
 
index de444a220306d32eef0196a9746833038fd5bdf7..861ed3a8d59481f45551dad10d39d6bf50ec76be 100755 (executable)
@@ -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"
index db3aa0f3031c52ccd51c1913483c87407516a7f7..77c511af3347b1b69b2ca4f83866f4bfad1ef404 100755 (executable)
@@ -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
 }