From: Lucas De Marchi Date: Fri, 27 Jun 2025 17:13:12 +0000 (-0500) Subject: ci: Use KDIR=any X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d449664485fec740cfda8e3acad01d3e9354ad4d;p=thirdparty%2Fkmod.git ci: Use KDIR=any Drop .github/print-kdir.sh and just use KDIR=any to handle the kernel headers. Signed-off-by: Lucas De Marchi Reviewed-by: Emil Velikov Link: https://github.com/kmod-project/kmod/pull/384 --- diff --git a/.github/print-kdir.sh b/.github/print-kdir.sh deleted file mode 100755 index b3167e70..00000000 --- a/.github/print-kdir.sh +++ /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" diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index a6b00cde..721830d7 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -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: diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 32beea1c..a8fa3c9c 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -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/ diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3bafbb2b..27ef68b0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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() {