Skip to content

CI: Add github action to test build #46

CI: Add github action to test build

CI: Add github action to test build #46

Workflow file for this run

name: Create and test backports tar
on:
push:
jobs:
create_tar:
name: Create backports tar
runs-on: ubuntu-latest
steps:
- name: Install coccinelle
run: |
sudo apt update
sudo apt install -y coccinelle
- name: Checkout backports
uses: actions/checkout@v4
with:
path: backports
- name: Checkout kernel 5.15
uses: actions/checkout@v4
with:
repository: gregkh/linux
ref: refs/heads/linux-5.15.y
path: linux
- name: Generate backports tar
working-directory: backports
run: ./gentree.py --refresh ${GITHUB_WORKSPACE}/linux ${GITHUB_WORKSPACE}/backports-generated
- name: Check for git changes
working-directory: backports
run: git diff
- name: Pack backports-generated.tar.gz
run: tar cfz backports-generated.tar.gz backports-generated
- name: Upload backports-generated.tar.gz
uses: actions/upload-artifact@v4
with:
name: backports-generated.tar.gz
path: backports-generated.tar.gz
check_build:
name: Test backports tar
runs-on: ubuntu-latest
container:
image: ghcr.io/hauke/backports
needs: create_tar
continue-on-error: true
strategy:
matrix:
kernel: [
"4.4",
"4.5",
"4.6",
"4.7",
"4.8",
"4.9",
"4.10",
"4.11",
"4.12",
"4.13",
"4.14",
"4.15",
"4.16",
"4.17",
"4.18",
"4.19",
"4.20",
"5.0",
"5.1",
"5.2",
"5.3",
"5.4",
"5.5",
"5.6",
"5.7",
"5.8",
"5.9",
"5.10",
"5.11",
"5.12",
"5.13",
"5.14",
"5.15"]
config: [
allyesconfig,
defconfig-wifi]
steps:
- name: Checkout backports
uses: actions/checkout@v4
with:
path: backports
- name: Download backports-generated.tar.gz
uses: actions/download-artifact@v4
with:
name: backports-generated.tar.gz
- name: Unpack backports-generated.tar.gz
run: tar xf backports-generated.tar.gz
- name: Create build configuration
working-directory: backports-generated
run: make -j$(nproc) KLIB=/ksrc-backports/lib/modules/${{ matrix.kernel }}.*/build/ KLIB_BUILD=/ksrc-backports/lib/modules/${{ matrix.kernel }}.*/build/ ${{ matrix.config }}
- name: Build test
working-directory: backports-generated
run: make -j$(nproc) KLIB=/ksrc-backports/lib/modules/${{ matrix.kernel }}.*/build/ KLIB_BUILD=/ksrc-backports/lib/modules/${{ matrix.kernel }}.*/build/