Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 62 additions & 26 deletions .github/workflows/vmlinux.h.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,53 +9,89 @@ on:

jobs:
gen-headers:
name: Generate vmlinux.h
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: Download Linux source
- name: Check out Linux source
uses: actions/checkout@v6
with:
repository: 'torvalds/linux'
ref: 'v6.18'
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: ./scripts/download-latest-linux-release.sh
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-pahole.sh
./scripts/install-bpftool.sh

- name: x86_64/vmlinux.h
- name: Generate ${{ matrix.arch }}/vmlinux.h
shell: bash
run: ./scripts/gen-vmlinux-header.sh x86_64
run: ./scripts/gen-vmlinux-header.sh ${{ matrix.arch }}

- name: aarch64/vmlinux.h
shell: bash
run: ./scripts/gen-vmlinux-header.sh aarch64

- name: arm/vmlinux.h
shell: bash
run: ./scripts/gen-vmlinux-header.sh arm

- name: loongarch64/vmlinux.h
shell: bash
run: ./scripts/gen-vmlinux-header.sh loongarch64
- name: Upload headers
uses: actions/upload-artifact@v4
with:
name: vmlinux.h-${{ matrix.arch }}
if-no-files-found: error
path: ./vmlinux.h/${{ matrix.arch }}

- name: ppc64le/vmlinux.h
shell: bash
run: ./scripts/gen-vmlinux-header.sh ppc64le
combine-headers:
name: Combine all vmlinux.h headers
runs-on: ubuntu-latest
needs: gen-headers

- name: riscv64/vmlinux.h
shell: bash
run: ./scripts/gen-vmlinux-header.sh riscv64
steps:
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
pattern: vmlinux.h-*

- name: s390x/vmlinux.h
- name: Reorganize headers
shell: bash
run: ./scripts/gen-vmlinux-header.sh s390x
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 headers
- name: Upload combined headers
uses: actions/upload-artifact@v4
with:
name: vmlinux.h
Expand Down
17 changes: 0 additions & 17 deletions scripts/download-latest-linux-release.sh

This file was deleted.

22 changes: 0 additions & 22 deletions scripts/install-pahole.sh

This file was deleted.