diff --git a/.github/scripts/tar-artifact.sh b/.github/scripts/tar-artifact.sh index 133151c..2a59d35 100644 --- a/.github/scripts/tar-artifact.sh +++ b/.github/scripts/tar-artifact.sh @@ -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 \ @@ -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 diff --git a/.github/workflows/kernel-build.yml b/.github/workflows/kernel-build.yml index aafb908..0bbff07 100644 --- a/.github/workflows/kernel-build.yml +++ b/.github/workflows/kernel-build.yml @@ -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 @@ -83,7 +84,7 @@ 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: @@ -91,14 +92,14 @@ jobs: 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 }} @@ -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