Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
theihor committed Dec 28, 2024
1 parent f77a54b commit 28394f2
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 10 deletions.
3 changes: 3 additions & 0 deletions .github/scripts/matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ def tests(self) -> Dict[str, Any]:
# if self.arch in [Arch.X86_64, Arch.AARCH64]:
# tests_list.append("sched_ext")

if self.arch == Arch.X86_64:
tests_list.append("test_progs-bpf_gcc")

if not self.parallel_tests:
tests_list = [test for test in tests_list if not test.endswith("parallel")]

Expand Down
28 changes: 18 additions & 10 deletions .github/workflows/kernel-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ jobs:
timeout-minutes: 100
env:
ARTIFACTS_ARCHIVE: "vmlinux-${{ inputs.arch }}-${{ inputs.toolchain_full }}.tar.zst"

BUILD_BPF_GCC: ${{ inputs.arch == 'x86_64' && 'true' || '' }}
BPF_GCC_INSTALL_DIR: ${{ github.workspace }}/bpf-gcc

BPF_NEXT_BASE_BRANCH: 'master'
BPF_NEXT_FETCH_DEPTH: 64 # A bit of history is needed to facilitate incremental builds
# BUILD_SCHED_EXT_SELFTESTS: ${{ inputs.arch == 'x86_64' || inputs.arch == 'aarch64' && 'true' || '' }}
Expand Down Expand Up @@ -86,24 +90,19 @@ jobs:
mv -t .. $(ls -A)
cd ..
rmdir .kernel
- uses: libbpf/ci/patch-kernel@v2
with:
patches-root: '${{ github.workspace }}/ci/diffs'
repo-root: ${{ env.REPO_ROOT }}

- name: Setup build environment
uses: libbpf/ci/setup-build-env@v2
uses: theihor/libbpf-ci/setup-build-env@bpf-gcc
with:
arch: ${{ inputs.arch }}
llvm-version: ${{ inputs.llvm-version }}
pahole: master
- name: Print toolchain version used
shell: bash
run: |
TOOLCHAIN=${{ inputs.toolchain }}
if [ $TOOLCHAIN = "llvm" ]; then
TOOLCHAIN="clang-${{ inputs.llvm-version }}"
fi
${TOOLCHAIN} --version

- name: Build kernel image
uses: libbpf/ci/build-linux@v2
with:
Expand All @@ -112,11 +111,19 @@ jobs:
kbuild-output: ${{ env.KBUILD_OUTPUT }}
max-make-jobs: 32
llvm-version: ${{ inputs.llvm-version }}

- if: ${{ env.BUILD_BPF_GCC }}
name: Build GCC for BPF selftests
uses: theihor/libbpf-ci/build-bpf-gcc@bpf-gcc
with:
install-dir: ${{ env.BPF_GCC_INSTALL_DIR }}

- name: Build selftests/bpf
uses: libbpf/ci/build-selftests@v2
uses: theihor/libbpf-ci/build-selftests@bpf-gcc
env:
MAX_MAKE_JOBS: 32
RELEASE: ${{ inputs.release && '1' || '' }}
BPF_GCC: ${{ env.BUILD_BPF_GCC && env.BPF_GCC_INSTALL_DIR || '' }}
with:
arch: ${{ inputs.arch }}
kernel-root: ${{ env.KERNEL_ROOT }}
Expand All @@ -133,6 +140,7 @@ jobs:
toolchain: ${{ inputs.toolchain }}
llvm-version: ${{ inputs.llvm-version }}
max-make-jobs: 32

- if: ${{ github.event_name != 'push' }}
name: Build samples
uses: libbpf/ci/build-samples@v2
Expand Down

0 comments on commit 28394f2

Please sign in to comment.