-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
.github/scripts/setup.sh installs dependencies necessary to build and run the tests, assuming Ubuntu-like environment. libfuse2t64 is a runtime dependency for appimages [1], and bpftrace binary is distributed as an appimage. [1] https://github.com/appimage/appimagekit/wiki/fuse Signed-off-by: Ihor Solodrai <[email protected]>
- Loading branch information
Showing
2 changed files
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
BPFTRACE_VERSION=${BPFTRACE_VERSION:-0.22.1} | ||
|
||
# Assume sudo in this script | ||
|
||
# Install dependencies | ||
apt update && apt install -y make file gawk libfuse2t64 | ||
|
||
# Download bpftrace release | ||
BIN_DIR=/usr/local/bin | ||
mkdir -p $BIN_DIR | ||
curl -L -o bpftrace https://github.com/bpftrace/bpftrace/releases/download/v${BPFTRACE_VERSION}/bpftrace | ||
chmod +x bpftrace | ||
mv bpftrace $BIN_DIR | ||
bpftrace --version | ||
|
||
# mount tracefs to avoid warnings from bpftrace | ||
grep -q tracefs /proc/mounts || mount -t tracefs tracefs /sys/kernel/tracing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: USDT CI | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install prerequisites | ||
run: sudo .github/scripts/setup.sh | ||
|
||
- name: Build (static) | ||
run: make SHARED=0 -C tests -j$(nproc) build | ||
|
||
- name: Build (shared) | ||
run: make SHARED=1 -C tests -j$(nproc) build | ||
|
||
- name: Test (static) | ||
run: make SHARED=0 -C tests test | ||
|
||
- name: Test (shared) | ||
run: make SHARED=1 -C tests test | ||
|