kconfigs: set CONFIG_BPF_LSM=y #44
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
| name: vmlinux.h | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| inputs: | |
| kernel-ref: | |
| description: 'Kernel version (Git tag/ref)' | |
| required: true | |
| # Keep in sync with string used in `checkout` invocation below. | |
| default: 'v6.19' | |
| workflow_call: | |
| jobs: | |
| gen-headers: | |
| name: Generate vmlinux.h (${{ matrix.arch }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| arch: | |
| - x86_64 | |
| - aarch64 | |
| - arm | |
| - loongarch64 | |
| - ppc64le | |
| - riscv64 | |
| - s390x | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Check out Linux source | |
| uses: actions/checkout@v6 | |
| with: | |
| repository: 'torvalds/linux' | |
| ref: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.kernel-ref || 'v6.19' }} | |
| fetch-depth: 1 | |
| path: linux/ | |
| - name: Check out pahole source | |
| uses: actions/checkout@v6 | |
| with: | |
| repository: 'acmel/dwarves' | |
| ref: 'next' | |
| fetch-depth: 1 | |
| path: pahole/ | |
| - name: Install pahole | |
| shell: bash | |
| run: | | |
| sudo apt -y install cmake git libdw-dev libelf-dev | |
| cd pahole | |
| mkdir -p build | |
| cmake -B=build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr | |
| make -C build -j$(nproc) | |
| sudo make -C build install | |
| - name: Install dependencies | |
| shell: bash | |
| run: | | |
| ./scripts/install-dependencies.sh | |
| ./scripts/install-bpftool.sh | |
| - name: Generate ${{ matrix.arch }}/vmlinux.h | |
| shell: bash | |
| run: ./scripts/gen-vmlinux-header.sh ${{ matrix.arch }} | |
| - name: Upload headers | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: vmlinux.h-${{ matrix.arch }} | |
| if-no-files-found: error | |
| path: ./vmlinux.h/${{ matrix.arch }} | |
| combine-headers: | |
| name: Combine all vmlinux.h headers | |
| runs-on: ubuntu-latest | |
| needs: gen-headers | |
| steps: | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| pattern: vmlinux.h-* | |
| - name: Reorganize headers | |
| shell: bash | |
| run: | | |
| mkdir -p vmlinux.h | |
| for dir in vmlinux.h-*/; do | |
| arch="${dir#vmlinux.h-}" | |
| arch="${arch%/}" | |
| # Map architecture names to match include/ directory structure | |
| target_arch="$arch" | |
| case "$arch" in | |
| ppc64le) target_arch="powerpc" ;; | |
| esac | |
| mkdir -p "vmlinux.h/$target_arch" | |
| mv "$dir"* "vmlinux.h/$target_arch/" | |
| done | |
| - name: Upload combined headers | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: vmlinux.h | |
| if-no-files-found: error | |
| path: ./vmlinux.h |