aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2023-01-26 22:41:11 +0100
committerHauke Mehrtens <hauke@hauke-m.de>2024-01-27 19:22:38 +0100
commit90b97a641352cd20dea2fe0952a45a630a4224b8 (patch)
tree8b591d8e83e76f8ae891f6783dfef88f25dbe45c
parent9524b9e5bace7585aa607f1439fe2e3300efa795 (diff)
downloadbackports-90b97a641352cd20dea2fe0952a45a630a4224b8.tar.gz
CI: Add github action to test build
Create a new backports tar based on recent supported kernel on every push and test it against all supported kernel versions. This uses the dev container to test the new commits. This allows to test new changes to backports automatically using the github CI system. It also makes it easier for others to test their changes. It also publishes the newly generated backports tar.gz file for further manual testing. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
-rw-r--r--.github/workflows/create.yml116
1 files changed, 116 insertions, 0 deletions
diff --git a/.github/workflows/create.yml b/.github/workflows/create.yml
new file mode 100644
index 00000000..3fa4628b
--- /dev/null
+++ b/.github/workflows/create.yml
@@ -0,0 +1,116 @@
+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/
+