mirror of
https://github.com/eunomia-bpf/bpf-developer-tutorial.git
synced 2026-02-03 18:24:27 +08:00
Replace ``` docker run -it -v `pwd`/:/src/ yunwei37/ebpm:latest ``` with: ``` docker run -it -v `pwd`/:/src/ ghcr.io/eunomia-bpf/ecc-`uname -m`:latest ``` Add a basic CI check for the hello world BPF program.
30 lines
911 B
YAML
30 lines
911 B
YAML
name: Test 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
|
|
- name: test hello world
|
|
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
|
|
./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: install deps
|
|
run: |
|
|
sudo apt-get install -y --no-install-recommends \
|
|
libelf1 libelf-dev zlib1g-dev libclang-13-dev \
|
|
make git clang llvm pkg-config build-essential
|