|
9 | 9 |
|
10 | 10 | jobs: |
11 | 11 | gen-headers: |
12 | | - name: Generate vmlinux.h |
| 12 | + name: Generate vmlinux.h (${{ matrix.arch }}) |
13 | 13 | 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 |
14 | 24 |
|
15 | 25 | steps: |
16 | 26 |
|
@@ -48,35 +58,40 @@ jobs: |
48 | 58 | ./scripts/install-dependencies.sh |
49 | 59 | ./scripts/install-bpftool.sh |
50 | 60 |
|
51 | | - - name: x86_64/vmlinux.h |
| 61 | + - name: Generate ${{ matrix.arch }}/vmlinux.h |
52 | 62 | shell: bash |
53 | | - run: ./scripts/gen-vmlinux-header.sh x86_64 |
| 63 | + run: ./scripts/gen-vmlinux-header.sh ${{ matrix.arch }} |
54 | 64 |
|
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 }} |
66 | 71 |
|
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 |
70 | 76 |
|
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-* |
74 | 82 |
|
75 | | - - name: s390x/vmlinux.h |
| 83 | + - name: Reorganize headers |
76 | 84 | 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 |
80 | 95 | uses: actions/upload-artifact@v4 |
81 | 96 | with: |
82 | 97 | name: vmlinux.h |
|
0 commit comments