From 9f5612aa31aed2b779daf06e882600efa63c936c Mon Sep 17 00:00:00 2001 From: Jonathan Maple Date: Mon, 13 Jan 2025 13:23:36 -0500 Subject: [PATCH 01/14] Testing Github actions as a contributor THIS IS BREAKING AND NOT INTENDED TO BE SHIPPED --- include/linux/sched.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/sched.h b/include/linux/sched.h index 6a0b77b2b368e..5a4fc3d8a7048 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -677,7 +677,7 @@ struct kmap_ctrl { #endif }; -struct task_struct; +struct task_struct // oops only breaks struct task_struct_rh { /* Empty if CONFIG_POSIX_CPUTIMERS=n */ @@ -700,7 +700,7 @@ struct task_struct_rh { #endif /* pointer back to the main task_struct */ - struct task_struct *task_struct; + struct task_struct *task_struct // ooops only break; int trc_reader_nesting; int trc_ipi_to_cpu; union rcu_special trc_reader_special; From 17e4c16ef8c0248301fa186a1e7c0558cd7a1785 Mon Sep 17 00:00:00 2001 From: Jonathan Maple Date: Tue, 14 Jan 2025 12:19:54 -0500 Subject: [PATCH 02/14] github actions: Make builds on Merge Request Since we need to make sure all our checks run BEFORE the commit is pushed to a branch we're swithcing this to `on pull_request_target` to enable external contibutors. --- .github/workflows/push-check_x86_64.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push-check_x86_64.yml b/.github/workflows/push-check_x86_64.yml index 2aa1eb2ed4f18..8564221b27bc1 100644 --- a/.github/workflows/push-check_x86_64.yml +++ b/.github/workflows/push-check_x86_64.yml @@ -1,6 +1,6 @@ name: CI on: - push: + pull_request_target: branches: - '**' - '!mainline' From 23c2c539caf20b386291f14d8dbe1008ea04bdd7 Mon Sep 17 00:00:00 2001 From: Jonathan Maple Date: Tue, 14 Jan 2025 12:19:54 -0500 Subject: [PATCH 03/14] github actions: Make builds on Merge Request Since we need to make sure all our checks run BEFORE the commit is pushed to a branch we're swithcing this to `on pull_request_target` to enable external contibutors. --- .github/workflows/push-check_x86_64.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/push-check_x86_64.yml b/.github/workflows/push-check_x86_64.yml index 2aa1eb2ed4f18..df87206e967e3 100644 --- a/.github/workflows/push-check_x86_64.yml +++ b/.github/workflows/push-check_x86_64.yml @@ -1,6 +1,6 @@ name: CI on: - push: + pull_request_target: branches: - '**' - '!mainline' @@ -24,6 +24,7 @@ jobs: - name: Checkout code uses: actions/checkout@v4 with: + ref: "${{ github.event.pull_request.merge_commit_sha }}" fetch-depth: 0 - name: Build the Kernel run: | From 6b6819b5f7660068e29bd76d6524e27d018c4cbf Mon Sep 17 00:00:00 2001 From: Jonathan Maple Date: Tue, 14 Jan 2025 16:20:22 -0500 Subject: [PATCH 04/14] Fix missing semicolon Testing resubmission fix --- include/linux/sched.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/sched.h b/include/linux/sched.h index 5a4fc3d8a7048..6fc84d79efc9d 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -677,7 +677,7 @@ struct kmap_ctrl { #endif }; -struct task_struct // oops only breaks +struct task_struct; // oops only breaks struct task_struct_rh { /* Empty if CONFIG_POSIX_CPUTIMERS=n */ From 27c6f41c4a2860e0ef48a063ebb1c368c3e27340 Mon Sep 17 00:00:00 2001 From: Jonathan Maple Date: Tue, 14 Jan 2025 16:49:38 -0500 Subject: [PATCH 05/14] github actions: change github.event.pull_request event trying to move from: merge_commit_sha to HEAD --- .github/workflows/push-check_x86_64.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push-check_x86_64.yml b/.github/workflows/push-check_x86_64.yml index df87206e967e3..e70c7b6eb3deb 100644 --- a/.github/workflows/push-check_x86_64.yml +++ b/.github/workflows/push-check_x86_64.yml @@ -24,7 +24,7 @@ jobs: - name: Checkout code uses: actions/checkout@v4 with: - ref: "${{ github.event.pull_request.merge_commit_sha }}" + ref: "${{ github.event.pull_request.head }}" fetch-depth: 0 - name: Build the Kernel run: | From a58d85548f9221f9b95ed3c2b92753c273956c92 Mon Sep 17 00:00:00 2001 From: Jonathan Maple Date: Tue, 14 Jan 2025 18:40:32 -0500 Subject: [PATCH 06/14] Revert "github actions: change github.event.pull_request event" This reverts commit 27c6f41c4a2860e0ef48a063ebb1c368c3e27340. --- .github/workflows/push-check_x86_64.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push-check_x86_64.yml b/.github/workflows/push-check_x86_64.yml index e70c7b6eb3deb..df87206e967e3 100644 --- a/.github/workflows/push-check_x86_64.yml +++ b/.github/workflows/push-check_x86_64.yml @@ -24,7 +24,7 @@ jobs: - name: Checkout code uses: actions/checkout@v4 with: - ref: "${{ github.event.pull_request.head }}" + ref: "${{ github.event.pull_request.merge_commit_sha }}" fetch-depth: 0 - name: Build the Kernel run: | From 42901058d37a5318c4cabb456a15dc9446f2869e Mon Sep 17 00:00:00 2001 From: Jonathan Maple Date: Tue, 14 Jan 2025 18:37:39 -0500 Subject: [PATCH 07/14] github actions: CIQLTS8_8 add aarch64 and fix up x86_64 --- .github/workflows/build-check_aarch64.yml | 34 +++++++++++++++++++ ...heck_x86_64.yml => build-check_x86_64.yml} | 2 +- 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/build-check_aarch64.yml rename .github/workflows/{push-check_x86_64.yml => build-check_x86_64.yml} (97%) diff --git a/.github/workflows/build-check_aarch64.yml b/.github/workflows/build-check_aarch64.yml new file mode 100644 index 0000000000000..5012a53b397b5 --- /dev/null +++ b/.github/workflows/build-check_aarch64.yml @@ -0,0 +1,34 @@ +name: CI +on: + pull_request_target: + branches: + - '**' + - '!mainline' + +jobs: + kernel-build-job: + runs-on: + labels: kernel-build-arm64 + container: + image: rockylinux:8 + env: + ROCKY_ENV: rocky8 + ports: + - 80 + options: --cpus 8 + steps: + - name: Install tools and Libraries + run: | + dnf groupinstall 'Development Tools' -y + dnf install --enablerepo=devel bc dwarves kernel-devel openssl-devel elfutils-libelf-devel -y + - name: Checkout code + uses: actions/checkout@v4 + with: + ref: "${{ github.event.pull_request.merge_commit_sha }}" + fetch-depth: 0 + - name: Build the Kernel + run: | + git config --global --add safe.directory /__w/kernel-src-tree/kernel-src-tree + cp configs/kernel-4.18.0-aarch64.config .config + make olddefconfig + make -j8 diff --git a/.github/workflows/push-check_x86_64.yml b/.github/workflows/build-check_x86_64.yml similarity index 97% rename from .github/workflows/push-check_x86_64.yml rename to .github/workflows/build-check_x86_64.yml index df87206e967e3..faee6e23beecc 100644 --- a/.github/workflows/push-check_x86_64.yml +++ b/.github/workflows/build-check_x86_64.yml @@ -28,7 +28,7 @@ jobs: fetch-depth: 0 - name: Build the Kernel run: | - git config --global --add safe.directory /__w/kernel-src-git/kernel-src-git + git config --global --add safe.directory /__w/kernel-src-tree/kernel-src-tree cp configs/kernel-4.18.0-x86_64.config .config make olddefconfig make -j8 From 45e010a6895d7bdd35640b2c43da12792cee95b7 Mon Sep 17 00:00:00 2001 From: Jonathan Maple Date: Tue, 14 Jan 2025 18:56:09 -0500 Subject: [PATCH 08/14] Final Fix for a test --- include/linux/sched.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/sched.h b/include/linux/sched.h index 6fc84d79efc9d..92bbe7d4dab5f 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -700,7 +700,7 @@ struct task_struct_rh { #endif /* pointer back to the main task_struct */ - struct task_struct *task_struct // ooops only break; + struct task_struct *task_struct; // ooops only break; int trc_reader_nesting; int trc_ipi_to_cpu; union rcu_special trc_reader_special; From fd399f1f28c6af7fda84f3ce9b0de266ebc58403 Mon Sep 17 00:00:00 2001 From: Jonathan Maple Date: Tue, 14 Jan 2025 19:31:40 -0500 Subject: [PATCH 09/14] github actions: change builder to head.sha --- .github/workflows/build-check_aarch64.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-check_aarch64.yml b/.github/workflows/build-check_aarch64.yml index 5012a53b397b5..adee418b285f1 100644 --- a/.github/workflows/build-check_aarch64.yml +++ b/.github/workflows/build-check_aarch64.yml @@ -24,7 +24,7 @@ jobs: - name: Checkout code uses: actions/checkout@v4 with: - ref: "${{ github.event.pull_request.merge_commit_sha }}" + ref: "${{ github.event.pull_request.head.sha }}" fetch-depth: 0 - name: Build the Kernel run: | From 30feb89deada9e475f75c8f46b0d984f6628b424 Mon Sep 17 00:00:00 2001 From: Jonathan Maple Date: Tue, 14 Jan 2025 19:44:25 -0500 Subject: [PATCH 10/14] Revert "Final Fix for a test" This reverts commit 45e010a6895d7bdd35640b2c43da12792cee95b7. --- include/linux/sched.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/sched.h b/include/linux/sched.h index 92bbe7d4dab5f..6fc84d79efc9d 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -700,7 +700,7 @@ struct task_struct_rh { #endif /* pointer back to the main task_struct */ - struct task_struct *task_struct; // ooops only break; + struct task_struct *task_struct // ooops only break; int trc_reader_nesting; int trc_ipi_to_cpu; union rcu_special trc_reader_special; From 05338514033e520648733d001d68374093e879e4 Mon Sep 17 00:00:00 2001 From: Jonathan Maple Date: Tue, 14 Jan 2025 20:19:14 -0500 Subject: [PATCH 11/14] github actions: name CI to be based off arch --- .github/workflows/build-check_aarch64.yml | 2 +- .github/workflows/build-check_x86_64.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-check_aarch64.yml b/.github/workflows/build-check_aarch64.yml index adee418b285f1..e14c8e43c48f1 100644 --- a/.github/workflows/build-check_aarch64.yml +++ b/.github/workflows/build-check_aarch64.yml @@ -1,4 +1,4 @@ -name: CI +name: aarch64 CI on: pull_request_target: branches: diff --git a/.github/workflows/build-check_x86_64.yml b/.github/workflows/build-check_x86_64.yml index faee6e23beecc..ecbfdf9c5f6a9 100644 --- a/.github/workflows/build-check_x86_64.yml +++ b/.github/workflows/build-check_x86_64.yml @@ -1,4 +1,4 @@ -name: CI +name: x86_64 CI on: pull_request_target: branches: From 519311250f58a89c1903edf11424a7d040fe05a7 Mon Sep 17 00:00:00 2001 From: Jonathan Maple Date: Tue, 14 Jan 2025 20:22:51 -0500 Subject: [PATCH 12/14] github actions: fix x86_64 to use head.sha for checkout --- .github/workflows/build-check_x86_64.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-check_x86_64.yml b/.github/workflows/build-check_x86_64.yml index ecbfdf9c5f6a9..b349bf54ecfb4 100644 --- a/.github/workflows/build-check_x86_64.yml +++ b/.github/workflows/build-check_x86_64.yml @@ -24,7 +24,7 @@ jobs: - name: Checkout code uses: actions/checkout@v4 with: - ref: "${{ github.event.pull_request.merge_commit_sha }}" + ref: "${{ github.event.pull_request.head.sha }}" fetch-depth: 0 - name: Build the Kernel run: | From fa20b7d6211143acbc15eabd164c7562b7281af7 Mon Sep 17 00:00:00 2001 From: Jonathan Maple Date: Tue, 14 Jan 2025 20:29:32 -0500 Subject: [PATCH 13/14] Reapply "Final Fix for a test" This reverts commit 30feb89deada9e475f75c8f46b0d984f6628b424. --- include/linux/sched.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/sched.h b/include/linux/sched.h index 6fc84d79efc9d..92bbe7d4dab5f 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -700,7 +700,7 @@ struct task_struct_rh { #endif /* pointer back to the main task_struct */ - struct task_struct *task_struct // ooops only break; + struct task_struct *task_struct; // ooops only break; int trc_reader_nesting; int trc_ipi_to_cpu; union rcu_special trc_reader_special; From 3b121613b6ffdbb18086614efd29dff917f24603 Mon Sep 17 00:00:00 2001 From: Jonathan Maple Date: Tue, 14 Jan 2025 12:19:54 -0500 Subject: [PATCH 14/14] github actions: Make builds on Merge Request Since we need to make sure external contributors code actually compiles prior to merging. To get access to the forked repos merge request we need to switch over our push/pull_request to pull_request_target. In addition we're fixing up some Naming Conventions, adding aarch64 to this branch and fixing the naming so that we can quickly identify if the CI is for x86_64 or aarch64. --- .github/workflows/build-check_aarch64.yml | 34 +++++++++++++++++++ ...heck_x86_64.yml => build-check_x86_64.yml} | 7 ++-- 2 files changed, 38 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/build-check_aarch64.yml rename .github/workflows/{push-check_x86_64.yml => build-check_x86_64.yml} (86%) diff --git a/.github/workflows/build-check_aarch64.yml b/.github/workflows/build-check_aarch64.yml new file mode 100644 index 0000000000000..e14c8e43c48f1 --- /dev/null +++ b/.github/workflows/build-check_aarch64.yml @@ -0,0 +1,34 @@ +name: aarch64 CI +on: + pull_request_target: + branches: + - '**' + - '!mainline' + +jobs: + kernel-build-job: + runs-on: + labels: kernel-build-arm64 + container: + image: rockylinux:8 + env: + ROCKY_ENV: rocky8 + ports: + - 80 + options: --cpus 8 + steps: + - name: Install tools and Libraries + run: | + dnf groupinstall 'Development Tools' -y + dnf install --enablerepo=devel bc dwarves kernel-devel openssl-devel elfutils-libelf-devel -y + - name: Checkout code + uses: actions/checkout@v4 + with: + ref: "${{ github.event.pull_request.head.sha }}" + fetch-depth: 0 + - name: Build the Kernel + run: | + git config --global --add safe.directory /__w/kernel-src-tree/kernel-src-tree + cp configs/kernel-4.18.0-aarch64.config .config + make olddefconfig + make -j8 diff --git a/.github/workflows/push-check_x86_64.yml b/.github/workflows/build-check_x86_64.yml similarity index 86% rename from .github/workflows/push-check_x86_64.yml rename to .github/workflows/build-check_x86_64.yml index 2aa1eb2ed4f18..b349bf54ecfb4 100644 --- a/.github/workflows/push-check_x86_64.yml +++ b/.github/workflows/build-check_x86_64.yml @@ -1,6 +1,6 @@ -name: CI +name: x86_64 CI on: - push: + pull_request_target: branches: - '**' - '!mainline' @@ -24,10 +24,11 @@ jobs: - name: Checkout code uses: actions/checkout@v4 with: + ref: "${{ github.event.pull_request.head.sha }}" fetch-depth: 0 - name: Build the Kernel run: | - git config --global --add safe.directory /__w/kernel-src-git/kernel-src-git + git config --global --add safe.directory /__w/kernel-src-tree/kernel-src-tree cp configs/kernel-4.18.0-x86_64.config .config make olddefconfig make -j8