Skip to content

Commit

Permalink
kernel-build: add build selftests/sched_ext step
Browse files Browse the repository at this point in the history
  • Loading branch information
theihor committed Oct 17, 2024
1 parent 99aee90 commit 3017e13
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
4 changes: 4 additions & 0 deletions .github/scripts/tar-artifact.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ if [ $archive_make_helpers -ne 0 ]; then
)
fi

# Make sure sched_ext tests are included in the tarball
mkdir -p selftests
mv tools/testing/selftests/sched_ext selftests

tar -cf - \
kbuild-output \
Expand All @@ -95,6 +98,7 @@ tar -cf - \
--exclude '*.h' \
--exclude '*.output' \
selftests/bpf/ \
selftests/sched_ext/ \
| zstd -T0 -19 -o "vmlinux-${arch}-${toolchain}.tar.zst"

# Cleanup and restore the original KBUILD_OUTPUT
Expand Down
17 changes: 14 additions & 3 deletions .github/workflows/kernel-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ jobs:
|| github.base_ref
|| 'bpf-next'
}}
BUILD_SCHED_EXT_SELFTESTS: ${{ inputs.arch == 'x86_64' || inputs.arch == 'aarch64' && 'true' || '' }}
steps:
- uses: actions/checkout@v4
# We fetch an actual bit of history here to facilitate incremental
Expand Down Expand Up @@ -83,22 +84,22 @@ jobs:
- uses: libbpf/ci/patch-kernel@v1
with:
patches-root: '${{ github.workspace }}/ci/diffs'
repo-root: '${{ github.workspace }}'
repo-root: ${{ env.REPO_ROOT }}
- name: Setup build environment
uses: libbpf/ci/setup-build-env@v1
with:
arch: ${{ inputs.arch }}
llvm-version: ${{ inputs.llvm-version }}
pahole: c2f89dab3f2b0ebb53bab3ed8be32f41cb743c37
- name: Build kernel image
uses: libbpf/ci/build-linux@v1
uses: theihor/libbpf-ci/build-linux@build-scx
with:
arch: ${{ inputs.arch }}
toolchain: ${{ inputs.toolchain }}
kbuild-output: ${{ env.KBUILD_OUTPUT }}
max-make-jobs: 32
llvm-version: ${{ inputs.llvm-version }}
- name: Build selftests
- name: Build selftests/bpf
uses: libbpf/ci/build-selftests@v1
with:
arch: ${{ inputs.arch }}
Expand All @@ -111,6 +112,16 @@ jobs:
# RELEASE=0 adds -O0 make flag
# RELEASE=1 adds -O2 make flag
RELEASE: ${{ inputs.release && '1' || '' }}
- if: ${{ env.BUILD_SCHED_EXT_SELFTESTS }}
name: Build selftests/sched_ext
uses: theihor/libbpf-ci/build-scx-selftests@build-scx
with:
kbuild-output: ${{ env.KBUILD_OUTPUT }}
repo-root: ${{ env.REPO_ROOT }}
arch: ${{ inputs.arch }}
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@v1
Expand Down

0 comments on commit 3017e13

Please sign in to comment.