Skip to content

Commit 81b4f83

Browse files
committed
Generate vmlinux.h headers in parallel
Generate vmlinux.h headers for all supported architectures in parallel, by using dedicated jobs. Doing so speeds up the workflow from ~27min to ~6min. Signed-off-by: Daniel Müller <deso@posteo.net>
1 parent 991dd4b commit 81b4f83

1 file changed

Lines changed: 38 additions & 23 deletions

File tree

.github/workflows/vmlinux.h.yml

Lines changed: 38 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,18 @@ on:
99

1010
jobs:
1111
gen-headers:
12-
name: Generate vmlinux.h
12+
name: Generate vmlinux.h (${{ matrix.arch }})
1313
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
arch:
17+
- x86_64
18+
- aarch64
19+
- arm
20+
- loongarch64
21+
- ppc64le
22+
- riscv64
23+
- s390x
1424

1525
steps:
1626

@@ -27,35 +37,40 @@ jobs:
2737
./scripts/install-pahole.sh
2838
./scripts/install-bpftool.sh
2939
30-
- name: x86_64/vmlinux.h
40+
- name: Generate ${{ matrix.arch }}/vmlinux.h
3141
shell: bash
32-
run: ./scripts/gen-vmlinux-header.sh x86_64
42+
run: ./scripts/gen-vmlinux-header.sh ${{ matrix.arch }}
3343

34-
- name: aarch64/vmlinux.h
35-
shell: bash
36-
run: ./scripts/gen-vmlinux-header.sh aarch64
37-
38-
- name: arm/vmlinux.h
39-
shell: bash
40-
run: ./scripts/gen-vmlinux-header.sh arm
41-
42-
- name: loongarch64/vmlinux.h
43-
shell: bash
44-
run: ./scripts/gen-vmlinux-header.sh loongarch64
44+
- name: Upload headers
45+
uses: actions/upload-artifact@v4
46+
with:
47+
name: vmlinux.h-${{ matrix.arch }}
48+
if-no-files-found: error
49+
path: ./vmlinux.h/${{ matrix.arch }}
4550

46-
- name: ppc64le/vmlinux.h
47-
shell: bash
48-
run: ./scripts/gen-vmlinux-header.sh ppc64le
51+
combine-headers:
52+
name: Combine all vmlinux.h headers
53+
runs-on: ubuntu-latest
54+
needs: gen-headers
4955

50-
- name: riscv64/vmlinux.h
51-
shell: bash
52-
run: ./scripts/gen-vmlinux-header.sh riscv64
56+
steps:
57+
- name: Download all artifacts
58+
uses: actions/download-artifact@v4
59+
with:
60+
pattern: vmlinux.h-*
5361

54-
- name: s390x/vmlinux.h
62+
- name: Reorganize headers
5563
shell: bash
56-
run: ./scripts/gen-vmlinux-header.sh s390x
64+
run: |
65+
mkdir -p vmlinux.h
66+
for dir in vmlinux.h-*/; do
67+
arch="${dir#vmlinux.h-}"
68+
arch="${arch%/}"
69+
mkdir -p "vmlinux.h/$arch"
70+
mv "$dir"* "vmlinux.h/$arch/"
71+
done
5772
58-
- name: Upload headers
73+
- name: Upload combined headers
5974
uses: actions/upload-artifact@v4
6075
with:
6176
name: vmlinux.h

0 commit comments

Comments
 (0)