99
1010jobs :
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
@@ -31,35 +41,40 @@ jobs:
3141 ./scripts/install-pahole.sh
3242 ./scripts/install-bpftool.sh
3343
34- - name : x86_64 /vmlinux.h
44+ - name : Generate ${{ matrix.arch }} /vmlinux.h
3545 shell : bash
36- run : ./scripts/gen-vmlinux-header.sh x86_64
46+ run : ./scripts/gen-vmlinux-header.sh ${{ matrix.arch }}
3747
38- - name : aarch64/vmlinux.h
39- shell : bash
40- run : ./scripts/gen-vmlinux-header.sh aarch64
41-
42- - name : arm/vmlinux.h
43- shell : bash
44- run : ./scripts/gen-vmlinux-header.sh arm
45-
46- - name : loongarch64/vmlinux.h
47- shell : bash
48- run : ./scripts/gen-vmlinux-header.sh loongarch64
48+ - name : Upload headers
49+ uses : actions/upload-artifact@v4
50+ with :
51+ name : vmlinux.h-${{ matrix.arch }}
52+ if-no-files-found : error
53+ path : ./vmlinux.h/${{ matrix.arch }}
4954
50- - name : ppc64le/vmlinux.h
51- shell : bash
52- run : ./scripts/gen-vmlinux-header.sh ppc64le
55+ combine-headers :
56+ name : Combine all vmlinux.h headers
57+ runs-on : ubuntu-latest
58+ needs : gen-headers
5359
54- - name : riscv64/vmlinux.h
55- shell : bash
56- run : ./scripts/gen-vmlinux-header.sh riscv64
60+ steps :
61+ - name : Download all artifacts
62+ uses : actions/download-artifact@v4
63+ with :
64+ pattern : vmlinux.h-*
5765
58- - name : s390x/vmlinux.h
66+ - name : Reorganize headers
5967 shell : bash
60- run : ./scripts/gen-vmlinux-header.sh s390x
68+ run : |
69+ mkdir -p vmlinux.h
70+ for dir in vmlinux.h-*/; do
71+ arch="${dir#vmlinux.h-}"
72+ arch="${arch%/}"
73+ mkdir -p "vmlinux.h/$arch"
74+ mv "$dir"* "vmlinux.h/$arch/"
75+ done
6176
62- - name : Upload headers
77+ - name : Upload combined headers
6378 uses : actions/upload-artifact@v4
6479 with :
6580 name : vmlinux.h
0 commit comments