Build libbpf on CI
This commit is contained in:
parent
e5cb5dca61
commit
e77fd7ddb9
|
@ -35,6 +35,8 @@ jobs:
|
|||
libjansson-dev \
|
||||
libjemalloc-dev \
|
||||
libc-ares-dev \
|
||||
libelf-dev \
|
||||
libc6-dev-i386 \
|
||||
cmake \
|
||||
cmake-data
|
||||
echo 'CPPFLAGS=-fsanitize=address,undefined -fno-sanitize-recover=undefined -g' >> $GITHUB_ENV
|
||||
|
@ -75,6 +77,18 @@ jobs:
|
|||
run: |
|
||||
echo 'CC=gcc' >> $GITHUB_ENV
|
||||
echo 'CXX=g++' >> $GITHUB_ENV
|
||||
- name: Build libbpf
|
||||
if: matrix.http3 == 'http3' && matrix.compiler == 'clang' && runner.os == 'Linux'
|
||||
run: |
|
||||
git clone -b v0.4.0 https://github.com/libbpf/libbpf
|
||||
cd libbpf
|
||||
export PREFIX=$PWD/build
|
||||
cd src
|
||||
make install
|
||||
|
||||
EXTRA_AUTOTOOLS_OPTS="--with-libbpf"
|
||||
|
||||
echo 'EXTRA_AUTOTOOLS_OPTS='"$EXTRA_AUTOTOOLS_OPTS" >> $GITHUB_ENV
|
||||
- name: Build quictls/openssl
|
||||
if: matrix.http3 == 'http3'
|
||||
run: |
|
||||
|
@ -104,9 +118,9 @@ jobs:
|
|||
- name: Setup extra environment variables for HTTP/3
|
||||
if: matrix.http3 == 'http3'
|
||||
run: |
|
||||
PKG_CONFIG_PATH="$PWD/openssl/build/lib/pkgconfig:$PWD/nghttp3/build/lib/pkgconfig:$PWD/ngtcp2/build/lib/pkgconfig:$PKG_CONFIG_PATH"
|
||||
LDFLAGS="$LDFLAGS -Wl,-rpath,$PWD/openssl/build/lib"
|
||||
EXTRA_AUTOTOOLS_OPTS="--enable-http3"
|
||||
PKG_CONFIG_PATH="$PWD/openssl/build/lib/pkgconfig:$PWD/nghttp3/build/lib/pkgconfig:$PWD/ngtcp2/build/lib/pkgconfig:$PWD/libbpf/build/lib64/pkgconfig:$PKG_CONFIG_PATH"
|
||||
LDFLAGS="$LDFLAGS -Wl,-rpath,$PWD/openssl/build/lib -Wl,-rpath,$PWD/libbpf/build/lib64"
|
||||
EXTRA_AUTOTOOLS_OPTS="--enable-http3 $EXTRA_AUTOTOOLS_OPTS"
|
||||
|
||||
echo 'PKG_CONFIG_PATH='"$PKG_CONFIG_PATH" >> $GITHUB_ENV
|
||||
echo 'LDFLAGS='"$LDFLAGS" >> $GITHUB_ENV
|
||||
|
|
|
@ -34,4 +34,7 @@ $(builddir)/reuseport_kern.o: reuseport_kern.c
|
|||
$(CC) @LIBBPF_CFLAGS@ @BPFCFLAGS@ @EXTRABPFCFLAGS@ \
|
||||
-target bpf -g -c $< -o $@
|
||||
|
||||
clean-local:
|
||||
-rm -f reuseport_kern.o
|
||||
|
||||
endif # HAVE_LIBBPF
|
||||
|
|
Loading…
Reference in New Issue