diff --git a/.github/actions/setup-os/setup-cachyos.sh b/.github/actions/setup-os/setup-cachyos.sh new file mode 100755 index 000000000..2b9e3c5b0 --- /dev/null +++ b/.github/actions/setup-os/setup-cachyos.sh @@ -0,0 +1,23 @@ +#!/bin/bash +# SPDX-FileCopyrightText: 2024 Emil Velikov +# SPDX-FileCopyrightText: 2024 Lucas De Marchi +# +# SPDX-License-Identifier: LGPL-2.1-or-later + +# Semi-regularly the packager key may have (temporarily) expired. Somewhat +# robust solution is to wipe the local keyring and regenerate/reinstall it +# prior to any other packages on the system. +rm -rf /etc/pacman.d/gnupg +pacman-key --init +pacman-key --populate +pacman --noconfirm -Sy archlinux-keyring + +pacman --noconfirm -Su \ + clang \ + git \ + gtk-doc \ + linux-cachyos-headers \ + lld \ + mbedtls \ + meson \ + scdoc diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0a93a1984..61b79654d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -63,7 +63,14 @@ jobs: - container: 'archlinux:multilib-devel' only_bits: '64' only_compiler: 'clang' - custom: 'ldd-as-linker' + custom: 'lld-as-linker' + linker: 'lld' + + # Variant with kernel built with clang + - container: 'cachyos/cachyos:latest' + only_bits: '64' + only_compiler: 'clang' + custom: 'clang-kernel' linker: 'lld' # Variants with moduledir diff --git a/testsuite/module-playground/Makefile b/testsuite/module-playground/Makefile index 61072c7ac..0ef0d88df 100644 --- a/testsuite/module-playground/Makefile +++ b/testsuite/module-playground/Makefile @@ -19,6 +19,12 @@ else ifeq ($(KDIR),any) KDIR := $(shell find $(MODULE_DIRECTORY) -maxdepth 1 -mindepth 1 -type d | sort -V | tail -n1)/build endif +KERNEL_MAKE_ARGS := M=$$PWD +ifeq ($(origin LLVM), undefined) + KERNEL_MAKE_ARGS += $(shell grep -qs "^CONFIG_CC_IS_CLANG=y" "$(KDIR)/include/config/auto.conf" && printf 'LLVM=1') + KERNEL_MAKE_ARGS += CONFIG_DEBUG_INFO_BTF_MODULES= +endif + ARCH_SPECIFIC_MODULES := mod-simple-x86_64.ko mod-simple-i386.ko mod-simple-sparc64.ko default: modules @@ -28,9 +34,9 @@ mod-simple-%.ko: mod-simple-%.c Makefile.arch $(MAKE) KDIR=$(KDIR_$(arch)) ARCH=$(arch) CROSS_COMPILE=$(CROSS_COMPILE_$(arch)) -f Makefile.arch modules: - $(MAKE) -C $(KDIR) M=$$PWD modules + $(MAKE) -C $(KDIR) $(KERNEL_MAKE_ARGS) modules arch-modules: $(ARCH_SPECIFIC_MODULES) clean: - $(MAKE) -C $(KDIR) M=$$PWD clean + $(MAKE) -C $(KDIR) $(KERNEL_MAKE_ARGS) clean