Skip to content

runtime: support map type perf_event_array #92

runtime: support map type perf_event_array

runtime: support map type perf_event_array #92

Workflow file for this run

name: Test whether CLI works properly
on:
push:
branches: "master"
pull_request:
branches: "master"
jobs:
build-runtime-cli-and-test-cli:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: Install dependencies
run: |
sudo apt-get install binutils-dev libboost1.74-all-dev libelf-dev zlib1g-dev libyaml-cpp-dev gcc-12 g++-12
- name: Build and install runtime
run: |
CC=gcc-12 CXX=g++-12 make release
- name: Build and install CLI
run: |
cd tools/cli-rs
RUSTFLAGS="-C target-feature=+crt-static" cargo build --release --target x86_64-unknown-linux-gnu
mkdir -p ~/.bpftime
cp ./target/x86_64-unknown-linux-gnu/release/bpftime ~/.bpftime
- uses: actions/upload-artifact@v3
with:
name: bpftime-cli
path: ~/.bpftime/bpftime
- name: Build test assets
run: |
cd example/malloc
make -j
- name: Test CLI - attach by running
run: |
export PATH=$PATH:~/.bpftime
bpftime --help
cd example/malloc
timeout -s 2 15s bpftime load ./malloc || if [ $? = 124 ]; then exit 0; else exit $?; fi &
sleep 10s
ID1=$!
timeout -s 2 5s bpftime start ./test || if [ $? = 124 ]; then exit 0; else exit $?; fi
fg $ID1 || true