]> git.ipfire.org Git - thirdparty/kmod.git/commitdiff
ci: Use KDIR=any
authorLucas De Marchi <lucas.de.marchi@gmail.com>
Fri, 27 Jun 2025 17:13:12 +0000 (12:13 -0500)
committerLucas De Marchi <lucas.de.marchi@gmail.com>
Mon, 7 Jul 2025 16:07:41 +0000 (11:07 -0500)
Drop .github/print-kdir.sh and just use KDIR=any to handle the kernel
headers.

Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/384
.github/print-kdir.sh [deleted file]
.github/workflows/codeql.yml
.github/workflows/coverage.yml
.github/workflows/main.yml

diff --git a/.github/print-kdir.sh b/.github/print-kdir.sh
deleted file mode 100755 (executable)
index b3167e7..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/bash
-
-set -euo pipefail
-
-for moddir in /usr/lib/modules /lib/modules; do
-    if [[ -e "$moddir" ]]; then
-        kernel=$(find "$moddir" -maxdepth 1 -mindepth 1 -type d -exec basename {} \;)
-        break
-    fi
-done
-
-# There should be one entry - the kernel we installed
-if (( $(echo "$kernel" | wc -l) != 1 )); then
-    echo >&2 "Error: exactly one kernel must be installed"
-    exit 1
-fi
-echo "KDIR=$moddir/$kernel/build"
index a6b00cde88147caf63b7772930966ff52a57baee..721830d756c9d22f96b3db5df36034e7cf26a2e3 100644 (file)
@@ -13,6 +13,9 @@ on:
   schedule:
     - cron: "30 2 * * 0"
 
+env:
+  KDIR: 'any'
+
 permissions:
   contents: read
 
@@ -41,10 +44,6 @@ jobs:
       - name: Setup OS
         uses: ./.github/actions/setup-os
 
-      - name: Set the environment
-        run: |
-          .github/print-kdir.sh >> "$GITHUB_ENV"
-
       - name: Initialize CodeQL
         uses: github/codeql-action/init@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18
         with:
index 32beea1cc979a31af568416c3ae06016892b4436..a8fa3c9cf3efa6c97abc7449f50124746b0bd66a 100644 (file)
@@ -16,6 +16,9 @@ on:
 permissions:
   contents: read
 
+env:
+  KDIR: 'any'
+
 jobs:
   analyze:
     name: Analyze
@@ -38,10 +41,6 @@ jobs:
       - name: Setup OS
         uses: ./.github/actions/setup-os
 
-      - name: Set the environment
-        run: |
-          .github/print-kdir.sh >> "$GITHUB_ENV"
-
       - name: Build
         run: |
           meson setup --native-file build-dev.ini ${{ matrix.meson_setup }} builddir/
index 3bafbb2b48b6808296fe0d54cff8ee771240fa47..27ef68b0efa2f9837dd0298c095e1a95f896f285 100644 (file)
@@ -20,6 +20,9 @@ defaults:
   run:
     shell: bash
 
+env:
+  KDIR: 'any'
+
 jobs:
   build:
     runs-on: ubuntu-24.04
@@ -94,10 +97,6 @@ jobs:
       - name: Checkout
         uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
 
-      - name: Set the environment
-        run: |
-          .github/print-kdir.sh >> "$GITHUB_ENV"
-
       - name: configure checks
         run: |
           should_fail() {