Skip to content

Commit 9afc86b

Browse files
authored
CI: add build benchmark and License identifier (#87)
* add license * add build benchmark ci * add more license identifier * add more license * add license * add more license header * fix redis patch * ci: fix compile * fix ci
1 parent 391c174 commit 9afc86b

File tree

116 files changed

+847
-216
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

116 files changed

+847
-216
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Build benchmarks
2+
3+
on:
4+
push:
5+
branches: "master"
6+
pull_request:
7+
branches: "master"
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-22.04
12+
13+
steps:
14+
- uses: actions/checkout@v3
15+
with:
16+
submodules: 'recursive'
17+
18+
- name: install deps
19+
run: |
20+
sudo apt install -y --no-install-recommends \
21+
libelf1 libelf-dev zlib1g-dev make git libboost1.74-all-dev \
22+
binutils-dev libyaml-cpp-dev gcc-12 g++-12 llvm
23+
24+
- name: build runtime
25+
run: CC=gcc-12 CXX=g++-12 make release -j
26+
27+
- name: build benchmarks
28+
run: make -C benchmark

.github/workflows/test-runtime.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ jobs:
2929

3030
- name: build runtime with mpk enable
3131
run: |
32-
make clean
33-
cmake -Bbuild -DBPFTIME_ENABLE_UNIT_TESTING=0 \
34-
-DCMAKE_BUILD_TYPE:STRING=Release \
35-
-DBPFTIME_ENABLE_LTO=0 -DBPFTIME_ENABLE_MPK=1
36-
cmake --build build --config Release
32+
make clean
33+
cmake -Bbuild -DBPFTIME_ENABLE_UNIT_TESTING=1 -DBPFTIME_ENABLE_MPK=1
34+
cmake --build build --config Debug -DBPFTIME_ENABLE_MPK=1
35+
cmake --build build
36+
3737
- name: test runtime with mpk
38-
run: make unit-test
38+
run: make unit-test

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ see [documents/build-and-test.md](https://github.com/eunomia-bpf/bpftime/tree/ma
189189
- [ ] More examples and usecases:
190190
- [ ] Network on userspace eBPF
191191
- [ ] Hotpatch userspace application
192+
- [ ] Error injection and filter syscall
192193
- [ ] etc...
193194
- [ ] More map types and distribution maps support.
194195
- [ ] More program types support.

benchmark/Makefile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,12 @@
1+
all: benchmark test
12
test: test.c
23
gcc test.c -o test
4+
5+
# test with the files in bpf-loader
6+
TEST_CASES_DIRS=$(filter-out $(SKIP_TESTS),$(shell ls -l $(./) | grep ^d | awk '{print $$9}'))
7+
benchmark: $(TEST_CASES_DIRS)
8+
9+
.PHONY:$(TEST_CASES_DIRS)
10+
# build the test cases
11+
$(TEST_CASES_DIRS):
12+
make -C $(TEST_EXAMPLE_DIR)$@/

benchmark/bpf-syscall/bpf-syscall-bench.c

Lines changed: 0 additions & 115 deletions
This file was deleted.

benchmark/ssl-nginx/.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
access.log
22
nginx.pid
33
nginx-error.txt
4-
sslsniff
4+
sslsniff
5+
wrk

benchmark/ssl-nginx/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
index.html: index.html

benchmark/tools/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
readlink

benchmark/tools/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
readlink: readlink.cpp
2+
g++ readlink.cpp -o readlink

daemon/bpf_tracer_event.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
/* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) */
1+
/* SPDX-License-Identifier: MIT
2+
*
3+
* Copyright (c) 2022, eunomia-bpf org
4+
* All rights reserved.
5+
*/
26
#ifndef __SYSCALL_TRACER_H
37
#define __SYSCALL_TRACER_H
48

0 commit comments

Comments
 (0)