Skip to content

Revert Bypass

Revert Bypass #159

Workflow file for this run

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.10", "4.19", "4.14", "4.10", "4.6", "4.5", "4.2", "4.1", "3.19", "3.18", "3.17"]
include:
- kernel: "3.17"
compile_cflags: -fno-pie -Wno-error=format-truncation
prepare_cflags: -fno-pie -no-pie
- kernel: "3.18"
compile_cflags: -fno-pie -Wno-error=format-truncation
prepare_cflags: -fno-pie -no-pie
- kernel: "3.19"
compile_cflags: -fno-pie -Wno-error=format-truncation
prepare_cflags: -fno-pie -no-pie
- kernel: "4.1"
compile_cflags: -fno-pie -Wno-error=format-truncation
prepare_cflags: -fno-pie -no-pie
- kernel: "4.2"
compile_cflags: -fno-pie -Wno-error=format-truncation
prepare_cflags: -fno-pie -no-pie
- kernel: "4.5"
compile_cflags: -fno-pie -Wno-error=format-truncation -Wno-error=pointer-sign
prepare_cflags: -fno-pie -no-pie
- kernel: "4.6"
compile_cflags: -fno-pie -Wno-error=format-truncation -Wno-error=pointer-sign
prepare_cflags: -fno-pie -no-pie
- kernel: "4.10"
compile_cflags: -fno-pie -Wno-error=format-truncation -Wno-error=pointer-sign
prepare_cflags: -fno-pie -no-pie
- kernel: "4.14"
compile_cflags: -Wno-error=format-truncation -Wno-error=pointer-sign
- kernel: "4.19"
compile_cflags: -Wno-error=format-truncation -Wno-error=pointer-sign
- kernel: "5.10"
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 }}"