Browse Source

ci: split eBPF and FUSE-BPF into their own gated features

TheWildJames 3 weeks ago
parent
commit
7e6335e37a

+ 17 - 0
.github/actions/ebpf/action.yml

@@ -0,0 +1,17 @@
+name: 'Enable eBPF Support'
+description: 'Enable eBPF program support configs in the kernel (Issue #176)'
+
+runs:
+  using: "composite"
+  steps:
+    - name: Enable eBPF Kernel Configs
+      uses: ./.github/actions/set-kernel-config
+      with:
+        config_list: |
+          # eBPF support (Issue #176) — tiny safe programs that run in the kernel
+          # to trace/control events. BTF (enabled separately) is only on 6.1+;
+          # the older build system lacks the toolchain needed for BTF emission.
+          CONFIG_BPF_EVENTS=y
+          CONFIG_KPROBE_EVENTS=y
+          CONFIG_UPROBES=y
+          CONFIG_UPROBE_EVENTS=y

+ 13 - 0
.github/actions/fuse-bpf-config/action.yml

@@ -0,0 +1,13 @@
+name: 'Enable FUSE-BPF Kernel Support'
+description: 'Enable CONFIG_FUSE_BPF kernel-side support (Issue #211)'
+
+runs:
+  using: "composite"
+  steps:
+    - name: Enable FUSE-BPF Kernel Config
+      uses: ./.github/actions/set-kernel-config
+      with:
+        config_list: |
+          # FUSE-BPF support (Issue #211) — FUSE filesystems backed by eBPF
+          # programs. Requires eBPF support (Issue #176) enabled underneath.
+          CONFIG_FUSE_BPF=y

+ 0 - 6
.github/actions/misc/action.yml

@@ -29,10 +29,4 @@ runs:
           CONFIG_TMPFS_POSIX_ACL=y
           CONFIG_KALLSYMS=y
           CONFIG_KALLSYMS_ALL=y
-          # eBPF support (Issue #176) — BTF only on 6.1+ (old build system lacks toolchain)
-          CONFIG_BPF_EVENTS=y
-          CONFIG_KPROBE_EVENTS=y
-          CONFIG_UPROBES=y
-          CONFIG_UPROBE_EVENTS=y
-          CONFIG_FUSE_BPF=y
           

+ 9 - 1
.github/workflows/build.yml

@@ -126,7 +126,7 @@ jobs:
         os_patch_level: ${{ inputs.os_patch_level }}
 
     - name: Build FUSE-BPF Userspace Daemon (Issue #211)
-      if: ${{ contains(inputs.version, 'lts') && inputs.version == 'android16-6.12' }}
+      if: ${{ contains(inputs.feature_set, 'FUSE_BPF') && contains(inputs.version, 'lts') && inputs.version == 'android16-6.12' }}
       uses: ./.github/actions/fuse-bpf
       with:
         version: ${{ inputs.version }}
@@ -265,6 +265,14 @@ jobs:
     - name: Setup Misc Configs
       uses: ./.github/actions/misc
 
+    - name: Enable eBPF Support
+      if: contains(inputs.feature_set, 'EBPF')
+      uses: ./.github/actions/ebpf
+
+    - name: Enable FUSE-BPF Kernel Support
+      if: contains(inputs.feature_set, 'FUSE_BPF')
+      uses: ./.github/actions/fuse-bpf-config
+
     - name: Enable BTF
       if: contains(inputs.feature_set, 'BTF')
       uses: ./.github/actions/btf

+ 10 - 0
.github/workflows/main.yml

@@ -73,6 +73,14 @@ on:
         description: "BTF"
         type: boolean
         default: true
+      use_ebpf:
+        description: "eBPF"
+        type: boolean
+        default: true
+      use_fuse_bpf:
+        description: "FUSE-BPF"
+        type: boolean
+        default: true
       use_perf:
         description: "Performance"
         type: boolean
@@ -242,6 +250,8 @@ jobs:
           [ "${{ inputs.use_ptrace }}" = "true" ] && FEATURES="${FEATURES}Ptrace+"
           [ "${{ inputs.use_unicode }}" = "true" ] && FEATURES="${FEATURES}Unicode+"
           [ "${{ inputs.use_btf }}" = "true" ] && FEATURES="${FEATURES}BTF+"
+          [ "${{ inputs.use_ebpf }}" = "true" ] && FEATURES="${FEATURES}EBPF+"
+          [ "${{ inputs.use_fuse_bpf }}" = "true" ] && FEATURES="${FEATURES}FUSE_BPF+"
           [ "${{ inputs.use_perf }}" = "true" ] && FEATURES="${FEATURES}Perf+"
           echo "feature_set=${FEATURES%+}" >> "$GITHUB_OUTPUT"
 

+ 1 - 1
.github/workflows/root-variants.yml

@@ -115,7 +115,7 @@ jobs:
     uses: ./.github/workflows/prepare.yml
     with:
       config_file: ${{ needs.resolve-pins.outputs.config_file }}
-      feature_set: SUSFS+NTSync+Ptrace+Unicode+BTF
+      feature_set: SUSFS+NTSync+Ptrace+Unicode+BTF+EBPF+FUSE_BPF
       susfs_commit: ${{ needs.resolve-pins.outputs.susfs_commit }}
       root_flavor: ${{ matrix.flavor }}
       root_commit: ${{ matrix.commit }}