Skip to content

Commit 60fe5dd

Browse files
committed
ci: Add Ubuntu 24.04 runner (with ugly hack for static libbfd)
Add a matrix job to run the build on Ubuntu 24.04 runners. This requires cheating to make the static build with libbfd-based disassembler work: we manually pass all required libraries via the $(LIBS) variable, given that the Makefile.feature is not able to tell about -lzstd or -lsframe for libbfd yet. Signed-off-by: Quentin Monnet <qmo@kernel.org>
1 parent b32f192 commit 60fe5dd

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

.github/workflows/build.yaml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
strategy:
2222
fail-fast: false
2323
matrix:
24-
os: [ubuntu-22.04]
24+
os: [ubuntu-22.04, ubuntu-24.04]
2525
runs-on: ${{ matrix.os }}
2626
env:
2727
FEATURES: .llvm and .skeletons
@@ -45,6 +45,11 @@ jobs:
4545
--slave /usr/bin/llvm-strip llvm-strip /usr/bin/llvm-strip-"${CLANG_VERSION}"
4646
echo "CLANG_VERSION=${CLANG_VERSION}" >> "${GITHUB_ENV}"
4747
48+
- name: Install libsframe (Ubuntu 24.04+)
49+
if: matrix.os == 'ubuntu-20.04'
50+
run: |
51+
sudo apt-get install -y libsframe1
52+
4853
- name: Build bpftool (default LLVM disassembler)
4954
run: |
5055
make -j -C src V=1
@@ -75,7 +80,13 @@ jobs:
7580
- name: Build bpftool, with libbfd, static build
7681
run: |
7782
make -C src clean
78-
EXTRA_LDFLAGS=-static make -j -C src V=1
83+
if [[ "${{ matrix.os }}" == "ubuntu-24.04" ]]; then
84+
# FIXME - See #73
85+
EXTRA_LDFLAGS=-static make -j -C src V=1 \
86+
LIBS="./src/bootstrap/libbpf/libbpf.a -lelf -lz -lzstd -lcap -lbfd -ldl -liberty -lz -lzstd -lsframe -lopcodes"
87+
else
88+
EXTRA_LDFLAGS=-static make -j -C src V=1
89+
fi
7990
./src/bpftool 2>&1 | grep -q Usage
8091
./src/bpftool -p version | \
8192
tee /dev/stderr | \

0 commit comments

Comments
 (0)