Skip to content

Commit

Permalink
ci: Add workflow step for static build with libbfd
Browse files Browse the repository at this point in the history
It's trivial to add an additional step to the build workflows for doing
a static build with libbfd. We need libiberty-dev for that.

Static build with LLVM, however, requires compiling and installing the
static libraries first. This is left aside for now.

Signed-off-by: Quentin Monnet <quentin@isovalent.com>
  • Loading branch information
qmonnet committed Feb 1, 2023
1 parent 3300a0c commit c56192b
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion .github/workflows/build.yaml
Expand Up @@ -26,7 +26,7 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install -y \
libbfd-dev libcap-dev libelf-dev python3-docutils
libbfd-dev libcap-dev libelf-dev libiberty-dev python3-docutils
# clang/LLVM are already installed, but we're missing some aliases.
CLANG_VERSION="$(echo '__clang_major__' | clang -E - | tail -n 1)"
sudo update-alternatives \
Expand Down Expand Up @@ -67,6 +67,18 @@ jobs:
tee /dev/stderr | \
jq --exit-status ".features | .libbfd and (.llvm | not)"
- name: Build bpftool, with libbfd, static build
run: |
make -C src clean
EXTRA_CFLAGS=--static make -j -C src V=1
./src/bpftool 2>&1 | grep -q Usage
./src/bpftool -p version | \
tee /dev/stderr | \
jq --exit-status ".features | .libbfd and (.llvm | not)"
ldd ./src/bpftool 2>&1 | \
tee /dev/stderr | \
grep -q 'not a dynamic executable'
- name: Build bpftool's documentation
run: |
make -j -C docs
Expand Down

0 comments on commit c56192b

Please sign in to comment.