HID: wacom: Initialize brightness of LED trigger #317
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: [ push, pull_request ] | |
permissions: | |
contents: read | |
env: | |
COMPILE_CFLAGS: -Werror | |
PREPARE_CFLAGS: | |
jobs: | |
compile: | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
kernel: ["6.3", "5.15", "5.10", "5.4", "5.0", "4.19"] | |
include: | |
- kernel: "4.19" | |
compile_cflags: -Wno-error=format-truncation -Wno-error=pointer-sign | |
- kernel: "5.0" | |
compile_cflags: -Wno-error=format-truncation -Wno-error=pointer-sign | |
- kernel: "5.4" | |
compile_cflags: -Wno-error=format-truncation -Wno-error=pointer-sign | |
- kernel: "5.10" | |
compile_cflags: -Wno-error=format-truncation -Wno-error=pointer-sign | |
- kernel: "5.15" | |
compile_cflags: -Wno-error=format-truncation -Wno-error=pointer-sign | |
- kernel: "6.3" | |
compile_cflags: -Wno-error=format-truncation -Wno-error=pointer-sign | |
build_makeflags: KBUILD_MODPOST_WARN=1 | |
steps: | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install gcc-9-plugin-dev libelf-dev | |
gcc -print-file-name=plugin | |
- name: Checkout the repo | |
uses: actions/checkout@v4 | |
- name: Download and extract v${{ matrix.kernel }} kernel | |
run: | | |
KERNELVER=${{ matrix.kernel }} | |
KERNELDIR=${HOME}/kernel | |
KERNELROOT=${KERNELDIR}/linux-${KERNELVER} | |
# Generate the "v{major}.x" URL path component from the kernel | |
# version and then download and unpack the sources | |
SERIES=v$(awk -vFS=. -vOFS=. '{$2="x"; print}' <<< ${KERNELVER}) | |
URL=https://cdn.kernel.org/pub/linux/kernel/${SERIES}/linux-${KERNELVER}.tar.xz | |
mkdir -p ${KERNELDIR} | |
rm -rf ${KERNELROOT} | |
curl ${URL} | tar xJC ${KERNELDIR} | |
- name: Prepare v${{ matrix.kernel }} kernel sources | |
run: | | |
KERNELVER=${{ matrix.kernel }} | |
KERNELDIR=${HOME}/kernel | |
KERNELROOT=${KERNELDIR}/linux-${KERNELVER} | |
# Make sure the kernel can find a header for this compiler if necessary | |
GCC_MAJOR_VER=$(gcc -dumpversion | cut -d'.' -f1) | |
if [[ ! -f "${KERNELROOT}/include/linux/compiler-gcc${GCC_MAJOR_VER}.h" ]]; then | |
COMPILER_H=$(ls -v ${KERNELROOT}/include/linux/compiler-gcc*.h | tail -n1) | |
ln -s "${COMPILER_H}" "${KERNELROOT}/include/linux/compiler-gcc${GCC_MAJOR_VER}.h" | |
fi | |
# Fix issue preventing some late-version 4.x kenels from completing config | |
if [[ "${KERNELVER}" == "4."* || "${KERNELVER}" == "5.1" ]]; then | |
curl "https://github.com/torvalds/linux/commit/dfbd199a7cfe3e3cd8531e1353cdbd7175bfbc5e.patch" | patch -t -N -r - -p1 -d "${KERNELROOT}" || true | |
fi | |
make -C ${KERNELROOT} defconfig | |
${KERNELROOT}/scripts/config --file ${KERNELROOT}/.config --disable UNWINDER_ORC --enable UNWINDER_FRAME_POINTER | |
make -C ${KERNELROOT} prepare modules_prepare EXTRA_CFLAGS="${PREPARE_CFLAGS} ${{ matrix.prepare_cflags }}" | |
- name: Build input-wacom for v${{ matrix.kernel }} kernel | |
run: | | |
KERNELDIR=${HOME}/kernel | |
KERNELROOT=${KERNELDIR}/linux-${{ matrix.kernel }} | |
./autogen.sh --with-kernel=${KERNELROOT} | |
make V=1 EXTRA_CFLAGS="${COMPILE_CFLAGS} ${{ matrix.compile_cflags }}" EXTRA_MAKEFLAGS="${BUILD_MAKEFLAGS} ${{ matrix.build_makeflags }}" | |