Skip to content

Commit 14e66a3

Browse files
d-e-s-odanielocfb
authored andcommitted
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 6eb5f7a commit 14e66a3

1 file changed

Lines changed: 39 additions & 24 deletions

File tree

.github/workflows/vmlinux.h.yml

Lines changed: 39 additions & 24 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

@@ -48,35 +58,40 @@ jobs:
4858
./scripts/install-dependencies.sh
4959
./scripts/install-bpftool.sh
5060
51-
- name: x86_64/vmlinux.h
61+
- name: Generate ${{ matrix.arch }}/vmlinux.h
5262
shell: bash
53-
run: ./scripts/gen-vmlinux-header.sh x86_64
63+
run: ./scripts/gen-vmlinux-header.sh ${{ matrix.arch }}
5464

55-
- name: aarch64/vmlinux.h
56-
shell: bash
57-
run: ./scripts/gen-vmlinux-header.sh aarch64
58-
59-
- name: arm/vmlinux.h
60-
shell: bash
61-
run: ./scripts/gen-vmlinux-header.sh arm
62-
63-
- name: loongarch64/vmlinux.h
64-
shell: bash
65-
run: ./scripts/gen-vmlinux-header.sh loongarch64
65+
- name: Upload headers
66+
uses: actions/upload-artifact@v4
67+
with:
68+
name: vmlinux.h-${{ matrix.arch }}
69+
if-no-files-found: error
70+
path: ./vmlinux.h/${{ matrix.arch }}
6671

67-
- name: ppc64le/vmlinux.h
68-
shell: bash
69-
run: ./scripts/gen-vmlinux-header.sh ppc64le
72+
combine-headers:
73+
name: Combine all vmlinux.h headers
74+
runs-on: ubuntu-latest
75+
needs: gen-headers
7076

71-
- name: riscv64/vmlinux.h
72-
shell: bash
73-
run: ./scripts/gen-vmlinux-header.sh riscv64
77+
steps:
78+
- name: Download all artifacts
79+
uses: actions/download-artifact@v4
80+
with:
81+
pattern: vmlinux.h-*
7482

75-
- name: s390x/vmlinux.h
83+
- name: Reorganize headers
7684
shell: bash
77-
run: ./scripts/gen-vmlinux-header.sh s390x
78-
79-
- name: Upload headers
85+
run: |
86+
mkdir -p vmlinux.h
87+
for dir in vmlinux.h-*/; do
88+
arch="${dir#vmlinux.h-}"
89+
arch="${arch%/}"
90+
mkdir -p "vmlinux.h/$arch"
91+
mv "$dir"* "vmlinux.h/$arch/"
92+
done
93+
94+
- name: Upload combined headers
8095
uses: actions/upload-artifact@v4
8196
with:
8297
name: vmlinux.h

0 commit comments

Comments
 (0)