Skip to content

bpf-next-test

bpf-next-test #59

Workflow file for this run

name: bpf-next-test
on:
# only runs on main, every 6 hours. specify hours explicitly so scheduled runs can be offset and use a random minute.
schedule:
- cron: "35 0,6,12,18 * * *"
jobs:
build-kernel:
uses: ./.github/workflows/build-kernel.yml
with:
repo-name: bpf/bpf-next
integration-test:
runs-on: ubuntu-24.04
needs: build-kernel
strategy:
matrix:
scheduler: [ scx_bpfland, scx_lavd, scx_layered, scx_rlfifo, scx_rustland, scx_rusty, scx_p2dq, scx_tickless ]
fail-fast: false
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/restore-kernel-cache
with:
repo-name: bpf/bpf-next
# prevent cache permission errors
- run: sudo chown root /usr/bin/tar && sudo chmod u+s /usr/bin/tar
- uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.scheduler }}
prefix-key: "4"
- uses: ./.github/actions/install-deps-action
# cache virtiofsd (goes away w/ 24.04)
- name: Cache virtiofsd
id: cache-virtiofsd
uses: actions/cache@v4
with:
path: |
/usr/lib/virtiofsd
key: virtiofsd-binary
- if: ${{ steps.cache-virtiofsd.outputs.cache-hit != 'true' }}
run: cargo install virtiofsd && sudo cp -a ~/.cargo/bin/virtiofsd /usr/lib/
# veristat
- run: wget https://github.com/libbpf/veristat/releases/download/v0.3.2/veristat-v0.3.2-amd64.tar.gz
- run: tar -xvf veristat-v0.3.2-amd64.tar.gz && sudo cp veristat /usr/bin/
- run: sudo chmod +x /usr/bin/veristat && sudo chmod 755 /usr/bin/veristat
# The actual build:
- run: meson setup build -Dkernel=../linux/arch/x86/boot/bzImage -Dkernel_headers=../linux -Denable_stress=true -Dvng_rw_mount=true
- run: meson compile -C build ${{ matrix.scheduler }}
# Print CPU model before running the tests (this can be useful for
# debugging purposes)
- run: grep 'model name' /proc/cpuinfo | head -1
# Test schedulers
- run: meson compile -C build test_sched_${{ matrix.scheduler }}
# this is where errors we want logs on start occurring, so always generate debug info and save logs
if: always()
# Stress schedulers
- uses: cytopia/shell-command-retry-action@v0.1.2
name: stress test
if: always()
with:
retries: 3
command: meson compile -C build stress_tests_${{ matrix.scheduler }}
- run: meson compile -C build veristat_${{ matrix.scheduler }}
if: always()
- run: sudo cat /var/log/dmesg > host-dmesg.ci.log
if: always()
- run: mkdir -p ./log_save/
if: always()
# no symlink following here (to avoid cycles)
- run: sudo find '/home/runner/' -iname '*.ci.log' -exec mv {} ./log_save/ \;
if: always()
- name: upload debug logs, bpftrace, veristat, dmesg, etc.
if: always()
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.scheduler }}_logs_${{ github.run_id }}_${{ github.run_attempt }}
path: ./log_save/*.ci.log
# it's all txt files w/ 90 day retention, lets be nice.
compression-level: 9
notify-job:
runs-on: ubuntu-latest
if: ${{ failure() && github.ref == 'refs/heads/main' }}
needs:
- integration-test
steps:
- uses: actions/checkout@v2
- name: Slack Notification
uses: rtCamp/action-slack-notify@v2
env:
SLACK_USERNAME: ci
SLACK_ICON: https://www.dictionary.com/e/wp-content/uploads/2018/03/thisisfine-1.jpg
SLACK_TITLE: Workflow failed
SLACK_MESSAGE: bpf-next ci job failed.
SLACK_COLOR: failure
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}