Skip to content

Commit e055fde

Browse files
committed
ci: Create build.yml
Add a simple build testing using Github Actions. Signed-off-by: Andrii Nakryiko <[email protected]>
1 parent 3f352e3 commit e055fde

File tree

3 files changed

+26
-3
lines changed

3 files changed

+26
-3
lines changed

.github/workflows/build.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: veristat build
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
9+
jobs:
10+
build:
11+
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v3
16+
with:
17+
submodules: true
18+
- name: Install dependencies
19+
run: sudo apt-get install -y elfutils libelf-dev
20+
- name: make
21+
run: make -C src -j$(nproc)

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
# veristat
1+
veristat
2+
[![Build](https://github.com/libbpf/veristat/actions/workflows/build.yml/badge.svg)](https://github.com/libbpf/veristat/actions/workflows/build.yml)
3+
========
24

35
> This is a mirror of veristat sources from
46
> [bpf-next](https://kernel.googlesource.com/pub/scm/linux/kernel/git/bpf/bpf-next)

src/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ VERISTAT_VERSION ?= 0.1
33
DEBUG ?=
44

55
OUTPUT := .output
6-
LIBBPF_SRC := $(abspath ../../libbpf/src)
6+
LIBBPF_SRC := $(abspath ../libbpf/src)
77
LIBBPF_OBJ := $(abspath $(OUTPUT)/libbpf.a)
88
# Use our own libbpf API headers and Linux UAPI headers distributed with
99
# libbpf to avoid dependency on system-wide headers, which could be missing or
@@ -68,7 +68,7 @@ $(LIBBPF_OBJ): $(wildcard $(LIBBPF_SRC)/*.[ch] $(LIBBPF_SRC)/Makefile) | $(OUTPU
6868
install
6969

7070
# Build .c files
71-
$(OUTPUT)/%.o: %.c $(wildcard %.h) | $(OUTPUT)
71+
$(OUTPUT)/%.o: %.c $(wildcard %.h) $(LIBBPF_OBJ) | $(OUTPUT)
7272
$(call msg,CC,$@)
7373
$(Q)$(CC) $(ALL_CFLAGS) $(INCLUDES) -c $(filter %.c,$^) -o $@
7474

0 commit comments

Comments
 (0)