Something went wrong. Try again.
forked from libbpf/vmlinux.h
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112name: 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@v7
- name: Check out Linux source uses: actions/checkout@v7 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@v7 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@v7 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@v8 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@v7 with: name: vmlinux.h if-no-files-found: error path: ./vmlinux.h