Generate vmlinux.h headers in parallel #29
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: | |
| 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: 'v6.18' | |
| fetch-depth: 1 | |
| path: linux/ | |
| - name: Install dependencies | |
| shell: bash | |
| run: | | |
| ./scripts/install-dependencies.sh | |
| ./scripts/install-pahole.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%/}" | |
| mkdir -p "vmlinux.h/$arch" | |
| mv "$dir"* "vmlinux.h/$arch/" | |
| done | |
| - name: Upload combined headers | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: vmlinux.h | |
| if-no-files-found: error | |
| path: ./vmlinux.h |