-
Notifications
You must be signed in to change notification settings - Fork 33
94 lines (81 loc) · 2.52 KB
/
gcc-bpf.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
name: Testing GCC BPF compiler
on:
workflow_call:
inputs:
runs_on:
required: true
type: string
arch:
required: true
type: string
llvm-version:
required: true
type: string
toolchain:
required: true
type: string
toolchain_full:
required: true
type: string
download_sources:
required: true
type: boolean
jobs:
test:
name: GCC BPF
runs-on: ${{ fromJSON(inputs.runs_on) }}
timeout-minutes: 100
env:
ARCH: ${{ inputs.arch }}
BPF_GCC_INSTALL_DIR: ${{ github.workspace }}/gcc-bpf
BPF_NEXT_BASE_BRANCH: 'master'
REPO_ROOT: ${{ github.workspace }}/src
KBUILD_OUTPUT: ${{ github.workspace }}/src/kbuild-output
steps:
- uses: actions/checkout@v4
with:
sparse-checkout: |
.github
ci
- if: ${{ inputs.download_sources }}
name: Download bpf-next tree
uses: libbpf/ci/get-linux-source@v3
with:
dest: ${{ env.REPO_ROOT }}
rev: ${{ env.BPF_NEXT_BASE_BRANCH }}
- if: ${{ ! inputs.download_sources }}
name: Checkout ${{ github.repository }} to ./src
uses: actions/checkout@v4
with:
path: 'src'
- uses: libbpf/ci/patch-kernel@v3
with:
patches-root: '${{ github.workspace }}/ci/diffs'
repo-root: ${{ env.REPO_ROOT }}
- uses: actions/download-artifact@v4
with:
name: vmlinux-${{ inputs.arch }}-${{ inputs.toolchain_full }}
path: ${{ env.REPO_ROOT }}
- name: Untar artifacts
working-directory: ${{ env.REPO_ROOT }}
run: zstd -d -T0 vmlinux-${{ inputs.arch }}-${{ inputs.toolchain_full }}.tar.zst --stdout | tar -xf -
- name: Setup build environment
uses: libbpf/ci/setup-build-env@v3
with:
arch: ${{ inputs.arch }}
llvm-version: ${{ inputs.llvm-version }}
- name: Build GCC BPF compiler
uses: libbpf/ci/build-bpf-gcc@v3
with:
install-dir: ${{ env.BPF_GCC_INSTALL_DIR }}
- name: Build selftests/bpf/test_progs-bpf_gcc
uses: libbpf/ci/build-selftests@v3
env:
MAX_MAKE_JOBS: 32
BPF_GCC: ${{ env.BPF_GCC_INSTALL_DIR }}
SELFTESTS_BPF_TARGETS: 'test_progs-bpf_gcc'
with:
arch: ${{ inputs.arch }}
kernel-root: ${{ env.REPO_ROOT }}
llvm-version: ${{ inputs.llvm-version }}
toolchain: ${{ inputs.toolchain }}