[PATCH 4/5] ci: Add Fedora

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Add an action to setup latest Fedora and use it for the initial setup.
Add hack on /usr/lib/modules so /usr/lib/modules/*/build can still be
used in the rest of the workflow as the KDIR.

Signed-off-by: Lucas De Marchi <lucas.de.marchi@xxxxxxxxx>
---
 .github/actions/setup-fedora/action.yml | 27 +++++++++++++++++++++++++
 .github/workflows/main.yml              |  4 +++-
 2 files changed, 30 insertions(+), 1 deletion(-)
 create mode 100644 .github/actions/setup-fedora/action.yml

diff --git a/.github/actions/setup-fedora/action.yml b/.github/actions/setup-fedora/action.yml
new file mode 100644
index 0000000..a2612e4
--- /dev/null
+++ b/.github/actions/setup-fedora/action.yml
@@ -0,0 +1,27 @@
+name: 'setup Fedora'
+description: 'Setup a Fedora container for running CI'
+runs:
+  using: 'composite'
+  steps:
+    - name: Install dependencies
+      shell: bash
+      run: |
+        dnf update -y
+        dnf install -y \
+          autoconf \
+          automake \
+          make \
+          gcc \
+          kernel-devel \
+          zlib-devel \
+          xz-devel \
+          libzstd-devel \
+          openssl-devel \
+          gtk-doc \
+          libtool \
+          scdoc
+        # CI builds with KDIR pointing to /usr/lib/modules/*/build
+        # so just a foo/build pointing to the right place, assuming
+        # just one kernel installed
+        mkdir -p /usr/lib/modules/foo/
+        ln -s /usr/src/kernels/* /usr/lib/modules/foo/build
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 3f8eaa6..4a2fff2 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -11,7 +11,7 @@ jobs:
     runs-on: ubuntu-latest
     strategy:
       matrix:
-        container: ['ubuntu:22.04', 'ubuntu:24.04', 'archlinux:base-devel']
+        container: ['ubuntu:22.04', 'ubuntu:24.04', 'archlinux:base-devel', 'fedora:latest']
 
     container:
       image: ${{ matrix.container }}
@@ -23,6 +23,8 @@ jobs:
         if: ${{ startsWith(matrix.container, 'ubuntu') }}
       - uses: ./.github/actions/setup-archlinux
         if: ${{ startsWith(matrix.container, 'archlinux') }}
+      - uses: ./.github/actions/setup-fedora
+        if: ${{ startsWith(matrix.container, 'fedora') }}
 
       - name: configure
         run: |
-- 
2.45.2





[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux