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:
+11
-16
@@ -23,43 +23,37 @@ env:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
out-of-tree:
|
out-of-tree:
|
||||||
name: Out-of-tree (${{ matrix.compiler }})
|
name: Out-of-tree build
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 30
|
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:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install build dependencies
|
- name: Install build dependencies
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
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
|
- name: Build module
|
||||||
run: make W=1 KCFLAGS=-W ${{ matrix.make_args }}
|
run: make W=1 KCFLAGS=-W
|
||||||
|
|
||||||
- name: Run checkpatch
|
- name: Run checkpatch
|
||||||
if: matrix.compiler == 'gcc'
|
|
||||||
run: make checkpatch
|
run: make checkpatch
|
||||||
|
|
||||||
- name: Check shell scripts
|
- name: Check shell scripts
|
||||||
if: matrix.compiler == 'gcc'
|
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get install -y shellcheck
|
|
||||||
bash -n test-smoke.sh
|
bash -n test-smoke.sh
|
||||||
for f in tools/*.sh; do bash -n "$f"; done
|
for f in tools/*.sh; do bash -n "$f"; done
|
||||||
shellcheck -S warning test-smoke.sh tools/*.sh
|
shellcheck -S warning test-smoke.sh tools/*.sh
|
||||||
|
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
if: matrix.compiler == 'gcc'
|
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: i2c-imc-skylake-${{ github.ref_name }}
|
name: i2c-imc-skylake-${{ github.ref_name }}
|
||||||
@@ -77,7 +71,8 @@ jobs:
|
|||||||
- name: Install kernel build dependencies
|
- name: Install kernel build dependencies
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
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
|
- name: Build pinned Sparse
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
Reference in New Issue
Block a user