Import from upstream patch(9fc51941d9e7) #253
Workflow file for this run
This file contains hidden or 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: -Wno-error=use-after-free | |
| jobs: | |
| compile: | |
| runs-on: ubuntu-24.04 | |
| strategy: | |
| matrix: | |
| kernel: ["6.12", "6.10", "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 | |
| - kernel: "6.10" | |
| compile_cflags: -Wno-error=format-truncation -Wno-error=pointer-sign | |
| build_makeflags: KBUILD_MODPOST_WARN=1 | |
| - kernel: "6.12" | |
| 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-13-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.0" ]]; then | |
| curl "https://github.com/torvalds/linux/commit/dfbd199a7cfe3e3cd8531e1353cdbd7175bfbc5e.patch" | patch -t -N -r - -p1 -d "${KERNELROOT}" || true | |
| fi | |
| # Fix issue preventing the 4.19 kenel and early 5.* kernels from completing config | |
| if [[ "${KERNELVER}" == "4."* || "${KERNELVER}" == "5.0" || "${KERNELVER}" == "5.4" ]]; then | |
| curl --output "fix.patch" "https://lore.kernel.org/lkml/20191208214607.20679-1-vt@altlinux.org/raw" | |
| patch -t -N -r - -p1 -d "${KERNELROOT}" < fix.patch | |
| 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 }}" | |
| - name: Save build directory as artifact | |
| if: '!cancelled()' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: input-wacom-${{ matrix.kernel }} | |
| retention-days: 7 | |
| path: ~/work/input-wacom |