Skip to content

compile libbpf

compile libbpf #9

Workflow file for this run

name: Build package
on: [push, workflow_dispatch]
jobs:
build_dkms:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: install dependencies
run: |
sudo apt update
sudo apt install dpkg-dev debhelper dkms
- name: prepare sources
run: |
rm -rf debian
cp -r debian.dkms debian
- name: make dkms source package
run: |
fakeroot debian/rules binary
mv ../rex-dkms*_all.deb .
- name: upload package artifacts
uses: actions/upload-artifact@v4
with:
name: dkms_package
path: rex-dkms*_all.deb
if-no-files-found: error
# The package contains only sources. Let's check that it's buildable,
# and no surprising errors apeear in the build log.
- name: build module with dkms
run: |
sudo apt-get install -y ./rex-dkms*_all.deb \
|| ( find /var/lib/dkms -name make.log -exec cat '{}' \; && false )
# libbpf 1.3+ is requred for functional tests
build_libbpf:
runs-on: ubuntu-22.04
steps:
- name: install dependencies
run: |
sudo apt update
sudo apt install dpkg-dev debhelper
- name: build package
run: |
git clone https://github.com/sudipm-mukherjee/libbpf
cd libbpf
dpkg-buildpackage -uc -us
mv ../*.deb .
- name: upload package artifacts
uses: actions/upload-artifact@v4
with:
name: libbpf
path: *.deb

Check failure on line 61 in .github/workflows/package.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/package.yml

Invalid workflow file

You have an error in your yaml syntax on line 61
if-no-files-found: error
build_library:
runs-on: ubuntu-22.04
needs: build_libbpf
steps:
- uses: actions/checkout@v4
- name: prepare sources
run: |
rm -rf debian
cp -r debian.lib debian
- name: install dependencies
run: |
sudo apt update
sudo apt install -y libpcap-dev cmake dpkg-dev debhelper libboost-dev po-debconf ragel
- uses: actions/download-artifact@v4
with:
name: libbpf
path: libbpf
- name: install libbpf
run: |
cd libbpf
sudo dpkg -i ./libbpf-dev* ./libbpf1_*
- run: |
echo "nproc=$(nproc)" >> $GITHUB_ENV
- name: build package
run: |
dpkg-buildpackage -j${{env.nproc}} -b --no-sign
mv ../libhyperscan*.deb ../libhyperscan*.ddeb .
- name: upload package artifacts
uses: actions/upload-artifact@v4
with:
name: "package_${{ inputs.target }}"
path: libhyperscan*deb
if-no-files-found: error
- name: upload func test artifacts
uses: actions/upload-artifact@v4
with:
name: "func_test_${{ inputs.target }}"
path: obj-x86_64-linux-gnu/bin/unit-xdpscan
if-no-files-found: error