-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GCC BPF: factor out into a separate job
- Loading branch information
Showing
3 changed files
with
102 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
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: | ||
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 | ||
|
||
- 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 }} | ||
|
||
- 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@main | ||
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 }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters