ci: fix the two Clang jobs after runner image drift

Both Clang jobs broke without the driver changing. GCC passed everywhere it
actually compiles: out-of-tree, in-tree x86_64, checkpatch and shellcheck.

The out-of-tree LLVM=1 job never reached this source. The runner now ships
6.17.0-1020-azure headers built with GCC, and their Makefiles pass flags
clang rejects outright:

  clang: error: unknown argument: '-fconserve-stack'
  clang: error: unsupported argument 'bounds-strict' to option '-fsanitize='
  clang: error: unsupported option '-mrecord-mcount'

Building a module with a different compiler than the kernel it links against
is not something to paper over, and it was testing nothing useful: the
meaningful Clang coverage is the in-tree job, which controls the whole
build. Drop Clang from the out-of-tree job and say why in a comment.

The in-tree arm64 job failed at defconfig with "linker 'ld.lld' not found".
LLVM=1 wants the whole LLVM toolchain and ld.lld ships in its own package,
which the runner no longer pulls in as a dependency of llvm. Install lld.

Since the out-of-tree job no longer needs a matrix, its steps lose the
per-compiler conditionals and shellcheck moves into the dependency install
rather than being fetched mid-job.
This commit is contained in:
Simone
2026-07-27 00:12:58 +02:00
parent 5988db06ad
commit 5f97a71ad2
+11 -16
View File
@@ -23,43 +23,37 @@ env:
jobs:
out-of-tree:
name: Out-of-tree (${{ matrix.compiler }})
name: Out-of-tree build
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
include:
- compiler: gcc
make_args: ""
- compiler: clang
make_args: LLVM=1
# GCC only, deliberately. Building a module with LLVM=1 against the
# runner's distro headers fails before it reaches this source: those
# headers were built with GCC and their Makefiles pass flags clang does
# not accept (-fconserve-stack, -fsanitize=bounds-strict, -mrecord-mcount).
# Clang coverage belongs in the in-tree job below, which controls the
# whole kernel build.
steps:
- uses: actions/checkout@v4
- name: Install build dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential clang llvm linux-headers-$(uname -r)
sudo apt-get install -y build-essential linux-headers-$(uname -r) shellcheck
- name: Build module
run: make W=1 KCFLAGS=-W ${{ matrix.make_args }}
run: make W=1 KCFLAGS=-W
- name: Run checkpatch
if: matrix.compiler == 'gcc'
run: make checkpatch
- name: Check shell scripts
if: matrix.compiler == 'gcc'
run: |
sudo apt-get install -y shellcheck
bash -n test-smoke.sh
for f in tools/*.sh; do bash -n "$f"; done
shellcheck -S warning test-smoke.sh tools/*.sh
- name: Upload artifact
if: matrix.compiler == 'gcc'
uses: actions/upload-artifact@v4
with:
name: i2c-imc-skylake-${{ github.ref_name }}
@@ -77,7 +71,8 @@ jobs:
- name: Install kernel build dependencies
run: |
sudo apt-get update
sudo apt-get install -y bc bison build-essential clang flex libelf-dev libssl-dev llvm
sudo apt-get install -y bc bison build-essential clang flex libelf-dev \
libssl-dev lld llvm
- name: Build pinned Sparse
run: |