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 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