Files
bpf-developer-tutorial/.github/workflows/test-libbpf.yml
云微 3a722c03d5 feat: add tcx and bpf token tutorials (#203)
* feat: add tcx and bpf token tutorials

* docs: auto-generate documentation

* docs: rewrite tcx and bpf_token tutorials with richer content and consistent style

Rewrote all 4 README files (EN/ZH for both tutorials) to match the
existing tutorial style with detailed background, full code listings,
step-by-step explanations, comparison tables, and proper references.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* style: replace em dashes with colons, commas, and parentheses

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* docs: auto-generate documentation

* ci: add tcx and bpf_token builds to CI; simplify execl in token_userns_demo

- Add make targets for src/50-tcx and src/features/bpf_token to the
  test-libbpf CI workflow.
- Replace four separate execl() calls with a single execv() using a
  dynamically built argv array, reducing complexity and eliminating
  CodeFactor command-injection false positives.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* ci: fix mkdocs path in trigger-sync workflow

Use .venv/bin/mkdocs instead of bare mkdocs, since make install
puts it inside a virtualenv.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: LinuxDev9002 <linuxdev8883@example.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 21:23:23 -07:00

122 lines
3.6 KiB
YAML

name: Test eunomia-bpf example CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
schedule:
- cron: '0 0 * * 0'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: install deps
run: |
sudo apt-get install -y --no-install-recommends \
libelf1 libelf-dev zlib1g-dev \
make git clang llvm pkg-config build-essential
- name: test 11 bootstrap
run: |
make -C src/11-bootstrap
sudo timeout -s 2 3 src/11-bootstrap/bootstrap || if [ $? = 124 ]; then exit 0; else exit $?; fi
- name: test 12 profile
run: |
make -C src/12-profile
# sudo timeout -s 2 3 src/12-profile/profile || if [ $? = 124 ]; then exit 0; else exit $?; fi
- name: test 13 tcpconnlat
run: |
make -C src/13-tcpconnlat
sudo timeout -s 2 3 src/13-tcpconnlat/tcpconnlat || if [ $? = 124 ]; then exit 0; else exit $?; fi
- name: test 14 tcpstates
run: |
make -C src/14-tcpstates
sudo timeout -s 2 3 src/14-tcpstates/tcpstates || if [ $? = 124 ]; then exit 0; else exit $?; fi
- name: test 16 memleak
run: |
make -C src/16-memleak
sudo timeout -s 2 3 src/16-memleak/memleak || if [ $? = 124 ]; then exit 0; else exit $?; fi
- name: test 17 biopattern
run: |
make -C src/17-biopattern
sudo timeout -s 2 3 src/17-biopattern/biopattern || if [ $? = 124 ]; then exit 0; else exit $?; fi
- name: test 23 http
run: |
make -C src/23-http
sudo timeout -s 2 3 src/23-http/sockfilter || if [ $? = 124 ]; then exit 0; else exit $?; fi
- name: test 28 detach
run: |
make -C src/28-detach
sudo mount bpffs -t bpf /sys/fs/bpf
sudo mkdir /sys/fs/bpf/textreplace
# sudo src/28-detach/textreplace2 -f /proc/modules -i 'joydev' -r 'cryptd' -d || if [ $? = 124 ]; then exit 0; else exit $?; fi
- name: test 29 sockops
run: |
make -C src/29-sockops
# TODO: add test
- name: test 30 sslsniff
run: |
make -C src/30-sslsniff
sudo timeout -s 2 3 src/30-sslsniff/sslsniff || if [ $? = 124 ]; then exit 0; else exit $?; fi
- name: test 32 wallclock-profiler
run: |
make -C src/32-wallclock-profiler
# Test individual tools can be built and show help
src/32-wallclock-profiler/oncputime --help || true
src/32-wallclock-profiler/offcputime --help || true
- name: test 33 funclatency
run: |
make -C src/33-funclatency
- name: test 35-user-ringbuf
run: |
make -C src/35-user-ringbuf
sudo timeout -s 2 3 src/35-user-ringbuf/user_ringbuf || if [ $? = 124 ]; then exit 0; else exit $?; fi
- name: test 41 xdp
run: |
make -C src/41-xdp-tcpdump
- name: test 42 xdp
run: |
make -C src/42-xdp-loadbalancer
- name: test 43 kfuncs
run: |
make -C src/43-kfuncs
- name: test 44
run: |
make -C src/44-scx-simple
- name: test 45
run: |
make -C src/45-scx-nest
- name: test 46 xdp-pktgen
run: |
make -C src/46-xdp-test
- name: test features bpf_arena
run: |
make -C src/features/bpf_arena
- name: test features bpf_iters
run: |
make -C src/features/bpf_iters
- name: test features bpf_wq
run: |
make -C src/features/bpf_wq
- name: test 50 tcx
run: |
make -C src/50-tcx
- name: test features bpf_token
run: |
make -C src/features/bpf_token