Update README.md (#156) #291
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 install clang llvm-14-dev llvm | |
- name: install ecc and ecli | |
run: | | |
wget https://github.com/eunomia-bpf/eunomia-bpf/releases/latest/download/ecc && chmod +x ./ecc | |
wget https://aka.pw/bpf-ecli -O ecli && chmod +x ./ecli | |
- name: test 1 hello world | |
run: | | |
./ecc src/1-helloworld/minimal.bpf.c | |
sudo timeout -s 2 3 ./ecli run src/1-helloworld/package.json || if [ $? = 124 ]; then exit 0; else exit $?; fi | |
- name: test 2 kprobe | |
run: | | |
./ecc src/2-kprobe-unlink/kprobe-link.bpf.c | |
sudo timeout -s 2 3 ./ecli run src/2-kprobe-unlink/package.json || if [ $? = 124 ]; then exit 0; else exit $?; fi | |
- name: test 3 fentry | |
run: | | |
./ecc src/2-kprobe-unlink/kprobe-link.bpf.c | |
sudo timeout -s 2 3 ./ecli run src/2-kprobe-unlink/package.json || if [ $? = 124 ]; then exit 0; else exit $?; fi | |
- name: test 4 opensnoop | |
run: | | |
./ecc src/4-opensnoop/opensnoop.bpf.c | |
sudo timeout -s 2 3 ./ecli run src/4-opensnoop/package.json || if [ $? = 124 ]; then exit 0; else exit $?; fi | |
sudo timeout -s 2 3 ./ecli run src/4-opensnoop/package.json --pid_target 1 || if [ $? = 124 ]; then exit 0; else exit $?; fi | |
- name: test 5 bashreadline | |
run: | | |
./ecc src/5-uprobe-bashreadline/bashreadline.bpf.c | |
sudo timeout -s 2 3 ./ecli run src/5-uprobe-bashreadline/package.json || if [ $? = 124 ]; then exit 0; else exit $?; fi | |
- name: test 6 sigsnoop | |
run: | | |
./ecc src/6-sigsnoop/sigsnoop.bpf.c | |
sudo timeout -s 2 3 ./ecli run src/6-sigsnoop/package.json || if [ $? = 124 ]; then exit 0; else exit $?; fi | |
- name: test 7 execsnoop | |
run: | | |
./ecc src/7-execsnoop/execsnoop.bpf.c src/7-execsnoop/execsnoop.h | |
sudo timeout -s 2 3 ./ecli run src/7-execsnoop/package.json || if [ $? = 124 ]; then exit 0; else exit $?; fi | |
- name: test 8 exitsnoop | |
run: | | |
./ecc src/8-exitsnoop/exitsnoop.bpf.c src/8-exitsnoop/exitsnoop.h | |
sudo timeout -s 2 3 ./ecli run src/8-exitsnoop/package.json || if [ $? = 124 ]; then exit 0; else exit $?; fi | |
- name: test 9 runqlat | |
run: | | |
./ecc src/9-runqlat/runqlat.bpf.c src/9-runqlat/runqlat.h | |
sudo timeout -s 2 3 ./ecli run src/9-runqlat/package.json || if [ $? = 124 ]; then exit 0; else exit $?; fi | |
- name: test 10 hardirqs | |
run: | | |
./ecc src/10-hardirqs/hardirqs.bpf.c src/10-hardirqs/hardirqs.h | |
sudo timeout -s 2 3 ./ecli run src/10-hardirqs/package.json || if [ $? = 124 ]; then exit 0; else exit $?; fi | |
- name: test 20 tc | |
run: | | |
./ecc src/20-tc/tc.bpf.c | |
sudo timeout -s 2 3 ./ecli run src/20-tc/package.json || if [ $? = 124 ]; then exit 0; else exit $?; fi | |
- name: test 23 http | |
run: | | |
./ecc src/23-http/accept.bpf.c src/23-http/accept.h | |
sudo timeout -s 2 3 ./ecli run src/23-http/package.json || if [ $? = 124 ]; then exit 0; else exit $?; fi | |
- name: test 34 syscall | |
run: | | |
./ecc src/34-syscall/open_modify.bpf.c src/34-syscall/open_modify.h | |
sudo timeout -s 2 3 ./ecli run src/34-syscall/package.json || if [ $? = 124 ]; then exit 0; else exit $?; fi | |
./ecc src/34-syscall/exechijack.bpf.c src/34-syscall/exechijack.h | |
sudo timeout -s 2 3 ./ecli run src/34-syscall/package.json || if [ $? = 124 ]; then exit 0; else exit $?; fi | |
- name: test 25 signal | |
run: | | |
./ecc src/25-signal/signal.bpf.c src/25-signal/signal.h | |
sudo timeout -s 2 3 ./ecli run src/25-signal/package.json || if [ $? = 124 ]; then exit 0; else exit $?; fi | |
- name: test 31 goroutine | |
run: | | |
./ecc src/31-goroutine/goroutine.bpf.c src/31-goroutine/goroutine.h | |
# todo |