diff --git a/.github/workflows/check-commits.yml b/.github/workflows/check-commits.yml index cae3b4c1c..30c155321 100644 --- a/.github/workflows/check-commits.yml +++ b/.github/workflows/check-commits.yml @@ -19,7 +19,7 @@ jobs: # Checkout pull request HEAD commit instead of merge commit ref: ${{ github.event.pull_request.head.sha }} - name: Install dependencies - run: sudo contrib/apt-install libprotobuf-dev libprotobuf-c-dev protobuf-c-compiler protobuf-compiler python3-protobuf libnl-3-dev libnet-dev libcap-dev uuid-dev + run: sudo contrib/apt-install libprotobuf-dev libprotobuf-c-dev protobuf-c-compiler protobuf-compiler python3-protobuf libnl-3-dev libnet-dev libcap-dev uuid-dev liblz4-dev - name: Configure git user details run: | git config --global user.email "checkpoint-restore@users.noreply.github.com" @@ -28,3 +28,8 @@ jobs: run: git fetch origin ${{ github.base_ref }}:${{ github.base_ref }} - name: Build each commit run: git rebase ${{ github.base_ref }} -x "make -C scripts/ci check-commit" + - name: Build without LZ4 + run: | + make mrproper + make -j "$(nproc)" NO_LZ4=1 + make unittest NO_LZ4=1 diff --git a/Makefile b/Makefile index 3926cf9fc..95a48175a 100644 --- a/Makefile +++ b/Makefile @@ -237,6 +237,7 @@ else export CONFIG_COMPAT := y export CONFIG_GNUTLS := y export CONFIG_HAS_LIBBPF := y +export CONFIG_LZ4 := y endif # diff --git a/Makefile.config b/Makefile.config index d338f852a..f48ea9adc 100644 --- a/Makefile.config +++ b/Makefile.config @@ -46,6 +46,14 @@ else $(info $S Install gnutls-devel (RPM) or gnutls-dev (DEB) to fix.) endif +ifeq ($(NO_LZ4)x$(call pkg-config-check,liblz4),xy) + LIBS_FEATURES += -llz4 + export CONFIG_LZ4 := y + FEATURE_DEFINES += -DCONFIG_LZ4 +else + $(info Note: Building without LZ4 compression support.) +endif + ifeq ($(call pkg-config-check,libnftables),y) LIB_NFTABLES := $(shell $(PKG_CONFIG) --libs libnftables) ifeq ($(call try-cc,$(FEATURE_TEST_NFTABLES_LIB_API_0),$(LIB_NFTABLES)),true) diff --git a/contrib/dependencies/apk-packages.sh b/contrib/dependencies/apk-packages.sh index c47fb9fe0..c1de79c18 100755 --- a/contrib/dependencies/apk-packages.sh +++ b/contrib/dependencies/apk-packages.sh @@ -19,6 +19,7 @@ apk add --no-cache \ libcap-dev \ libcap-utils \ libdrm-dev \ + lz4-dev \ libnet-dev \ libnl3-dev \ libtraceevent-dev \ diff --git a/contrib/dependencies/apt-cross-packages.sh b/contrib/dependencies/apt-cross-packages.sh index 30ce6874c..ad9ebfca6 100755 --- a/contrib/dependencies/apt-cross-packages.sh +++ b/contrib/dependencies/apt-cross-packages.sh @@ -18,6 +18,7 @@ fi libelf-dev:"${DEBIAN_ARCH}" \ libexpat1-dev:"${DEBIAN_ARCH}" \ libgnutls28-dev:"${DEBIAN_ARCH}" \ + liblz4-dev:"${DEBIAN_ARCH}" \ libnet-dev:"${DEBIAN_ARCH}" \ libnftables-dev:"${DEBIAN_ARCH}" \ libnl-3-dev:"${DEBIAN_ARCH}" \ diff --git a/contrib/dependencies/apt-packages.sh b/contrib/dependencies/apt-packages.sh index 7963be7b4..2c9f2d5a3 100755 --- a/contrib/dependencies/apt-packages.sh +++ b/contrib/dependencies/apt-packages.sh @@ -23,6 +23,7 @@ fi libelf-dev \ libgnutls28-dev \ libgnutls30 \ + liblz4-dev \ libnet-dev \ libnl-3-dev \ libnl-route-3-dev \ diff --git a/contrib/dependencies/dnf-packages.sh b/contrib/dependencies/dnf-packages.sh index 0efeb1690..93eff6cd5 100755 --- a/contrib/dependencies/dnf-packages.sh +++ b/contrib/dependencies/dnf-packages.sh @@ -17,6 +17,7 @@ dnf install -y \ libbsd-devel \ libcap-devel \ libdrm-devel \ + lz4-devel \ libnet-devel \ libnl3-devel \ libselinux-devel \ diff --git a/contrib/dependencies/pacman-packages.sh b/contrib/dependencies/pacman-packages.sh index 260797606..f1c3b25a4 100755 --- a/contrib/dependencies/pacman-packages.sh +++ b/contrib/dependencies/pacman-packages.sh @@ -15,6 +15,7 @@ pacman -Syu --noconfirm \ libbsd \ libcap \ libdrm \ + lz4 \ libelf \ libnet \ libnl \