Skip to content

test: add trace-signal tool support builtin testing #37

test: add trace-signal tool support builtin testing

test: add trace-signal tool support builtin testing #37

Workflow file for this run

name: CI
on:
pull_request:
types: [opened, synchronize, reopened]
push:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
# ─── 编译矩阵 (Debug + Release) ───
build:
runs-on: self-hosted
strategy:
matrix:
build-type: [Debug, Release]
max-parallel: 1
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
build-essential clang llvm libbpf-dev bpftool cmake
- name: Clean build artifacts
run: make clean
- name: Build BPF programs
run: make bpf Release=${{ matrix.build-type == 'Release' && '1' || '0' }}
- name: Build user-space programs
run: make -j$(nproc) observe filter policy so demo \
Release=${{ matrix.build-type == 'Release' && '1' || '0' }}
- name: Smoke test with lsns
if: matrix.build-type == 'Debug'
timeout-minutes: 1
run: |
echo "=== Smoke test: running lsns ==="
sudo -E env "PATH=$PATH" ./build/observe/lsns
echo "=== Smoke test passed ==="
- name: Upload test logs on failure
if: failure()
uses: actions/upload-artifact@v4
with:
name: test-logs-${{ matrix.build-type }}
path: build/test/*.log
# ─── x86 DEB 打包(仅 push main 时触发)───
package:
needs: [build]
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: self-hosted
env:
MAKEFLAGS: -j4
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
build-essential clang llvm libbpf-dev bpftool cmake dpkg-dev
- name: Build DEB package
run: IN_KERNEL_TREE=1 ./script/build-deb.sh
- name: Upload DEB package
uses: actions/upload-artifact@v4
with:
name: dkapture-deb
path: ./*.deb