Skip to content

Commit

Permalink
GCC BPF: handle source download when necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
theihor committed Feb 3, 2025
1 parent c86a698 commit 4cb3682
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/gcc-bpf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ on:
toolchain_full:
required: true
type: string
download_sources:
required: true
type: boolean

jobs:
test:
Expand All @@ -27,10 +30,35 @@ jobs:
env:
ARCH: ${{ inputs.arch }}
BPF_GCC_INSTALL_DIR: ${{ github.workspace }}/gcc-bpf
BPF_NEXT_BASE_BRANCH: 'master'
KBUILD_OUTPUT: ${{ github.workspace }}/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: '.kernel'
rev: ${{ env.BPF_NEXT_BASE_BRANCH }}

- if: ${{ inputs.download_sources }}
name: Move linux source in place
shell: bash
run: |
cd .kernel
rm -rf .git
mv -t .. $(ls -A)
cd ..
rmdir .kernel
- 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 }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/kernel-build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,4 +141,5 @@ jobs:
llvm-version: ${{ inputs.llvm-version }}
toolchain: ${{ inputs.toolchain }}
toolchain_full: ${{ inputs.toolchain_full }}
download_sources: ${{ inputs.download_sources }}

0 comments on commit 4cb3682

Please sign in to comment.